Skip to content

Commit

Permalink
Feature/con 30519 rightsizing rollback api (#672)
Browse files Browse the repository at this point in the history
  • Loading branch information
shirbur authored Nov 26, 2024
1 parent 884a645 commit 6c69b32
Show file tree
Hide file tree
Showing 6 changed files with 140 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
in: query
name: clusterIdentifier
schema:
type: string
required: true
example: dev-cluster
description: >
Identifier of cluster.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
post:
summary: "Acknowledge Rightsizing Rollbacks"
description: |
Acknowledge rightsizing rollbacks For ocean cluster.
operationId: "AcknowledgeRightsizingRollbacks"
tags:
- "Ocean Automatic Rightsizing"
parameters:
- $ref: "../parameters/oceanId.yaml"
- $ref: "../parameters/clusterIdentifier.yaml"
- $ref: "../../../../commons/parameters/accountId.yaml"
requestBody:
required: true
content:
application/json:
schema:
allOf:
- $ref: "../schemas/oceanRightsizingRollbacksAcknowledgeRequest.yaml"
responses:
200:
description: Ocean Rightsizing Acknowledge Rollbacks Response
content:
application/json:
schema:
allOf:
- $ref: "../../../../commons/schemas/responseWrapper.yaml"
400:
description: "Bad Request"
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
get:
summary: "List Ocean Rightsizing Rollbacks"
description: List the rightsizing rollback for ocean cluster.
operationId: "oceanRightsizingRollbackList"
tags:
- "Ocean Automatic Rightsizing"
parameters:
- $ref: "../parameters/oceanId.yaml"
- $ref: "../../../../commons/parameters/accountId.yaml"

responses:
200:
$ref: "../responses/oceanRightsizingRollbacksResponse.yaml"
400:
description: "Bad Request"
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
description: Ocean Rightsizing Rollbacks Response
content:
application/json:
schema:
allOf:
- $ref: "../../../../commons/schemas/responseItemWrapper.yaml"
- type: object
properties:
request:
type: object
properties:
url:
example: "/ocean/{oceanId}/rightSizing/rollbacks"
method:
example: "GET"
response:
type: object
properties:
items:
type: array
items:
type: object
properties:
clusterIdentifier:
type: string
description: The cluster identifier
example: test-k8s
namespace:
type: string
description: The namespace of the workload
example: kube-system
resourceType:
type: string
description: The type of the resource
example: deployment
resourceName:
type: string
description: The name of the resource
example: resource-name
rollbackType:
type: string
description: The type of the rollback
example: OUT_OF_MEMORY
rollbackTime:
type: string
format: date-time
description: The time of the rollback
example: 2024-11-01T10:50:29.000+0000
cpuAtRollback:
type: number
description: The cpu at the time of the rollback
example: 0.23
cpuAfterRollback:
type: number
description: The cpu after the rollback
example: 0.33
memoryAtRollback:
type: number
description: The memory at the time of the rollback
example: 128
memoryAfterRollback:
type: number
description: The memory after the rollback
example: 185
kind:
example: "mcs:ocean:rightsizing:rollback"
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
type: object
properties:
acknowledgeRollbacks:
type: array
items:
type: object
properties:
namespace:
type: string
description: The namespace of the workload
example: kube-system
resourceType:
type: string
description: The type of the resource
example: deployment
resourceName:
type: string
description: The name of the resource
example: resource-name
4 changes: 4 additions & 0 deletions api/spot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -925,3 +925,7 @@ paths:
$ref: services/ocean/rightsizing/paths/oceanRightsizingRuleDetachment.yaml
/ocean/{oceanId}/rightSizing/recommendations:
$ref: services/ocean/rightsizing/paths/oceanRightsizingRecommendations.yaml
/ocean/{oceanId}/rightSizing/rollbacks:
$ref: services/ocean/rightsizing/paths/oceanRightsizingRollbacks.yaml
/ocean/{oceanId}/rightSizing/rollbacks/acknowledge:
$ref: services/ocean/rightsizing/paths/oceanRightsizingAcknowledgeRollbacks.yaml

0 comments on commit 6c69b32

Please sign in to comment.