Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
in: query
name: clusterIdentifier
schema:
type: string
required: false
example: dev-cluster
description: >
Identifier of the cluster from which recommendation history should be retrieved.
14 changes: 14 additions & 0 deletions api/services/ocean/rightsizing/parameters/containerNames.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
in: query
name: containerNames
required: true
description: >
List of container names to filter by.
style: form
explode: true
schema:
type: array
items:
type: string
example:
- app
- sidecar
10 changes: 10 additions & 0 deletions api/services/ocean/rightsizing/parameters/fromDate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
in: query
name: fromDate
schema:
type: integer
format: int64
required: true
example: 1717200000000
description: >
Start time filter as Unix epoch timestamp in milliseconds.

9 changes: 9 additions & 0 deletions api/services/ocean/rightsizing/parameters/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
in: path
name: namespace
schema:
type: string
required: true
example: default
description: >
Namespace of the workload.

10 changes: 10 additions & 0 deletions api/services/ocean/rightsizing/parameters/toDate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
in: query
name: toDate
schema:
type: integer
format: int64
required: false
example: 1719800000000
description: >
End time filter as Unix epoch timestamp in milliseconds.

9 changes: 9 additions & 0 deletions api/services/ocean/rightsizing/parameters/workloadName.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
in: path
name: workloadName
schema:
type: string
required: true
example: checkout-service
description: >
Name of the workload.

9 changes: 9 additions & 0 deletions api/services/ocean/rightsizing/parameters/workloadType.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
in: path
name: workloadType
schema:
type: string
required: true
example: deployment
description: >
Type of the workload.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
get:
summary: "Get Ocean Rightsizing Recommendation History"
description: |
Get right-sizing recommendation history for a specific workload in an Ocean cluster.
operationId: "oceanRightsizingRecommendationHistory"
tags:
- "Ocean Automatic Rightsizing"
parameters:
- $ref: "../parameters/oceanId.yaml"
- $ref: "../parameters/namespace.yaml"
- $ref: "../parameters/workloadType.yaml"
- $ref: "../parameters/workloadName.yaml"
- $ref: "../../../../commons/parameters/accountId.yaml"
- $ref: "../parameters/clusterIdentifierOptional.yaml"
- $ref: "../parameters/fromDate.yaml"
- $ref: "../parameters/toDate.yaml"
- $ref: "../parameters/containerNames.yaml"
responses:
200:
$ref: "../responses/oceanRightsizingRecommendationHistoryResponse.yaml"
400:
description: "Bad Request"

Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
description: "Ocean Rightsizing Recommendation History Response"
content:
application/json:
schema:
allOf:
- $ref: "../../../../commons/schemas/responseItemWrapper.yaml"
- type: object
properties:
request:
type: object
properties:
url:
example: "/ocean/o-abcd1234/rightSizing/namespaces/default/deployment/checkout-service/recommendation-history?accountId=act-123456789&fromDate=1717200000000&clusterIdentifier=dev-cluster"
method:
example: "GET"
response:
type: object
properties:
items:
type: array
items:
type: object
properties:
recommendations:
type: array
items:
$ref: "../schemas/oceanRightsizingRecommendationHistoryItem.yaml"
example:
- recommendations:
- podCount: 1
cpu:
requested: 0.01
recommended: 0.01
limit: 0.02
p99: 0
p95: 0
p90: 0
p85: 0
memory:
requested: 32
recommended: 32
limit: 64
p100: 7.59
p95: 7.56
p90: 7.56
p85: 7.53
recommendedAt: 1783313815984
count:
example: 1
kind:
example: "mcs:ocean:rightSizing:clusterResourceRecommendationsHistory"
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
type: object
title: Ocean Rightsizing Recommendation History Item
description: >
Recommendation snapshot for a workload at a specific point in time.
properties:
podCount:
type: integer
description: Number of pods in the workload at recommendation time.
cpu:
type: object
description: CPU recommendation details.
properties:
requested:
type: number
recommended:
type: number
limit:
type: number
p99:
type: number
p95:
type: number
p90:
type: number
p85:
type: number
memory:
type: object
description: Memory recommendation details.
properties:
requested:
type: number
recommended:
type: number
limit:
type: number
p100:
type: number
p95:
type: number
p90:
type: number
p85:
type: number
recommendedAt:
type: integer
format: int64
description: Unix epoch timestamp in milliseconds when the recommendation was generated.
2 changes: 2 additions & 0 deletions api/spot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1025,6 +1025,8 @@ paths:
$ref: services/ocean/rightsizing/paths/oceanRightsizingRuleDetachment.yaml
/ocean/{oceanId}/rightSizing/recommendations:
$ref: services/ocean/rightsizing/paths/oceanRightsizingRecommendations.yaml
/ocean/{oceanId}/rightSizing/namespaces/{namespace}/{workloadType}/{workloadName}/recommendation-history:
$ref: services/ocean/rightsizing/paths/oceanRightsizingRecommendationHistory.yaml
/ocean/{oceanId}/rightSizing/rollbacks:
$ref: services/ocean/rightsizing/paths/oceanRightsizingRollbacks.yaml
/ocean/{oceanId}/rightSizing/rollbacks/acknowledge:
Expand Down
Loading