From 56fead8e1627cd5144e7a677ad792c5dd6900862 Mon Sep 17 00:00:00 2001 From: cshivaraj-patil Date: Fri, 5 Jun 2026 12:49:01 +0530 Subject: [PATCH 1/2] SPOTCON-37598-delete-the-api-doc-for-v-1 Deleted V1 rightsizing API docs --- api/services/ocean/aws/paths/rightSizing.yaml | 22 ------- .../aws/responses/rightSizingResponse.yaml | 63 ------------------- .../schemas/rightSizingRecommendation.yaml | 31 --------- api/spot.yaml | 2 - 4 files changed, 118 deletions(-) delete mode 100644 api/services/ocean/aws/paths/rightSizing.yaml delete mode 100644 api/services/ocean/aws/responses/rightSizingResponse.yaml delete mode 100644 api/services/ocean/aws/schemas/rightSizingRecommendation.yaml diff --git a/api/services/ocean/aws/paths/rightSizing.yaml b/api/services/ocean/aws/paths/rightSizing.yaml deleted file mode 100644 index 6a6fec0b6..000000000 --- a/api/services/ocean/aws/paths/rightSizing.yaml +++ /dev/null @@ -1,22 +0,0 @@ -post: - summary: "Fetch Right Sizing Recommendations" - description: > - Get right-sizing recommendations for an Ocean cluster and filter them according to namespace or label. - operationId: "oceanAwsFilterRightSizingWithFilter" - tags: - - "Ocean AWS" - parameters: - - $ref: "../../commons/parameters/oceanClusterId.yaml" - - $ref: "../../../../commons/parameters/accountId.yaml" - requestBody: - required: false - content: - application/json: - schema: - allOf: - - $ref: "../../commons/rightSizingWithFilter.yaml" - responses: - 200: - $ref: "../responses/rightSizingResponse.yaml" - 400: - description: "Bad Request" diff --git a/api/services/ocean/aws/responses/rightSizingResponse.yaml b/api/services/ocean/aws/responses/rightSizingResponse.yaml deleted file mode 100644 index 914cfe205..000000000 --- a/api/services/ocean/aws/responses/rightSizingResponse.yaml +++ /dev/null @@ -1,63 +0,0 @@ -description: Ocean Right Sizing Recommendation Response -content: - application/json: - schema: - allOf: - - $ref: "../../../../commons/schemas/responseItemWrapper.yaml" - - type: object - properties: - request: - type: object - properties: - url: - example: "/ocean/aws/k8s/cluster/o-abcd1234/rightSizing/suggestion" - method: - example: "POST" - response: - type: object - properties: - items: - type: array - items: - $ref: "../schemas/rightSizingRecommendation.yaml" - example: - - resourceName: "redis-controller" - resourceType: "deployment" - namespace: "kube-system" - suggestedCPU: 4 - suggestedMemory: 19 - requestedCPU: 50 - requestedMemory: 50 - containers: - - name: "dnsmasq" - requestedCPU: 10 - suggestedCPU: 2 - requestedMemory: 40 - suggestedMemory: 15 - - name: "sidecar" - requestedCPU: 40 - suggestedCPU: 2 - requestedMemory: 10 - suggestedMemory: 4 - - resourceName: "test-redis" - resourceType: "deployment" - namespace: "sparkSpace" - suggestedCPU: 2 - suggestedMemory: 20 - requestedCPU: 50 - requestedMemory: 30 - containers: - - name: "dns-controller" - requestedCPU: 20 - suggestedCPU: 1 - requestedMemory: 20 - suggestedMemory: 15 - - name: "kubedns" - requestedCPU: 30 - suggestedCPU: 1 - requestedMemory: 10 - suggestedMemory: 5 - count: - example: 2 - kind: - example: "spotinst:ocean:aws:k8s:cluster:rightSizing:suggestion" diff --git a/api/services/ocean/aws/schemas/rightSizingRecommendation.yaml b/api/services/ocean/aws/schemas/rightSizingRecommendation.yaml deleted file mode 100644 index 917a0da2b..000000000 --- a/api/services/ocean/aws/schemas/rightSizingRecommendation.yaml +++ /dev/null @@ -1,31 +0,0 @@ -type: object -properties: - resourceName: - type: string - resourceType: - type: string - namespace: - type: string - suggestedCPU: - type: integer - suggestedMemory: - type: integer - requestedCPU: - type: integer - requestedMemory: - type: integer - containers: - type: array - items: - type: object - properties: - name: - type: string - requestedCPU: - type: integer - suggestedCPU: - type: integer - requestedMemory: - type: integer - suggestedMemory: - type: integer \ No newline at end of file diff --git a/api/spot.yaml b/api/spot.yaml index 221ec41f3..b3a63f02e 100644 --- a/api/spot.yaml +++ b/api/spot.yaml @@ -516,8 +516,6 @@ paths: $ref: services/ocean/aws/paths/clusterFetchElastilog.yaml /ocean/aws/k8s/cluster/autoScalingGroup/import: $ref: services/ocean/aws/paths/importASG.yaml - /ocean/aws/k8s/cluster/{oceanClusterId}/rightSizing/suggestion: - $ref: services/ocean/aws/paths/rightSizing.yaml /ocean/aws/k8s/cluster/{oceanClusterId}/instanceTypeFiltersSimulation: $ref: services/ocean/aws/paths/instanceTypeFiltersSimulation.yaml /ocean/aws/k8s/cluster/{oceanClusterId}/allowedInstanceTypes: From 00bf79756993499d03463c269b1b8c98eda09541 Mon Sep 17 00:00:00 2001 From: cshivaraj-patil Date: Wed, 10 Jun 2026 12:49:37 +0530 Subject: [PATCH 2/2] Remove remaining v1 Rightsizing suggestion API docs - Removed ECS v1 Rightsizing suggestion API documentation: - `/ocean/aws/ecs/cluster/{oceanClusterId}/rightSizing/suggestion` - Removed GKE v1 Rightsizing suggestion API documentation: - `/ocean/gcp/k8s/cluster/{oceanId}/rightSizing/suggestion` - Removed AKS v1 Rightsizing suggestion API documentation: - `/ocean/azure/np/cluster/{oceanClusterId}/rightSizing/suggestion` --- api/services/ocean/aks/paths/rightSizing.yaml | 22 ------ .../aks/responses/rightSizingSearch.yaml | 63 ----------------- .../schemas/rightSizingRecommendation.yaml | 31 --------- .../ocean/commons/rightSizingWithFilter.yaml | 44 ------------ .../ecs/paths/right-sizing-recommend.yaml | 15 ---- .../ocean/ecs/responses/rightSizing.yaml | 17 ----- .../ocean/ecs/schemas/rightSizing.yaml | 23 ------- api/services/ocean/gke/paths/rightSizing.yaml | 22 ------ .../ocean/gke/paths/rightSizingLegacy.yaml | 16 ----- .../responses/rightSizingLegacyResponse.yaml | 56 --------------- .../gke/responses/rightSizingResponse.yaml | 69 ------------------- api/spot.yaml | 7 -- 12 files changed, 385 deletions(-) delete mode 100644 api/services/ocean/aks/paths/rightSizing.yaml delete mode 100644 api/services/ocean/aks/responses/rightSizingSearch.yaml delete mode 100644 api/services/ocean/aks/schemas/rightSizingRecommendation.yaml delete mode 100644 api/services/ocean/commons/rightSizingWithFilter.yaml delete mode 100644 api/services/ocean/ecs/paths/right-sizing-recommend.yaml delete mode 100644 api/services/ocean/ecs/responses/rightSizing.yaml delete mode 100644 api/services/ocean/ecs/schemas/rightSizing.yaml delete mode 100644 api/services/ocean/gke/paths/rightSizing.yaml delete mode 100644 api/services/ocean/gke/paths/rightSizingLegacy.yaml delete mode 100644 api/services/ocean/gke/responses/rightSizingLegacyResponse.yaml delete mode 100644 api/services/ocean/gke/responses/rightSizingResponse.yaml diff --git a/api/services/ocean/aks/paths/rightSizing.yaml b/api/services/ocean/aks/paths/rightSizing.yaml deleted file mode 100644 index 78d2a2ec9..000000000 --- a/api/services/ocean/aks/paths/rightSizing.yaml +++ /dev/null @@ -1,22 +0,0 @@ -post: - summary: "Fetch Right Sizing Recommendations" - description: > - Get right-sizing recommendations for an Ocean cluster and filter them according to namespace or label. - operationId: "oceanAKSFilterRightSizingWithFilter" - tags: - - "Ocean AKS" - parameters: - - $ref: "../../commons/parameters/oceanClusterId.yaml" - - $ref: "../../../../commons/parameters/accountId.yaml" - requestBody: - required: false - content: - application/json: - schema: - allOf: - - $ref: "../../commons/rightSizingWithFilter.yaml" - responses: - 200: - $ref: "../responses/rightSizingSearch.yaml" - 400: - description: "Bad Request" diff --git a/api/services/ocean/aks/responses/rightSizingSearch.yaml b/api/services/ocean/aks/responses/rightSizingSearch.yaml deleted file mode 100644 index 37cea0f19..000000000 --- a/api/services/ocean/aks/responses/rightSizingSearch.yaml +++ /dev/null @@ -1,63 +0,0 @@ -description: Ocean RightSizing Recommendation Response -content: - application/json: - schema: - allOf: - - $ref: "../../../../commons/schemas/responseItemWrapper.yaml" - - type: object - properties: - request: - type: object - properties: - url: - example: "/ocean/azure/np/cluster/o-abcd1234/rightSizing/suggestion" - method: - example: "POST" - response: - type: object - properties: - items: - type: array - items: - $ref: "../schemas/rightSizingRecommendation.yaml" - example: - - resourceName: "redis-controller" - resourceType: "deployment" - namespace: "kube-system" - suggestedCPU: 4 - suggestedMemory: 19 - requestedCPU: 50 - requestedMemory: 50 - containers: - - name: "dnsmasq" - requestedCPU: 10 - suggestedCPU: 2 - requestedMemory: 40 - suggestedMemory: 15 - - name: "sidecar" - requestedCPU: 40 - suggestedCPU: 2 - requestedMemory: 10 - suggestedMemory: 4 - - resourceName: "test-redis" - resourceType: "deployment" - namespace: "sparkSpace" - suggestedCPU: 2 - suggestedMemory: 20 - requestedCPU: 50 - requestedMemory: 30 - containers: - - name: "dns-controller" - requestedCPU: 20 - suggestedCPU: 1 - requestedMemory: 20 - suggestedMemory: 15 - - name: "kubedns" - requestedCPU: 30 - suggestedCPU: 1 - requestedMemory: 10 - suggestedMemory: 5 - count: - example: 2 - kind: - example: "spotinst:ocean:azure:k8s:cluster:rightSizing:suggestion" diff --git a/api/services/ocean/aks/schemas/rightSizingRecommendation.yaml b/api/services/ocean/aks/schemas/rightSizingRecommendation.yaml deleted file mode 100644 index c32460bf0..000000000 --- a/api/services/ocean/aks/schemas/rightSizingRecommendation.yaml +++ /dev/null @@ -1,31 +0,0 @@ -type: object -properties: - resourceName: - type: string - resourceType: - type: string - namespace: - type: string - suggestedCPU: - type: integer - suggestedMemory: - type: integer - requestedCPU: - type: integer - requestedMemory: - type: integer - containers: - type: array - items: - type: object - properties: - name: - type: string - requestedCPU: - type: integer - suggestedCPU: - type: integer - requestedMemory: - type: integer - suggestedMemory: - type: integer \ No newline at end of file diff --git a/api/services/ocean/commons/rightSizingWithFilter.yaml b/api/services/ocean/commons/rightSizingWithFilter.yaml deleted file mode 100644 index fad25b5ac..000000000 --- a/api/services/ocean/commons/rightSizingWithFilter.yaml +++ /dev/null @@ -1,44 +0,0 @@ -type: object -properties: - filter: - type: object - description: | - Optional - may be null. - properties: - namespaces: - type: array - description: | - Optional - may be null. If exists - should contain at least 1 item. - items: - type: string - example: [ "sparkSpace", "kube-system" ] - attribute: - type: object - description: | - Optional - may be null. - required: - - type - - key - properties: - type: - type: string - enum: [label, annotation] - example: label - key: - type: string - description: | - May be any string, but shouldn't be empty. - example: app - operator: - type: string - description: | - Optional - may be null. - enum: [Equals, notEquals, exists, doesNotExist] - default: "Equals" - example: "Equals" - value: - type: string - description: | - Required whenever the operator is "equals" or "notEquals". | - If exists, may be any string. - example: redis \ No newline at end of file diff --git a/api/services/ocean/ecs/paths/right-sizing-recommend.yaml b/api/services/ocean/ecs/paths/right-sizing-recommend.yaml deleted file mode 100644 index a8dfa9d3e..000000000 --- a/api/services/ocean/ecs/paths/right-sizing-recommend.yaml +++ /dev/null @@ -1,15 +0,0 @@ -get: - summary: "Get Right Sizing Recommendations" - description: | - Get right-sizing recommendations for an Ocean cluster. - operationId: "oceanEcsGetRightSizingRecommend" - tags: - - Ocean ECS - parameters: - - $ref: "../../../../commons/parameters/accountId.yaml" - - $ref: "../../commons/parameters/oceanClusterId.yaml" - responses: - 200: - $ref: "../responses/rightSizing.yaml" - 400: - description: "Bad Request" diff --git a/api/services/ocean/ecs/responses/rightSizing.yaml b/api/services/ocean/ecs/responses/rightSizing.yaml deleted file mode 100644 index 3fa99dff7..000000000 --- a/api/services/ocean/ecs/responses/rightSizing.yaml +++ /dev/null @@ -1,17 +0,0 @@ -description: Ocean ECS Right Sizing Response -content: - application/json: - schema: - allOf: - - $ref: "../../../../commons/schemas/responseItemWrapper.yaml" - - type: object - properties: - response: - type: object - properties: - items: - type: array - items: - $ref: "../schemas/rightSizing.yaml" - kind: - example: "spotinst:ocean:aws:ecs:cluster:rightSizing:resourceSuggestion" diff --git a/api/services/ocean/ecs/schemas/rightSizing.yaml b/api/services/ocean/ecs/schemas/rightSizing.yaml deleted file mode 100644 index 219909fa6..000000000 --- a/api/services/ocean/ecs/schemas/rightSizing.yaml +++ /dev/null @@ -1,23 +0,0 @@ -type: object -properties: - - suggestedMemory: - type: integer - example: 2 - - requestedMemory: - type: integer - example: 100 - - serviceName: - type: string - readOnly: true - example: "sg-test" - - suggestedCpu: - type: integer - example: 0 - - requestedCpu: - type: integer - example: 128 \ No newline at end of file diff --git a/api/services/ocean/gke/paths/rightSizing.yaml b/api/services/ocean/gke/paths/rightSizing.yaml deleted file mode 100644 index 6cd320a26..000000000 --- a/api/services/ocean/gke/paths/rightSizing.yaml +++ /dev/null @@ -1,22 +0,0 @@ -post: - summary: "Get Right Sizing Recommendations" - description: > - Get right-sizing recommendations for an Ocean cluster and filter them according to namespace or label. - operationId: "oceanGkeGetRightSizingRecommendationsWithFilter" - tags: - - "Ocean GKE" - parameters: - - $ref: "../../../../commons/parameters/accountId.yaml" - - $ref: "../parameters/oceanId.yaml" - requestBody: - required: false - content: - application/json: - schema: - allOf: - - $ref: "../../commons/rightSizingWithFilter.yaml" - responses: - 200: - $ref: "../responses/rightSizingResponse.yaml" - 400: - description: "Bad Request" diff --git a/api/services/ocean/gke/paths/rightSizingLegacy.yaml b/api/services/ocean/gke/paths/rightSizingLegacy.yaml deleted file mode 100644 index ba0d0d47c..000000000 --- a/api/services/ocean/gke/paths/rightSizingLegacy.yaml +++ /dev/null @@ -1,16 +0,0 @@ -get: - summary: "Filter Right-Sizing Recommendations - Legacy" - description: > - Get right-sizing recommendations for an Ocean cluster and filter them according to namespace or label. - operationId: "oceanGkeGetRightSizingRecommendationsLegacy" - tags: - - "Ocean GKE" - parameters: - - $ref: "../../../../commons/parameters/accountId.yaml" - - $ref: "../../commons/parameters/oceanId.yaml" - - $ref: "../../commons/parameters/namespace.yaml" - responses: - 200: - $ref: "../responses/rightSizingLegacyResponse.yaml" - 400: - description: "Bad Request" diff --git a/api/services/ocean/gke/responses/rightSizingLegacyResponse.yaml b/api/services/ocean/gke/responses/rightSizingLegacyResponse.yaml deleted file mode 100644 index 41f23c9e9..000000000 --- a/api/services/ocean/gke/responses/rightSizingLegacyResponse.yaml +++ /dev/null @@ -1,56 +0,0 @@ -description: Ocean RightSizing Recommendation (Legacy) Response -content: - application/json: - schema: - type: object - properties: - suggestions: - type: array - items: - - type: object - properties: - namespace: - type: string - example: myNamespace - deploymentName: - type: string - example: coredns - suggestedCPU: - type: number - format: float - example: 0.12225669 - suggestedMemory: - type: integer - example: 550 - requestedCPU: - type: number - format: float - example: 5.5 - requestedMemory: - type: integer - example: 1024 - - type: object - properties: - namespace: - type: string - example: myNamespace - deploymentName: - type: string - example: spark - suggestedCPU: - type: number - format: float - example: 0.13 - suggestedMemory: - type: integer - example: 250 - requestedCPU: - type: number - format: float - example: 2.5 - requestedMemory: - type: integer - example: 512 - - - diff --git a/api/services/ocean/gke/responses/rightSizingResponse.yaml b/api/services/ocean/gke/responses/rightSizingResponse.yaml deleted file mode 100644 index 2796808f5..000000000 --- a/api/services/ocean/gke/responses/rightSizingResponse.yaml +++ /dev/null @@ -1,69 +0,0 @@ -description: Ocean RightSizing Recommendation Response -content: - application/json: - schema: - type: "object" - properties: - response: - type: object - properties: - status: - type: object - properties: - code: - type: integer - example: 200 - message: - type: string - example: OK - kind: - type: string - example: spotinst:ocean:aws:k8s:cluster:rightSizing:resourceSuggestion - items: - type: "array" - items: - type: object - properties: - resourceName: - type: string - example: "dns-controller" - resourceType: - type: string - example: "deployment" - namespace: - type: string - example: "kube-system" - suggestedCPU: - type: integer - example: 1 - suggestedMemory: - type: integer - example: 19 - requestedCPU: - type: integer - example: 50 - requestedMemory: - type: integer - example: 50 - example: - - resourceName: "dns-controller" - resourceType: "deployment" - namespace: "kube-system" - suggestedCPU: 1 - suggestedMemory: 19 - requestedCPU: 50 - requestedMemory: 50 - - resourceName: "kube-dns" - resourceType: "daemonSet" - namespace: "kube-system" - suggestedCPU: 2 - suggestedMemory: 20 - requestedCPU: 10 - requestedMemory: 30 - count: - type: integer - example: 2 - - - - diff --git a/api/spot.yaml b/api/spot.yaml index b3a63f02e..d474fb4f0 100644 --- a/api/spot.yaml +++ b/api/spot.yaml @@ -456,8 +456,6 @@ paths: $ref: services/ocean/ecs/paths/cluster-import.yaml /ocean/aws/ecs/cluster/{oceanClusterId}/log: $ref: services/ocean/ecs/paths/clusterFetchElastilog.yaml - /ocean/aws/ecs/cluster/{oceanClusterId}/rightSizing/suggestion: - $ref: services/ocean/ecs/paths/right-sizing-recommend.yaml /ocean/aws/ecs/cluster/{oceanClusterId}/instanceTypeFiltersSimulation: $ref: services/ocean/ecs/paths/instanceTypeFiltersSimulation.yaml /ocean/aws/ecs/cluster/{oceanClusterId}/allowedInstanceTypes: @@ -678,15 +676,12 @@ paths: $ref: services/ocean/gke/paths/detachInstances.yaml /ocean/gcp/k8s/cluster/{oceanClusterId}/log: $ref: services/ocean/gke/paths/clusterFetchElastilog.yaml - /ocean/gcp/k8s/cluster/{oceanId}/rightSizing/suggestion: - $ref: services/ocean/gke/paths/rightSizing.yaml /ocean/gcp/k8s/cluster/{oceanClusterId}/aggregatedCosts: $ref: services/ocean/gke/paths/cluster-aggregated-costs.yaml /ocean/gcp/k8s/cluster/{oceanClusterId}/aggregatedCosts/summary: $ref: services/ocean/gke/paths/cluster-aggregated-costs-summary.yaml /ocean/gcp/k8s/cluster/{oceanClusterId}/instanceTypeFiltersSimulation: $ref: services/ocean/gke/paths/instanceTypeFiltersSimulation.yaml - # $ref: services/ocean/gke/paths/rightSizingLegacy.yaml - deprecated /ocean/gcp/k8s/launchSpec: $ref: services/ocean/gke/paths/clusters-launchSpec.yaml /ocean/gcp/k8s/launchSpec/import: @@ -737,8 +732,6 @@ paths: $ref: services/ocean/aks/paths/migration-get.yaml /ocean/azure/np/cluster/{oceanClusterId}/migration/{migrationId}/stop: $ref: services/ocean/aks/paths/migration-stop.yaml - /ocean/azure/np/cluster/{oceanClusterId}/rightSizing/suggestion: - $ref: services/ocean/aks/paths/rightSizing.yaml /ocean/azure/np/cluster/{oceanClusterId}/log: $ref: services/ocean/aks/paths/clusterFetchElastilog.yaml /ocean/azure/np/cluster/{oceanClusterId}/autoUpgrade: