Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating requiredResources in Application Management API #280

Merged
merged 12 commits into from
Nov 4, 2024
19 changes: 12 additions & 7 deletions code/API_definitions/Edge-Application-Management.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/AppZones'
$ref: '#/components/schemas/AppInstaces'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: AppInstaces -> AppInstances

required: true
responses:
'202':
Expand Down Expand Up @@ -683,16 +683,25 @@ components:
accessPoints:
$ref: '#/components/schemas/AccessEndpoint'
minItems: 1
kubernetesClusterRef:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not clear how developer will get the KubernetesClusterRef? Are there suppose to be any query API to find it out or how do we see retrieving this information by the API user?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two ways to get a ClusterRef:

  1. From the result of a previous Create AppInstance. Creating an AppInstance will use (or create) an underlying cluster for Kubernetes/Helm apps. After the instance is created, querying the AppInstanceInfo will give the clusterRef of the cluster the instance was deployed to. The use case here is to allow the user to deploy multiple AppInstances to the same cluster (for example database, tracing, logging, workload, frontend etc sets of instances that can communicate with each other in the same cluster).
  2. From a cluster management API. The system may provide a cluster management API outside of the NBI, or this EAM CAMARA NBI API may be extended in the future to provide a cluster management API. The clusterRefs can then come from a "GET clusters" API.

$ref: '#/components/schemas/KubernetesClusterRef'
edgeCloudZone:
$ref: '#/components/schemas/EdgeCloudZone'

AppZones:
AppInstaces:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: AppInstaces -> AppInstances

description: |
Collection of Edge Cloud Zones where the Application Provider wants to
instantiate the application.
type: array
items:
$ref: '#/components/schemas/EdgeCloudZone'
type: object
properties:
kubernetesClusterRef:
$ref: '#/components/schemas/KubernetesClusterRef'
EdgeCloudZone:
$ref: '#/components/schemas/EdgeCloudZone'
required:
- EdgeCloudZone
minItems: 1
additionalProperties: false

Expand Down Expand Up @@ -912,8 +921,6 @@ components:
$ref: '#/components/schemas/EdgeCloudProvider'
edgeCloudRegion:
$ref: '#/components/schemas/EdgeCloudRegion'
edgeCloudKubernetesClusterRef:
$ref: '#/components/schemas/KubernetesClusterRef'
minItems: 1

EdgeCloudZoneName:
Expand Down Expand Up @@ -1217,8 +1224,6 @@ components:
applications.
type: boolean
example: false
kubernetesClusterRef:
$ref: '#/components/schemas/KubernetesClusterRef'
version:
type: string
description: Minimum Kubernetes Version.
Expand Down