diff --git a/workspaces/resource-optimization/plugins/resource-optimization-common/src/client/private/OptimizationsApiClientProxy.test.ts b/workspaces/resource-optimization/plugins/resource-optimization-common/src/client/private/OptimizationsApiClientProxy.test.ts new file mode 100644 index 0000000000..cd3e9ffedc --- /dev/null +++ b/workspaces/resource-optimization/plugins/resource-optimization-common/src/client/private/OptimizationsApiClientProxy.test.ts @@ -0,0 +1,109 @@ +/** @jest-environment node */ +import { http, HttpResponse } from 'msw'; +import { setupServer } from 'msw/node'; +import { OptimizationsApiClientProxy } from '../OptimizationsApiClientProxy'; +import { DiscoveryApi } from '../../generated/types/discovery'; +import { GetRecommendationByIdRequest } from '../../models/requests'; +import { makePlotsDataPropertyPathWithTerm } from './test-helpers'; +import * as GetRecommendationByIdMockResponse from './fixtures/GetRecommendationByIdMockResponse.json'; + +const MOCK_BASE_URL = 'http://backstage:1234/api/proxy'; +const mockDiscoveryApi: DiscoveryApi = { + async getBaseUrl(_pluginId: string): Promise { + return MOCK_BASE_URL; + }, +}; +const server = setupServer( + http.get(`${MOCK_BASE_URL}/token`, _info => + HttpResponse.json({ + accessToken: 'hereisyourtokensir', + expiresAt: 1234567890, + }), + ), +); + +describe('OptimizationsApiClientProxy.ts', () => { + let client: OptimizationsApiClientProxy; + + beforeAll(() => server.listen({ onUnhandledRequest: 'error' })); + beforeEach(() => { + client = new OptimizationsApiClientProxy({ + discoveryApi: mockDiscoveryApi, + }); + }); + afterEach(() => server.resetHandlers()); + afterAll(() => server.close()); + + describe('getRecommendationById', () => { + describe('responses', () => { + it("should not transform the plotsData's date-string properties", async () => { + expect.assertions(3); + + // Arrange + server.use( + http.get( + `${MOCK_BASE_URL}/cost-management/v1/recommendations/openshift/:id`, + _info => HttpResponse.json(GetRecommendationByIdMockResponse), + ), + ); + + // Act + const request: GetRecommendationByIdRequest = { + path: { recommendationId: 'abcdef01-abcd-abcd-abcd-0123456789abc' }, + query: {}, + }; + const response = await client.getRecommendationById(request); + const json = await response.json(); + + // Assert + expect(json).toHaveProperty( + makePlotsDataPropertyPathWithTerm( + 'short', + '2024-07-30T17:00:05.000Z', + ), + ); + expect(json).toHaveProperty( + makePlotsDataPropertyPathWithTerm( + 'medium', + '2024-07-25T11:00:05.000Z', + ), + ); + expect(json).toHaveProperty( + makePlotsDataPropertyPathWithTerm('long', '2024-07-17T11:00:05.000Z'), + ); + }); + + it('should not transform to snake_case the recommendationId path parameter', async () => { + expect.assertions(2); + + // Arrange + const spyOnDefaultClientGetRecommendationById = jest.spyOn( + // @ts-ignore (because defaultClient is private 🤫) + client.defaultClient, + 'getRecommendationById', + ); + server.use( + http.get( + `${MOCK_BASE_URL}/cost-management/v1/recommendations/openshift/:id`, + _info => HttpResponse.json(GetRecommendationByIdMockResponse), + ), + ); + + // Act + const request: GetRecommendationByIdRequest = { + path: { recommendationId: 'abcdef01-abcd-abcd-abcd-0123456789abc' }, + query: { cpuUnit: 'cores' }, + }; + await client.getRecommendationById(request); + + // Assert + expect( + spyOnDefaultClientGetRecommendationById.mock.lastCall?.[0], + ).toHaveProperty('path.recommendationId'); + expect( + spyOnDefaultClientGetRecommendationById.mock.lastCall?.[0], + ).toHaveProperty('query.cpu_unit'); + }); + }); + }); +}); diff --git a/workspaces/resource-optimization/plugins/resource-optimization-common/src/client/private/fixtures/GetRecommendationByIdMockResponse.json b/workspaces/resource-optimization/plugins/resource-optimization-common/src/client/private/fixtures/GetRecommendationByIdMockResponse.json new file mode 100644 index 0000000000..075f6c0c0e --- /dev/null +++ b/workspaces/resource-optimization/plugins/resource-optimization-common/src/client/private/fixtures/GetRecommendationByIdMockResponse.json @@ -0,0 +1,821 @@ +{ + "cluster_alias": "OpenShift on AWS", + "cluster_uuid": "8a3e59b7-23a8-4ed1-b1cf-afd5afea54b9", + "container": "pod_name4", + "id": "71cd6630-ca9e-478b-989e-e29ee0f5895a", + "last_reported": "2024-07-31T11:00:21Z", + "project": "analytics", + "recommendations": { + "current": { + "limits": { + "cpu": { + "amount": 2, + "format": "" + }, + "memory": { + "amount": 4096, + "format": "Mi" + } + }, + "requests": { + "cpu": { + "amount": 2, + "format": "" + }, + "memory": { + "amount": 4096, + "format": "Mi" + } + } + }, + "monitoring_end_time": "2024-07-31T11:00:05Z", + "recommendation_terms": { + "long_term": { + "duration_in_hours": 359.8, + "monitoring_start_time": "2024-07-16T11:00:05Z", + "plots": { + "datapoints": 15, + "plots_data": { + "2024-07-17T11:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 2.09, + "median": 2.09, + "min": 0.46, + "q1": 2.09, + "q3": 2.09 + }, + "memoryUsage": { + "format": "MiB", + "max": 3674.36, + "median": 3674.36, + "min": 907.25, + "q1": 3674.36, + "q3": 3674.36 + } + }, + "2024-07-18T11:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 2.09, + "median": 0.75, + "min": 0.59, + "q1": 0.75, + "q3": 0.75 + }, + "memoryUsage": { + "format": "MiB", + "max": 3721.87, + "median": 3721.87, + "min": 2652.71, + "q1": 3721.87, + "q3": 3721.87 + } + }, + "2024-07-19T11:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 1.62, + "median": 1.62, + "min": 0.59, + "q1": 1.62, + "q3": 1.62 + }, + "memoryUsage": { + "format": "MiB", + "max": 3721.87, + "median": 2463.68, + "min": 1861.64, + "q1": 2463.68, + "q3": 2463.68 + } + }, + "2024-07-20T11:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 1.62, + "median": 1.13, + "min": 0.96, + "q1": 1.13, + "q3": 1.13 + }, + "memoryUsage": { + "format": "MiB", + "max": 2610.6, + "median": 2610.6, + "min": 1861.64, + "q1": 2610.6, + "q3": 2610.6 + } + }, + "2024-07-21T11:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 0.91, + "median": 0.91, + "min": 0.87, + "q1": 0.91, + "q3": 0.91 + }, + "memoryUsage": { + "format": "MiB", + "max": 1253.7, + "median": 1253.7, + "min": 885.32, + "q1": 1253.7, + "q3": 1253.7 + } + }, + "2024-07-22T11:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 1.13, + "median": 1.13, + "min": 0.91, + "q1": 1.13, + "q3": 1.13 + }, + "memoryUsage": { + "format": "MiB", + "max": 3543.62, + "median": 3543.62, + "min": 2790.94, + "q1": 3543.62, + "q3": 3543.62 + } + }, + "2024-07-23T11:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 0.77, + "median": 0.77, + "min": 0.64, + "q1": 0.77, + "q3": 0.77 + }, + "memoryUsage": { + "format": "MiB", + "max": 2245.04, + "median": 2245.04, + "min": 1729.66, + "q1": 2245.04, + "q3": 2245.04 + } + }, + "2024-07-24T11:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 2, + "median": 2, + "min": 1.73, + "q1": 2, + "q3": 2 + }, + "memoryUsage": { + "format": "MiB", + "max": 1139.22, + "median": 1139.22, + "min": 831.47, + "q1": 1139.22, + "q3": 1139.22 + } + }, + "2024-07-25T11:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 1.58, + "median": 1.58, + "min": 1.23, + "q1": 1.58, + "q3": 1.58 + }, + "memoryUsage": { + "format": "MiB", + "max": 3585.45, + "median": 3585.45, + "min": 3172.37, + "q1": 3585.45, + "q3": 3585.45 + } + }, + "2024-07-26T11:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 1.58, + "median": 1.42, + "min": 1.23, + "q1": 1.42, + "q3": 1.42 + }, + "memoryUsage": { + "format": "MiB", + "max": 3585.45, + "median": 3538.72, + "min": 2446.91, + "q1": 3538.72, + "q3": 3538.72 + } + }, + "2024-07-27T11:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 1.42, + "median": 1.29, + "min": 0.99, + "q1": 1.29, + "q3": 1.29 + }, + "memoryUsage": { + "format": "MiB", + "max": 3538.72, + "median": 1779.15, + "min": 1523.14, + "q1": 1779.15, + "q3": 1779.15 + } + }, + "2024-07-28T11:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 1.29, + "median": 1.06, + "min": 0.92, + "q1": 1.06, + "q3": 1.06 + }, + "memoryUsage": { + "format": "MiB", + "max": 3031.76, + "median": 3031.76, + "min": 1523.14, + "q1": 3031.76, + "q3": 3031.76 + } + }, + "2024-07-29T11:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 1.86, + "median": 1.86, + "min": 1.41, + "q1": 1.86, + "q3": 1.86 + }, + "memoryUsage": { + "format": "MiB", + "max": 871.33, + "median": 871.33, + "min": 786.9, + "q1": 871.33, + "q3": 871.33 + } + }, + "2024-07-30T11:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 2.2, + "median": 2.2, + "min": 1.63, + "q1": 2.2, + "q3": 2.2 + }, + "memoryUsage": { + "format": "MiB", + "max": 2264.17, + "median": 2264.17, + "min": 2112.12, + "q1": 2264.17, + "q3": 2264.17 + } + }, + "2024-07-31T11:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 0.78, + "median": 0.78, + "min": 0.64, + "q1": 0.78, + "q3": 0.78 + }, + "memoryUsage": { + "format": "MiB", + "max": 2728.01, + "median": 2728.01, + "min": 2249.43, + "q1": 2728.01, + "q3": 2728.01 + } + } + } + }, + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 1.42, + "format": "" + }, + "memory": { + "amount": 4466.24, + "format": "Mi" + } + }, + "requests": { + "cpu": { + "amount": 1.42, + "format": "" + }, + "memory": { + "amount": 4466.24, + "format": "Mi" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.579, + "format": "" + }, + "memory": { + "amount": 370.24, + "format": "Mi" + } + }, + "requests": { + "cpu": { + "amount": -0.579, + "format": "" + }, + "memory": { + "amount": 370.24, + "format": "Mi" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 2.2, + "format": "" + }, + "memory": { + "amount": 4466.24, + "format": "Mi" + } + }, + "requests": { + "cpu": { + "amount": 2.2, + "format": "" + }, + "memory": { + "amount": 4466.24, + "format": "Mi" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": 0.2, + "format": "" + }, + "memory": { + "amount": 370.24, + "format": "Mi" + } + }, + "requests": { + "cpu": { + "amount": 0.2, + "format": "" + }, + "memory": { + "amount": 370.24, + "format": "Mi" + } + } + } + } + } + }, + "medium_term": { + "duration_in_hours": 168, + "monitoring_start_time": "2024-07-24T11:00:05Z", + "plots": { + "datapoints": 7, + "plots_data": { + "2024-07-25T11:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 1.58, + "median": 1.58, + "min": 1.23, + "q1": 1.58, + "q3": 1.58 + }, + "memoryUsage": { + "format": "MiB", + "max": 3585.45, + "median": 3585.45, + "min": 3172.37, + "q1": 3585.45, + "q3": 3585.45 + } + }, + "2024-07-26T11:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 1.58, + "median": 1.42, + "min": 1.23, + "q1": 1.42, + "q3": 1.42 + }, + "memoryUsage": { + "format": "MiB", + "max": 3585.45, + "median": 3538.72, + "min": 2446.91, + "q1": 3538.72, + "q3": 3538.72 + } + }, + "2024-07-27T11:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 1.42, + "median": 1.29, + "min": 0.99, + "q1": 1.29, + "q3": 1.29 + }, + "memoryUsage": { + "format": "MiB", + "max": 3538.72, + "median": 1779.15, + "min": 1523.14, + "q1": 1779.15, + "q3": 1779.15 + } + }, + "2024-07-28T11:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 1.29, + "median": 1.06, + "min": 0.92, + "q1": 1.06, + "q3": 1.06 + }, + "memoryUsage": { + "format": "MiB", + "max": 3031.76, + "median": 3031.76, + "min": 1523.14, + "q1": 3031.76, + "q3": 3031.76 + } + }, + "2024-07-29T11:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 1.86, + "median": 1.86, + "min": 1.41, + "q1": 1.86, + "q3": 1.86 + }, + "memoryUsage": { + "format": "MiB", + "max": 871.33, + "median": 871.33, + "min": 786.9, + "q1": 871.33, + "q3": 871.33 + } + }, + "2024-07-30T11:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 2.2, + "median": 2.2, + "min": 1.63, + "q1": 2.2, + "q3": 2.2 + }, + "memoryUsage": { + "format": "MiB", + "max": 2264.17, + "median": 2264.17, + "min": 2112.12, + "q1": 2264.17, + "q3": 2264.17 + } + }, + "2024-07-31T11:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 0.78, + "median": 0.78, + "min": 0.64, + "q1": 0.78, + "q3": 0.78 + }, + "memoryUsage": { + "format": "MiB", + "max": 2728.01, + "median": 2728.01, + "min": 2249.43, + "q1": 2728.01, + "q3": 2728.01 + } + } + } + }, + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 1.58, + "format": "" + }, + "memory": { + "amount": 4302.54, + "format": "Mi" + } + }, + "requests": { + "cpu": { + "amount": 1.58, + "format": "" + }, + "memory": { + "amount": 4302.54, + "format": "Mi" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.419, + "format": "" + }, + "memory": { + "amount": 206.54, + "format": "Mi" + } + }, + "requests": { + "cpu": { + "amount": -0.419, + "format": "" + }, + "memory": { + "amount": 206.54, + "format": "Mi" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 2.2, + "format": "" + }, + "memory": { + "amount": 4302.54, + "format": "Mi" + } + }, + "requests": { + "cpu": { + "amount": 2.2, + "format": "" + }, + "memory": { + "amount": 4302.54, + "format": "Mi" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": 0.2, + "format": "" + }, + "memory": { + "amount": 206.54, + "format": "Mi" + } + }, + "requests": { + "cpu": { + "amount": 0.2, + "format": "" + }, + "memory": { + "amount": 206.54, + "format": "Mi" + } + } + } + } + } + }, + "short_term": { + "duration_in_hours": 24, + "monitoring_start_time": "2024-07-30T11:00:05Z", + "plots": { + "datapoints": 4, + "plots_data": { + "2024-07-30T17:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 0.78, + "median": 0.78, + "min": 0.64, + "q1": 0.78, + "q3": 0.78 + }, + "memoryUsage": { + "format": "MiB", + "max": 2728.01, + "median": 2728.01, + "min": 2249.43, + "q1": 2728.01, + "q3": 2728.01 + } + }, + "2024-07-30T23:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 0.78, + "median": 0.78, + "min": 0.64, + "q1": 0.78, + "q3": 0.78 + }, + "memoryUsage": { + "format": "MiB", + "max": 2728.01, + "median": 2728.01, + "min": 2249.43, + "q1": 2728.01, + "q3": 2728.01 + } + }, + "2024-07-31T05:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 0.78, + "median": 0.78, + "min": 0.64, + "q1": 0.78, + "q3": 0.78 + }, + "memoryUsage": { + "format": "MiB", + "max": 2728.01, + "median": 2728.01, + "min": 2249.43, + "q1": 2728.01, + "q3": 2728.01 + } + }, + "2024-07-31T11:00:05.000Z": { + "cpuUsage": { + "format": "cores", + "max": 0.78, + "median": 0.78, + "min": 0.64, + "q1": 0.78, + "q3": 0.78 + }, + "memoryUsage": { + "format": "MiB", + "max": 2728.01, + "median": 2728.01, + "min": 2249.43, + "q1": 2728.01, + "q3": 2728.01 + } + } + } + }, + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.78, + "format": "" + }, + "memory": { + "amount": 3230.53, + "format": "Mi" + } + }, + "requests": { + "cpu": { + "amount": 0.78, + "format": "" + }, + "memory": { + "amount": 3230.53, + "format": "Mi" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -1.22, + "format": "" + }, + "memory": { + "amount": -865.46, + "format": "Mi" + } + }, + "requests": { + "cpu": { + "amount": -1.22, + "format": "" + }, + "memory": { + "amount": -865.46, + "format": "Mi" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 0.78, + "format": "" + }, + "memory": { + "amount": 3230.53, + "format": "Mi" + } + }, + "requests": { + "cpu": { + "amount": 0.78, + "format": "" + }, + "memory": { + "amount": 3230.53, + "format": "Mi" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -1.22, + "format": "" + }, + "memory": { + "amount": -865.46, + "format": "Mi" + } + }, + "requests": { + "cpu": { + "amount": -1.22, + "format": "" + }, + "memory": { + "amount": -865.46, + "format": "Mi" + } + } + } + } + } + } + } + }, + "source_id": "120", + "workload": "pod_name4", + "workload_type": "deploymentconfig" +} diff --git a/workspaces/resource-optimization/plugins/resource-optimization-common/src/client/private/fixtures/GetRecommendationListMockResponse.json b/workspaces/resource-optimization/plugins/resource-optimization-common/src/client/private/fixtures/GetRecommendationListMockResponse.json new file mode 100644 index 0000000000..301b5f5e3a --- /dev/null +++ b/workspaces/resource-optimization/plugins/resource-optimization-common/src/client/private/fixtures/GetRecommendationListMockResponse.json @@ -0,0 +1,3455 @@ +{ + "data": [ + { + "cluster_alias": "OpenShift on AWS", + "cluster_uuid": "8a3e59b7-23a8-4ed1-b1cf-afd5afea54b9", + "container": "pod_name4", + "id": "71cd6630-ca9e-478b-989e-e29ee0f5895a", + "last_reported": "2024-07-31T11:00:21Z", + "project": "analytics", + "recommendations": { + "current": { + "limits": { + "cpu": { + "amount": 2, + "format": "" + }, + "memory": { + "amount": 4294967296, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 2, + "format": "" + }, + "memory": { + "amount": 4294967296, + "format": "bytes" + } + } + }, + "monitoring_end_time": "2024-07-31T11:00:05Z", + "recommendation_terms": { + "long_term": { + "duration_in_hours": 359.8, + "monitoring_start_time": "2024-07-16T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 1.42, + "format": "" + }, + "memory": { + "amount": 4683197979.6, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 1.42, + "format": "" + }, + "memory": { + "amount": 4683197979.6, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.579, + "format": "" + }, + "memory": { + "amount": 388230683.6000004, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.579, + "format": "" + }, + "memory": { + "amount": 388230683.6000004, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 2.2, + "format": "" + }, + "memory": { + "amount": 4683197979.6, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 2.2, + "format": "" + }, + "memory": { + "amount": 4683197979.6, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": 0.2, + "format": "" + }, + "memory": { + "amount": 388230683.6000004, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.2, + "format": "" + }, + "memory": { + "amount": 388230683.6000004, + "format": "bytes" + } + } + } + } + } + }, + "medium_term": { + "duration_in_hours": 168, + "monitoring_start_time": "2024-07-24T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 1.58, + "format": "" + }, + "memory": { + "amount": 4511545316.4, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 1.58, + "format": "" + }, + "memory": { + "amount": 4511545316.4, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.419, + "format": "" + }, + "memory": { + "amount": 216578020.39999962, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.419, + "format": "" + }, + "memory": { + "amount": 216578020.39999962, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 2.2, + "format": "" + }, + "memory": { + "amount": 4511545316.4, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 2.2, + "format": "" + }, + "memory": { + "amount": 4511545316.4, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": 0.2, + "format": "" + }, + "memory": { + "amount": 216578020.39999962, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.2, + "format": "" + }, + "memory": { + "amount": 216578020.39999962, + "format": "bytes" + } + } + } + } + } + }, + "short_term": { + "duration_in_hours": 24, + "monitoring_start_time": "2024-07-30T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.78, + "format": "" + }, + "memory": { + "amount": 3387460569.8, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.78, + "format": "" + }, + "memory": { + "amount": 3387460569.8, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -1.22, + "format": "" + }, + "memory": { + "amount": -907506726.1999998, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -1.22, + "format": "" + }, + "memory": { + "amount": -907506726.1999998, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 0.78, + "format": "" + }, + "memory": { + "amount": 3387460569.8, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.78, + "format": "" + }, + "memory": { + "amount": 3387460569.8, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -1.22, + "format": "" + }, + "memory": { + "amount": -907506726.1999998, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -1.22, + "format": "" + }, + "memory": { + "amount": -907506726.1999998, + "format": "bytes" + } + } + } + } + } + } + } + }, + "source_id": "120", + "workload": "pod_name4", + "workload_type": "deploymentconfig" + }, + { + "cluster_alias": "OpenShift on AWS", + "cluster_uuid": "8a3e59b7-23a8-4ed1-b1cf-afd5afea54b9", + "container": "pod_name9", + "id": "44e38518-ba32-4b2e-b5eb-0e3084e4bf16", + "last_reported": "2024-07-31T11:00:21Z", + "project": "wolfpack", + "recommendations": { + "current": { + "limits": { + "cpu": { + "amount": 2, + "format": "" + }, + "memory": { + "amount": 4294967296, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 2, + "format": "" + }, + "memory": { + "amount": 4294967296, + "format": "bytes" + } + } + }, + "monitoring_end_time": "2024-07-31T11:00:05Z", + "recommendation_terms": { + "long_term": { + "duration_in_hours": 359.8, + "monitoring_start_time": "2024-07-16T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 1.22, + "format": "" + }, + "memory": { + "amount": 4859540746.8, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 1.22, + "format": "" + }, + "memory": { + "amount": 4859540746.8, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.78, + "format": "" + }, + "memory": { + "amount": 564573450.8000002, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.78, + "format": "" + }, + "memory": { + "amount": 564573450.8000002, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 2, + "format": "" + }, + "memory": { + "amount": 4859540746.8, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 2, + "format": "" + }, + "memory": { + "amount": 4859540746.8, + "format": "bytes" + } + } + }, + "notifications": { + "323004": { + "code": 323004, + "message": + "Workload is optimised wrt CPU REQUESTS, no changes needed", + "type": "notice" + }, + "323005": { + "code": 323005, + "message": + "Workload is optimised wrt CPU LIMITS, no changes needed", + "type": "notice" + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "format": "cores" + }, + "memory": { + "amount": 564573450.8000002, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "format": "cores" + }, + "memory": { + "amount": 564573450.8000002, + "format": "bytes" + } + } + } + } + } + }, + "medium_term": { + "duration_in_hours": 168, + "monitoring_start_time": "2024-07-24T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 1.53, + "format": "" + }, + "memory": { + "amount": 4857479162.4, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 1.53, + "format": "" + }, + "memory": { + "amount": 4857479162.4, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.47, + "format": "" + }, + "memory": { + "amount": 562511866.3999996, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.47, + "format": "" + }, + "memory": { + "amount": 562511866.3999996, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 2, + "format": "" + }, + "memory": { + "amount": 4857479162.4, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 2, + "format": "" + }, + "memory": { + "amount": 4857479162.4, + "format": "bytes" + } + } + }, + "notifications": { + "323004": { + "code": 323004, + "message": + "Workload is optimised wrt CPU REQUESTS, no changes needed", + "type": "notice" + }, + "323005": { + "code": 323005, + "message": + "Workload is optimised wrt CPU LIMITS, no changes needed", + "type": "notice" + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "format": "cores" + }, + "memory": { + "amount": 562511866.3999996, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "format": "cores" + }, + "memory": { + "amount": 562511866.3999996, + "format": "bytes" + } + } + } + } + } + }, + "short_term": { + "duration_in_hours": 24, + "monitoring_start_time": "2024-07-30T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 1.53, + "format": "" + }, + "memory": { + "amount": 4487901522, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 1.53, + "format": "" + }, + "memory": { + "amount": 4487901522, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.47, + "format": "" + }, + "memory": { + "amount": 192934226, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.47, + "format": "" + }, + "memory": { + "amount": 192934226, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 1.53, + "format": "" + }, + "memory": { + "amount": 4487901522, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 1.53, + "format": "" + }, + "memory": { + "amount": 4487901522, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.47, + "format": "" + }, + "memory": { + "amount": 192934226, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.47, + "format": "" + }, + "memory": { + "amount": 192934226, + "format": "bytes" + } + } + } + } + } + } + } + }, + "source_id": "120", + "workload": "pod_name9", + "workload_type": "statefulset" + }, + { + "cluster_alias": "OpenShift on AWS", + "cluster_uuid": "8a3e59b7-23a8-4ed1-b1cf-afd5afea54b9", + "container": "pod_name8", + "id": "be53470d-eeee-47f5-8b18-3391c564de4c", + "last_reported": "2024-07-31T11:00:21Z", + "project": "openshift", + "recommendations": { + "current": { + "limits": { + "cpu": { + "amount": 1, + "format": "" + }, + "memory": { + "amount": 4294967296, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 1, + "format": "" + }, + "memory": { + "amount": 2147483648, + "format": "bytes" + } + } + }, + "monitoring_end_time": "2024-07-31T11:00:05Z", + "recommendation_terms": { + "long_term": { + "duration_in_hours": 359.8, + "monitoring_start_time": "2024-07-16T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.65, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.65, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.35, + "format": "" + }, + "memory": { + "amount": 858993459.1999998, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.35, + "format": "" + }, + "memory": { + "amount": 3006477107.2, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 1.05, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 1.05, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": 0.05, + "format": "" + }, + "memory": { + "amount": 858993459.1999998, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.05, + "format": "" + }, + "memory": { + "amount": 3006477107.2, + "format": "bytes" + } + } + } + } + } + }, + "medium_term": { + "duration_in_hours": 168, + "monitoring_start_time": "2024-07-24T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.68, + "format": "" + }, + "memory": { + "amount": 4786208474.2, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.68, + "format": "" + }, + "memory": { + "amount": 4786208474.2, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.319, + "format": "" + }, + "memory": { + "amount": 491241178.1999998, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.319, + "format": "" + }, + "memory": { + "amount": 2638724826.2, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 1.03, + "format": "" + }, + "memory": { + "amount": 4786208474.2, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 1.03, + "format": "" + }, + "memory": { + "amount": 4786208474.2, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": 0.03, + "format": "" + }, + "memory": { + "amount": 491241178.1999998, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.03, + "format": "" + }, + "memory": { + "amount": 2638724826.2, + "format": "bytes" + } + } + } + } + } + }, + "short_term": { + "duration_in_hours": 24, + "monitoring_start_time": "2024-07-30T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.14, + "format": "" + }, + "memory": { + "amount": 2370796177.2, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.14, + "format": "" + }, + "memory": { + "amount": 2370796177.2, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.86, + "format": "" + }, + "memory": { + "amount": -1924171118.8000002, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.86, + "format": "" + }, + "memory": { + "amount": 223312529.1999998, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 0.14, + "format": "" + }, + "memory": { + "amount": 2370796177.2, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.14, + "format": "" + }, + "memory": { + "amount": 2370796177.2, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.86, + "format": "" + }, + "memory": { + "amount": -1924171118.8000002, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.86, + "format": "" + }, + "memory": { + "amount": 223312529.1999998, + "format": "bytes" + } + } + } + } + } + } + } + }, + "source_id": "120", + "workload": "pod_name8", + "workload_type": "deployment" + }, + { + "cluster_alias": "OpenShift on AWS", + "cluster_uuid": "8a3e59b7-23a8-4ed1-b1cf-afd5afea54b9", + "container": "pod_name1", + "id": "eed5583c-1a41-4e6d-afd6-853f1ff9a94c", + "last_reported": "2024-07-31T11:00:21Z", + "project": "install-test", + "recommendations": { + "current": { + "limits": { + "cpu": { + "amount": 1, + "format": "" + }, + "memory": { + "amount": 4294967296, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 1, + "format": "" + }, + "memory": { + "amount": 2147483648, + "format": "bytes" + } + } + }, + "monitoring_end_time": "2024-07-31T11:00:05Z", + "recommendation_terms": { + "long_term": { + "duration_in_hours": 359.8, + "monitoring_start_time": "2024-07-16T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.84, + "format": "" + }, + "memory": { + "amount": 5032350903.1, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.84, + "format": "" + }, + "memory": { + "amount": 5032350903.1, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.159, + "format": "" + }, + "memory": { + "amount": 737383607.1000004, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.159, + "format": "" + }, + "memory": { + "amount": 2884867255.1000004, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 0.84, + "format": "" + }, + "memory": { + "amount": 5032350903.1, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.84, + "format": "" + }, + "memory": { + "amount": 5032350903.1, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.159, + "format": "" + }, + "memory": { + "amount": 737383607.1000004, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.159, + "format": "" + }, + "memory": { + "amount": 2884867255.1000004, + "format": "bytes" + } + } + } + } + } + }, + "medium_term": { + "duration_in_hours": 168, + "monitoring_start_time": "2024-07-24T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.81, + "format": "" + }, + "memory": { + "amount": 4964513505.85, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.81, + "format": "" + }, + "memory": { + "amount": 4964513505.85, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.189, + "format": "" + }, + "memory": { + "amount": 669546209.8500004, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.189, + "format": "" + }, + "memory": { + "amount": 2817029857.8500004, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 0.81, + "format": "" + }, + "memory": { + "amount": 4964513505.85, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.81, + "format": "" + }, + "memory": { + "amount": 4964513505.85, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.189, + "format": "" + }, + "memory": { + "amount": 669546209.8500004, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.189, + "format": "" + }, + "memory": { + "amount": 2817029857.8500004, + "format": "bytes" + } + } + } + } + } + }, + "short_term": { + "duration_in_hours": 24, + "monitoring_start_time": "2024-07-30T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.27, + "format": "" + }, + "memory": { + "amount": 867967257.9, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.27, + "format": "" + }, + "memory": { + "amount": 867967257.9, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.73, + "format": "" + }, + "memory": { + "amount": -3427000038.1, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.73, + "format": "" + }, + "memory": { + "amount": -1279516390.1, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 0.27, + "format": "" + }, + "memory": { + "amount": 867967257.9, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.27, + "format": "" + }, + "memory": { + "amount": 867967257.9, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.73, + "format": "" + }, + "memory": { + "amount": -3427000038.1, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.73, + "format": "" + }, + "memory": { + "amount": -1279516390.1, + "format": "bytes" + } + } + } + } + } + } + } + }, + "source_id": "120", + "workload": "pod_name1", + "workload_type": "deployment" + }, + { + "cluster_alias": "OpenShift on AWS", + "cluster_uuid": "8a3e59b7-23a8-4ed1-b1cf-afd5afea54b9", + "container": "pod_apiserver", + "id": "f3554eba-2ffe-4557-a0f2-304bfd7d36ea", + "last_reported": "2024-07-31T11:00:21Z", + "project": "openshift-kube-apiserver", + "recommendations": { + "current": { + "limits": { + "cpu": { + "amount": 1, + "format": "" + }, + "memory": { + "amount": 4294967296, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 1, + "format": "" + }, + "memory": { + "amount": 2147483648, + "format": "bytes" + } + } + }, + "monitoring_end_time": "2024-07-31T11:00:05Z", + "recommendation_terms": { + "long_term": { + "duration_in_hours": 359.8, + "monitoring_start_time": "2024-07-16T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.91, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.91, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.089, + "format": "" + }, + "memory": { + "amount": 858993459.1999998, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.089, + "format": "" + }, + "memory": { + "amount": 3006477107.2, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 1.03, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 1.03, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": 0.03, + "format": "" + }, + "memory": { + "amount": 858993459.1999998, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.03, + "format": "" + }, + "memory": { + "amount": 3006477107.2, + "format": "bytes" + } + } + } + } + } + }, + "medium_term": { + "duration_in_hours": 168, + "monitoring_start_time": "2024-07-24T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.98, + "format": "" + }, + "memory": { + "amount": 4775646614.35, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.98, + "format": "" + }, + "memory": { + "amount": 4775646614.35, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.02, + "format": "" + }, + "memory": { + "amount": 480679318.3500004, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.02, + "format": "" + }, + "memory": { + "amount": 2628162966.3500004, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 0.98, + "format": "" + }, + "memory": { + "amount": 4775646614.35, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.98, + "format": "" + }, + "memory": { + "amount": 4775646614.35, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.02, + "format": "" + }, + "memory": { + "amount": 480679318.3500004, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.02, + "format": "" + }, + "memory": { + "amount": 2628162966.3500004, + "format": "bytes" + } + } + } + } + } + }, + "short_term": { + "duration_in_hours": 24, + "monitoring_start_time": "2024-07-30T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.98, + "format": "" + }, + "memory": { + "amount": 4369422701.5, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.98, + "format": "" + }, + "memory": { + "amount": 4369422701.5, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.02, + "format": "" + }, + "memory": { + "amount": 74455405.5, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.02, + "format": "" + }, + "memory": { + "amount": 2221939053.5, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 0.98, + "format": "" + }, + "memory": { + "amount": 4369422701.5, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.98, + "format": "" + }, + "memory": { + "amount": 4369422701.5, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.02, + "format": "" + }, + "memory": { + "amount": 74455405.5, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.02, + "format": "" + }, + "memory": { + "amount": 2221939053.5, + "format": "bytes" + } + } + } + } + } + } + } + }, + "source_id": "120", + "workload": "pod_apiserver", + "workload_type": "deployment" + }, + { + "cluster_alias": "OpenShift on AWS", + "cluster_uuid": "8a3e59b7-23a8-4ed1-b1cf-afd5afea54b9", + "container": "pod_name2", + "id": "882eebb2-2b87-4e17-a90e-7d8121abd6b3", + "last_reported": "2024-07-31T11:00:21Z", + "project": "catalog", + "recommendations": { + "current": { + "limits": { + "cpu": { + "amount": 1, + "format": "" + }, + "memory": { + "amount": 4294967296, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 1, + "format": "" + }, + "memory": { + "amount": 2147483648, + "format": "bytes" + } + } + }, + "monitoring_end_time": "2024-07-31T11:00:05Z", + "recommendation_terms": { + "long_term": { + "duration_in_hours": 359.8, + "monitoring_start_time": "2024-07-16T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.6, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.6, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.4, + "format": "" + }, + "memory": { + "amount": 858993459.1999998, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.4, + "format": "" + }, + "memory": { + "amount": 3006477107.2, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 1, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 1, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + } + }, + "notifications": { + "323004": { + "code": 323004, + "message": + "Workload is optimised wrt CPU REQUESTS, no changes needed", + "type": "notice" + }, + "323005": { + "code": 323005, + "message": + "Workload is optimised wrt CPU LIMITS, no changes needed", + "type": "notice" + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "format": "cores" + }, + "memory": { + "amount": 858993459.1999998, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "format": "cores" + }, + "memory": { + "amount": 3006477107.2, + "format": "bytes" + } + } + } + } + } + }, + "medium_term": { + "duration_in_hours": 168, + "monitoring_start_time": "2024-07-24T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.56, + "format": "" + }, + "memory": { + "amount": 4919996707.2, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.56, + "format": "" + }, + "memory": { + "amount": 4919996707.2, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.439, + "format": "" + }, + "memory": { + "amount": 625029411.1999998, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.439, + "format": "" + }, + "memory": { + "amount": 2772513059.2, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 1, + "format": "" + }, + "memory": { + "amount": 4919996707.2, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 1, + "format": "" + }, + "memory": { + "amount": 4919996707.2, + "format": "bytes" + } + } + }, + "notifications": { + "323004": { + "code": 323004, + "message": + "Workload is optimised wrt CPU REQUESTS, no changes needed", + "type": "notice" + }, + "323005": { + "code": 323005, + "message": + "Workload is optimised wrt CPU LIMITS, no changes needed", + "type": "notice" + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "format": "cores" + }, + "memory": { + "amount": 625029411.1999998, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "format": "cores" + }, + "memory": { + "amount": 2772513059.2, + "format": "bytes" + } + } + } + } + } + }, + "short_term": { + "duration_in_hours": 24, + "monitoring_start_time": "2024-07-30T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.55, + "format": "" + }, + "memory": { + "amount": 3073804478.35, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.55, + "format": "" + }, + "memory": { + "amount": 3073804478.35, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.449, + "format": "" + }, + "memory": { + "amount": -1221162817.65, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.449, + "format": "" + }, + "memory": { + "amount": 926320830.3499999, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 0.55, + "format": "" + }, + "memory": { + "amount": 3073804478.35, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.55, + "format": "" + }, + "memory": { + "amount": 3073804478.35, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.449, + "format": "" + }, + "memory": { + "amount": -1221162817.65, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.449, + "format": "" + }, + "memory": { + "amount": 926320830.3499999, + "format": "bytes" + } + } + } + } + } + } + } + }, + "source_id": "120", + "workload": "pod_name2", + "workload_type": "replicaset" + }, + { + "cluster_alias": "OpenShift on AWS", + "cluster_uuid": "8a3e59b7-23a8-4ed1-b1cf-afd5afea54b9", + "container": "pod_name3", + "id": "38480cb6-69f4-4a85-b695-94e8928ba83a", + "last_reported": "2024-07-31T11:00:21Z", + "project": "cost-management", + "recommendations": { + "current": { + "limits": { + "cpu": { + "amount": 1, + "format": "" + }, + "memory": { + "amount": 4294967296, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 1, + "format": "" + }, + "memory": { + "amount": 2147483648, + "format": "bytes" + } + } + }, + "monitoring_end_time": "2024-07-31T11:00:05Z", + "recommendation_terms": { + "long_term": { + "duration_in_hours": 359.8, + "monitoring_start_time": "2024-07-16T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.95, + "format": "" + }, + "memory": { + "amount": 5128498041.25, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.95, + "format": "" + }, + "memory": { + "amount": 5128498041.25, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.05, + "format": "" + }, + "memory": { + "amount": 833530745.25, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.05, + "format": "" + }, + "memory": { + "amount": 2981014393.25, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 0.95, + "format": "" + }, + "memory": { + "amount": 5128498041.25, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.95, + "format": "" + }, + "memory": { + "amount": 5128498041.25, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.05, + "format": "" + }, + "memory": { + "amount": 833530745.25, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.05, + "format": "" + }, + "memory": { + "amount": 2981014393.25, + "format": "bytes" + } + } + } + } + } + }, + "medium_term": { + "duration_in_hours": 168, + "monitoring_start_time": "2024-07-24T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.82, + "format": "" + }, + "memory": { + "amount": 4980928870.9, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.82, + "format": "" + }, + "memory": { + "amount": 4980928870.9, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.179, + "format": "" + }, + "memory": { + "amount": 685961574.8999996, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.179, + "format": "" + }, + "memory": { + "amount": 2833445222.8999996, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 0.82, + "format": "" + }, + "memory": { + "amount": 4980928870.9, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.82, + "format": "" + }, + "memory": { + "amount": 4980928870.9, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.179, + "format": "" + }, + "memory": { + "amount": 685961574.8999996, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.179, + "format": "" + }, + "memory": { + "amount": 2833445222.8999996, + "format": "bytes" + } + } + } + } + } + }, + "short_term": { + "duration_in_hours": 24, + "monitoring_start_time": "2024-07-30T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.18, + "format": "" + }, + "memory": { + "amount": 3183712153.95, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.18, + "format": "" + }, + "memory": { + "amount": 3183712153.95, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.82, + "format": "" + }, + "memory": { + "amount": -1111255142.0500002, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.82, + "format": "" + }, + "memory": { + "amount": 1036228505.9499998, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 0.18, + "format": "" + }, + "memory": { + "amount": 3183712153.95, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.18, + "format": "" + }, + "memory": { + "amount": 3183712153.95, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.82, + "format": "" + }, + "memory": { + "amount": -1111255142.0500002, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.82, + "format": "" + }, + "memory": { + "amount": 1036228505.9499998, + "format": "bytes" + } + } + } + } + } + } + } + }, + "source_id": "120", + "workload": "pod_name3", + "workload_type": "replicationcontroller" + }, + { + "cluster_alias": "OpenShift on AWS", + "cluster_uuid": "8a3e59b7-23a8-4ed1-b1cf-afd5afea54b9", + "container": "pod_name7", + "id": "fea4c9fd-a6ce-4a60-99ca-e001b3d4a8b1", + "last_reported": "2024-07-31T11:00:21Z", + "project": "kube-system", + "recommendations": { + "current": { + "limits": { + "cpu": { + "amount": 1, + "format": "" + }, + "memory": { + "amount": 4294967296, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 1, + "format": "" + }, + "memory": { + "amount": 2147483648, + "format": "bytes" + } + } + }, + "monitoring_end_time": "2024-07-31T11:00:05Z", + "recommendation_terms": { + "long_term": { + "duration_in_hours": 359.8, + "monitoring_start_time": "2024-07-16T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.85, + "format": "" + }, + "memory": { + "amount": 5024785855.75, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.85, + "format": "" + }, + "memory": { + "amount": 5024785855.75, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.15, + "format": "" + }, + "memory": { + "amount": 729818559.75, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.15, + "format": "" + }, + "memory": { + "amount": 2877302207.75, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 1.04, + "format": "" + }, + "memory": { + "amount": 5024785855.75, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 1.04, + "format": "" + }, + "memory": { + "amount": 5024785855.75, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": 0.04, + "format": "" + }, + "memory": { + "amount": 729818559.75, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.04, + "format": "" + }, + "memory": { + "amount": 2877302207.75, + "format": "bytes" + } + } + } + } + } + }, + "medium_term": { + "duration_in_hours": 168, + "monitoring_start_time": "2024-07-24T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.89, + "format": "" + }, + "memory": { + "amount": 3443928116.4, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.89, + "format": "" + }, + "memory": { + "amount": 3443928116.4, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.109, + "format": "" + }, + "memory": { + "amount": -851039179.5999999, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.109, + "format": "" + }, + "memory": { + "amount": 1296444468.4, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 0.89, + "format": "" + }, + "memory": { + "amount": 3443928116.4, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.89, + "format": "" + }, + "memory": { + "amount": 3443928116.4, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.109, + "format": "" + }, + "memory": { + "amount": -851039179.5999999, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.109, + "format": "" + }, + "memory": { + "amount": 1296444468.4, + "format": "bytes" + } + } + } + } + } + }, + "short_term": { + "duration_in_hours": 24, + "monitoring_start_time": "2024-07-30T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.89, + "format": "" + }, + "memory": { + "amount": 1192731744.45, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.89, + "format": "" + }, + "memory": { + "amount": 1192731744.45, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.109, + "format": "" + }, + "memory": { + "amount": -3102235551.55, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.109, + "format": "" + }, + "memory": { + "amount": -954751903.55, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 0.89, + "format": "" + }, + "memory": { + "amount": 1192731744.45, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.89, + "format": "" + }, + "memory": { + "amount": 1192731744.45, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.109, + "format": "" + }, + "memory": { + "amount": -3102235551.55, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.109, + "format": "" + }, + "memory": { + "amount": -954751903.55, + "format": "bytes" + } + } + } + } + } + } + } + }, + "source_id": "120", + "workload": "pod_name7", + "workload_type": "deployment" + }, + { + "cluster_alias": "OpenShift on GCP - Nise Populator", + "cluster_uuid": "c32se93c-73z3-3s3d-cs23-d3245sj45349", + "container": "pod_name2a", + "id": "51e9a6e6-453e-4959-a663-39f78f44bf48", + "last_reported": "2024-07-31T11:00:18Z", + "project": "snowdown", + "recommendations": { + "current": { + "limits": { + "cpu": { + "amount": 1, + "format": "" + }, + "memory": { + "amount": 4294967296, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 1, + "format": "" + }, + "memory": { + "amount": 2147483648, + "format": "bytes" + } + } + }, + "monitoring_end_time": "2024-07-31T11:00:05Z", + "recommendation_terms": { + "long_term": { + "duration_in_hours": 359.8, + "monitoring_start_time": "2024-07-16T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.97, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.97, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.03, + "format": "" + }, + "memory": { + "amount": 858993459.1999998, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.03, + "format": "" + }, + "memory": { + "amount": 3006477107.2, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 0.97, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.97, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.03, + "format": "" + }, + "memory": { + "amount": 858993459.1999998, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.03, + "format": "" + }, + "memory": { + "amount": 3006477107.2, + "format": "bytes" + } + } + } + } + } + }, + "medium_term": { + "duration_in_hours": 168, + "monitoring_start_time": "2024-07-24T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.82, + "format": "" + }, + "memory": { + "amount": 4704715766.4, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.82, + "format": "" + }, + "memory": { + "amount": 4704715766.4, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.18, + "format": "" + }, + "memory": { + "amount": 409748470.3999996, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.18, + "format": "" + }, + "memory": { + "amount": 2557232118.3999996, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 0.82, + "format": "" + }, + "memory": { + "amount": 4704715766.4, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.82, + "format": "" + }, + "memory": { + "amount": 4704715766.4, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.18, + "format": "" + }, + "memory": { + "amount": 409748470.3999996, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.18, + "format": "" + }, + "memory": { + "amount": 2557232118.3999996, + "format": "bytes" + } + } + } + } + } + }, + "short_term": { + "duration_in_hours": 24, + "monitoring_start_time": "2024-07-30T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.25, + "format": "" + }, + "memory": { + "amount": 1706058183.05, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.25, + "format": "" + }, + "memory": { + "amount": 1706058183.05, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.75, + "format": "" + }, + "memory": { + "amount": -2588909112.95, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.75, + "format": "" + }, + "memory": { + "amount": -441425464.95000005, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 0.25, + "format": "" + }, + "memory": { + "amount": 1706058183.05, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.25, + "format": "" + }, + "memory": { + "amount": 1706058183.05, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.75, + "format": "" + }, + "memory": { + "amount": -2588909112.95, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.75, + "format": "" + }, + "memory": { + "amount": -441425464.95000005, + "format": "bytes" + } + } + } + } + } + } + } + }, + "source_id": "256103", + "workload": "pod_name2a", + "workload_type": "deploymentconfig" + }, + { + "cluster_alias": "OpenShift on GCP - Nise Populator", + "cluster_uuid": "c32se93c-73z3-3s3d-cs23-d3245sj45349", + "container": "pod_apiserver", + "id": "de51e70f-97fc-43e6-b60d-8d1f74840003", + "last_reported": "2024-07-31T11:00:18Z", + "project": "openshift-kube-apiserver", + "recommendations": { + "current": { + "limits": { + "cpu": { + "amount": 1, + "format": "" + }, + "memory": { + "amount": 4294967296, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 1, + "format": "" + }, + "memory": { + "amount": 2147483648, + "format": "bytes" + } + } + }, + "monitoring_end_time": "2024-07-31T11:00:05Z", + "recommendation_terms": { + "long_term": { + "duration_in_hours": 359.8, + "monitoring_start_time": "2024-07-16T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.66, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.66, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.339, + "format": "" + }, + "memory": { + "amount": 858993459.1999998, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.339, + "format": "" + }, + "memory": { + "amount": 3006477107.2, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 1.06, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 1.06, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": 0.06, + "format": "" + }, + "memory": { + "amount": 858993459.1999998, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.06, + "format": "" + }, + "memory": { + "amount": 3006477107.2, + "format": "bytes" + } + } + } + } + } + }, + "medium_term": { + "duration_in_hours": 168, + "monitoring_start_time": "2024-07-24T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.66, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.66, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.339, + "format": "" + }, + "memory": { + "amount": 858993459.1999998, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.339, + "format": "" + }, + "memory": { + "amount": 3006477107.2, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 1, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 1, + "format": "" + }, + "memory": { + "amount": 5153960755.2, + "format": "bytes" + } + } + }, + "notifications": { + "323004": { + "code": 323004, + "message": + "Workload is optimised wrt CPU REQUESTS, no changes needed", + "type": "notice" + }, + "323005": { + "code": 323005, + "message": + "Workload is optimised wrt CPU LIMITS, no changes needed", + "type": "notice" + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "format": "cores" + }, + "memory": { + "amount": 858993459.1999998, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "format": "cores" + }, + "memory": { + "amount": 3006477107.2, + "format": "bytes" + } + } + } + } + } + }, + "short_term": { + "duration_in_hours": 24, + "monitoring_start_time": "2024-07-30T11:00:05Z", + "recommendation_engines": { + "cost": { + "config": { + "limits": { + "cpu": { + "amount": 0.32, + "format": "" + }, + "memory": { + "amount": 2181388119.6, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.32, + "format": "" + }, + "memory": { + "amount": 2181388119.6, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.679, + "format": "" + }, + "memory": { + "amount": -2113579176.4, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.679, + "format": "" + }, + "memory": { + "amount": 33904471.599999905, + "format": "bytes" + } + } + } + }, + "performance": { + "config": { + "limits": { + "cpu": { + "amount": 0.32, + "format": "" + }, + "memory": { + "amount": 2181388119.6, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": 0.32, + "format": "" + }, + "memory": { + "amount": 2181388119.6, + "format": "bytes" + } + } + }, + "pods_count": 1, + "variation": { + "limits": { + "cpu": { + "amount": -0.679, + "format": "" + }, + "memory": { + "amount": -2113579176.4, + "format": "bytes" + } + }, + "requests": { + "cpu": { + "amount": -0.679, + "format": "" + }, + "memory": { + "amount": 33904471.599999905, + "format": "bytes" + } + } + } + } + } + } + } + }, + "source_id": "256103", + "workload": "pod_apiserver", + "workload_type": "deploymentconfig" + } + ], + "meta": { + "count": 53, + "limit": 10, + "offset": 0 + }, + "links": { + "first": + "/api/cost-management/v1/recommendations/openshift?limit=10\u0026offset=0\u0026order_by=last_reported\u0026order_how=desc", + "next": "/api/cost-management/v1/recommendations/openshift?limit=10\u0026offset=10\u0026order_by=last_reported\u0026order_how=desc", + "last": "/api/cost-management/v1/recommendations/openshift?limit=10\u0026offset=10\u0026order_by=last_reported\u0026order_how=desc" + } +} diff --git a/workspaces/resource-optimization/plugins/resource-optimization-common/src/client/private/test-helpers.ts b/workspaces/resource-optimization/plugins/resource-optimization-common/src/client/private/test-helpers.ts new file mode 100644 index 0000000000..f3f1ac0575 --- /dev/null +++ b/workspaces/resource-optimization/plugins/resource-optimization-common/src/client/private/test-helpers.ts @@ -0,0 +1,13 @@ +export function makePlotsDataPropertyPathWithTerm( + term: 'short' | 'medium' | 'long', + dateString: string, +) { + return [ + 'recommendations', + 'recommendationTerms', + `${term}Term`, + 'plots', + 'plotsData', + dateString, + ]; +}