Skip to content

Commit e2bdf7f

Browse files
authored
Merge pull request #318 from edgexr/clusters-get-api
EAM API: add get clusters api
2 parents 5a8f908 + d8b550d commit e2bdf7f

File tree

1 file changed

+133
-0
lines changed

1 file changed

+133
-0
lines changed

code/API_definitions/Edge-Application-Management.yaml

+133
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,68 @@ paths:
543543
$ref: '#/components/responses/500'
544544
'503':
545545
$ref: '#/components/responses/503'
546+
/clusters:
547+
get:
548+
security:
549+
- openId:
550+
- edge-application-management:clusters:read
551+
tags:
552+
- Cluster
553+
summary: |
554+
Retrieve a list of the available clusters filtered by the optional
555+
query parameters.
556+
description: |
557+
List available cluster information
558+
operationId: getClusters
559+
parameters:
560+
- $ref: '#/components/parameters/x-correlator'
561+
- name: region
562+
description: |
563+
Human readable name of the geographical Edge Cloud Region of
564+
the Cluster. Defined by the Edge Cloud Provider.
565+
in: query
566+
required: false
567+
schema:
568+
$ref: '#/components/schemas/EdgeCloudRegion'
569+
- name: clusterRef
570+
description: |
571+
A globally unique identifier for the Cluster.
572+
in: query
573+
required: false
574+
schema:
575+
$ref: '#/components/schemas/KubernetesClusterRef'
576+
- name: edgeCloudZoneId
577+
description: |
578+
Edge Cloud Zone identifier.
579+
in: query
580+
required: false
581+
schema:
582+
$ref: '#/components/schemas/EdgeCloudZoneId'
583+
responses:
584+
'200':
585+
description: |
586+
Successful response, returning the cluster's information.
587+
Returns an empty list if no clusters were found or none match
588+
the specified query parameters.
589+
headers:
590+
x-correlator:
591+
$ref: "#/components/headers/x-correlator"
592+
content:
593+
application/json:
594+
schema:
595+
type: array
596+
items:
597+
$ref: '#/components/schemas/ClusterInfo'
598+
'401':
599+
$ref: '#/components/responses/401'
600+
'403':
601+
$ref: '#/components/responses/403'
602+
'404':
603+
$ref: '#/components/responses/404'
604+
'500':
605+
$ref: '#/components/responses/500'
606+
'503':
607+
$ref: '#/components/responses/503'
546608
/edge-cloud-zones:
547609
get:
548610
security:
@@ -903,6 +965,36 @@ components:
903965
pattern: ^[A-Za-z][A-Za-z0-9_]{7,63}$
904966
description: Human readable name of the Application Provider.
905967

968+
ClusterInfo:
969+
description: Kubernetes cluster information
970+
required:
971+
- name
972+
- provider
973+
- clusterRef
974+
- edgeCloudZoneId
975+
properties:
976+
name:
977+
type: string
978+
description: |
979+
Name of the Cluster, scoped to the Provider
980+
provider:
981+
$ref: '#/components/schemas/AppProvider'
982+
clusterRef:
983+
$ref: '#/components/schemas/KubernetesClusterRef'
984+
edgeCloudZoneId:
985+
$ref: '#/components/schemas/EdgeCloudZoneId'
986+
edgeCloudRegion:
987+
$ref: '#/components/schemas/EdgeCloudRegion'
988+
version:
989+
type: string
990+
description: Kubernetes version of the cluster.
991+
nodePools:
992+
description: Node Pools in the cluster.
993+
type: array
994+
items:
995+
$ref: '#/components/schemas/KubernetesNodePool'
996+
minItems: 1
997+
906998
EdgeCloudProvider:
907999
type: string
9081000
description: Human readable name of the Edge Cloud Provider.
@@ -1110,6 +1202,47 @@ components:
11101202
format: uuid
11111203
example: "642f6105-7015-4af1-a4d1-e1ecb8437abc"
11121204

1205+
KubernetesNodePool:
1206+
description: |
1207+
A Kubernetes node pool is a set of Kubernetes nodes that have the
1208+
same configuration (vCPU, memory, networking, OS, etc) on each node.
1209+
required:
1210+
- name
1211+
- numNodes
1212+
- nodeResources
1213+
- scalable
1214+
properties:
1215+
name:
1216+
description: Human readable name of the Kubernetes Node Pool.
1217+
type: string
1218+
numNodes:
1219+
description: Number of nodes in the Node Pool.
1220+
type: integer
1221+
scalable:
1222+
description: |
1223+
Indicates if the node pool can be dynamically scaled up by the
1224+
system to accomodate more applications, and dynamically scaled
1225+
down by the system when there are unused resources.
1226+
type: boolean
1227+
example: false
1228+
nodeResources:
1229+
description: Resource configuration of a node.
1230+
type: object
1231+
required:
1232+
- numCPU
1233+
- memory
1234+
properties:
1235+
numCPU:
1236+
description: |
1237+
Number of whole vcpus for the node.
1238+
type: integer
1239+
example: 2
1240+
memory:
1241+
description: |
1242+
Amount of system memory in mega bytes for the node.
1243+
type: integer
1244+
example: 4096
1245+
11131246
KubernetesResources:
11141247
description: Definition of Kubernetes Cluster Infrastructure.
11151248
required:

0 commit comments

Comments
 (0)