Skip to content

Commit

Permalink
feature/CON-23200_Get_unmanaged_nodes_and_nodepools (#555)
Browse files Browse the repository at this point in the history
* feature/CON-23200_Get_unmanaged_nodes_and_nodepools

* fixes

* fixes

---------

Co-authored-by: avitalwerz <[email protected]>
  • Loading branch information
lionelresnik and avitalwerz authored Nov 29, 2023
1 parent 3f9c110 commit 404b174
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
22 changes: 22 additions & 0 deletions api/services/ocean/aksV2/paths/workloadMigrationDiscovery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
get:
summary: "Get Migration Discovery"
description: |
Get information about nodes which can be migrated into Ocean.
operationId: "oceanAksV2GetMigrationDiscovery"
tags:
- "Ocean AKS"
parameters:
- $ref: "../../../../commons/parameters/accountId.yaml"
- $ref: "../../commons/parameters/oceanClusterId.yaml"
- in: "query"
name: "shouldFetchPods"
example: "true"
description: >
Should fetch data about running pods for each node.
schema:
type: "boolean"
responses:
200:
$ref: "../responses/migrationDiscovery.yaml"
400:
description: "Bad Request"
23 changes: 23 additions & 0 deletions api/services/ocean/aksV2/responses/migrationDiscovery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
description: Migration Discovery 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/migration/discovery"
method:
example: "GET"
response:
properties:
items:
type: array
items:
$ref: "../schemas/oceanMigrationDiscovery.yaml"
kind:
example: "spotinst:ocean:azure:k8s:np:nodePoolUnmanaged"
16 changes: 16 additions & 0 deletions api/services/ocean/aksV2/schemas/oceanMigrationDiscovery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
title: Workload migration discovery details
description: "Information about available nodes which can be migrated to the Ocean cluster"
type: object
properties:
nodeName:
type: string
description: "The node name."
example: "aks-mynodepool-18735776-vmss000001"
nodePoolName:
type: string
description: "The NodePool Name."
example: "mynodepool"
runningPods:
type: integer
description: "The number of running pods on the node (appears if shouldFetchPods was true)."
example: "6"
2 changes: 2 additions & 0 deletions api/spot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,8 @@ paths:
$ref: services/ocean/aksV2/paths/clusterLaunchNodes.yaml
/ocean/azure/np/virtualNodeGroup:
$ref: services/ocean/aksV2/paths/virtualNodeGroups.yaml
/ocean/azure/np/cluster/{oceanClusterId}/migration/discovery:
$ref: services/ocean/aksV2/paths/workloadMigrationDiscovery.yaml
/ocean/azure/np/virtualNodeGroup/{virtualNodeGroupId}:
$ref: services/ocean/aksV2/paths/virtualNodeGroup.yaml
/ocean/azure/np/virtualNodeGroup/import:
Expand Down

0 comments on commit 404b174

Please sign in to comment.