Skip to content

Commit

Permalink
Add first Helm API
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Oct 23, 2023
1 parent f0d01d3 commit e988af7
Show file tree
Hide file tree
Showing 29 changed files with 869 additions and 2 deletions.
50 changes: 50 additions & 0 deletions src/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,19 @@ tags:
- name: Job Registry
- name: Job Secret
- name: Jobs
- name: Helm
- name: Helm Actions
- name: Helm Configuration
- name: Helm Database
- name: Helm Deployment Restriction
- name: Helm Deployment History
- name: Helm Environment Variable
- name: Helm Logs
- name: Helm Main Calls
- name: Helm Metrics
- name: Helm Registry
- name: Helm Secret
- name: Helms
- name: Backups
- name: Billing
- name: Cloud Provider
Expand Down Expand Up @@ -191,6 +204,17 @@ x-tagGroups:
- Job Deployment History
- Job Environment Variable
- Job Secret
- name: Helm
tags:
- Helm Main Calls
- Helm Actions
- Helm Configuration
- Helm Custom Domain
- Helm Deployment Restriction
- Helm Metrics
- Helm Deployment History
- Helm Environment Variable
- Helm Secret
- name: Account
tags:
- Account Info
Expand Down Expand Up @@ -498,6 +522,8 @@ paths:
$ref: './resources/DefaultContainerAdvancedSettings.yaml'
/defaultJobAdvancedSettings:
$ref: './resources/DefaultJobAdvancedSettings.yaml'
/defaultHelmAdvancedSettings:
$ref: './resources/DefaultHelmAdvancedSettings.yaml'
/application/{applicationId}:
$ref: './resources/Application.yaml'
/application/{applicationId}/status:
Expand Down Expand Up @@ -694,6 +720,30 @@ paths:
$ref: './resources/AccountRewardClaim.yaml'
/admin/userSignUp:
$ref: './resources/UserSignUp.yaml'
/environment/{environmentId}/helm:
$ref: './resources/helm/EnvironmentHelm.yaml'
/environment/{environmentId}/helm/status:
$ref: './resources/helm/EnvironmentHelmStatus.yaml'
/helm/{helmId}:
$ref: './resources/helm/Helm.yaml'
/helm/{helmId}/advancedSettings:
$ref: './resources/helm/HelmAdvancedSettings.yaml'
/helm/{helmId}/deploy:
$ref: './resources/helm/HelmDeploy.yaml'
/helm/{helmId}/restart:
$ref: './resources/helm/HelmRestart.yaml'
/helm/{helmId}/redeploy:
$ref: './resources/helm/HelmRedeploy.yaml'
/helm/{helmId}/stop:
$ref: './resources/helm/HelmStop.yaml'
/helm/{helmId}/status:
$ref: './resources/helm/HelmStatus.yaml'
/helm/{helmId}/deploymentHistory:
$ref: './resources/helm/HelmDeploymentHistory.yaml'
/helm/{helmId}/deploymentRestriction:
$ref: './resources/helm/HelmDeploymentRestriction.yaml'
/helm/{helmId}/deploymentRestriction/{deploymentRestrictionId}:
$ref: './resources/helm/HelmDeploymentRestrictionRef.yaml'
/environment/{environmentId}/job:
$ref: './resources/job/EnvironmentJob.yaml'
/environment/{environmentId}/job/status:
Expand Down
2 changes: 2 additions & 0 deletions src/parameters/_index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,5 @@ webhookId:
$ref: ./path/webhookId.yaml
variableId:
$ref: ./path/variableId.yaml
helmId:
$ref: ./path/helmId.yaml
7 changes: 7 additions & 0 deletions src/parameters/path/helmId.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: helmId
in: path
description: Helm ID
required: true
schema:
type: string
format: uuid
16 changes: 16 additions & 0 deletions src/resources/DefaultHelmAdvancedSettings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
get:

Check warning on line 1 in src/resources/DefaultHelmAdvancedSettings.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
summary: 'List default helm advanced settings'
operationId: getDefaultHelmAdvancedSettings
tags:
- Helm
responses:
'200':
description: 'Default helm advanced settings'
content:
application/json:
schema:
$ref: '../schemas/helm/HelmAdvancedSettings.yaml'
'401':
$ref: '../responses/NotAuthorized.yaml'
'403':
$ref: '../responses/Forbidden.yaml'
50 changes: 50 additions & 0 deletions src/resources/helm/EnvironmentHelm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
get:

Check warning on line 1 in src/resources/helm/EnvironmentHelm.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
summary: 'List helms'
operationId: listHelms
parameters:
- $ref: '../../parameters/path/environmentId.yaml'
- $ref: '../../parameters/query/toUpdate.yaml'
tags:
- Helms
responses:
'200':
description: 'List helms'
content:
application/json:
schema:
$ref: '../../schemas/helm/HelmResponseList.yaml'
'401':
$ref: '../../responses/NotAuthorized.yaml'
'403':
$ref: '../../responses/Forbidden.yaml'
'404':
$ref: '../../responses/NotFound.yaml'
post:

Check warning on line 22 in src/resources/helm/EnvironmentHelm.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
summary: 'Create a helm'
operationId: createHelm
parameters:
- $ref: '../../parameters/path/environmentId.yaml'
tags:
- Helms
requestBody:
content:
application/json:
schema:
$ref: '../../schemas/helm/HelmRequest.yaml'
responses:
'201':
description: 'Create helm'
content:
application/json:
schema:
$ref: '../../schemas/helm/HelmResponse.yaml'
'400':
$ref: '../../responses/BadRequest.yaml'
'401':
$ref: '../../responses/NotAuthorized.yaml'
'403':
$ref: '../../responses/Forbidden.yaml'
'404':
$ref: '../../responses/NotFound.yaml'
'409':
description: Helm name within the environment is already taken
21 changes: 21 additions & 0 deletions src/resources/helm/EnvironmentHelmStatus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
get:
summary: 'List all environment helm statuses'
description: Returns a list of helms with only their id and status.
operationId: getEnvironmentHelmStatus
parameters:
- $ref: '../../parameters/path/environmentId.yaml'
tags:
- Helms
responses:
'200':
description: 'Get status'
content:
application/json:
schema:
$ref: '../../schemas/ReferenceObjectStatusResponseList.yaml'
'401':
$ref: '../../responses/NotAuthorized.yaml'
'403':
$ref: '../../responses/Forbidden.yaml'
'404':
$ref: '../../responses/NotFound.yaml'
68 changes: 68 additions & 0 deletions src/resources/helm/Helm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
get:

Check warning on line 1 in src/resources/helm/Helm.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
summary: 'Get helm by ID'
operationId: getHelm
parameters:
- $ref: '../../parameters/path/helmId.yaml'
tags:
- Helm Main Calls
responses:
'200':
description: 'Get helm by ID'
content:
application/json:
schema:
$ref: '../../schemas/helm/HelmResponse.yaml'
'401':
$ref: '../../responses/NotAuthorized.yaml'
'403':
$ref: '../../responses/Forbidden.yaml'
'404':
$ref: '../../responses/NotFound.yaml'
put:
summary: 'Edit helm'
description: |
- To edit the helm you must have the admin permission.
operationId: editHelm
parameters:
- $ref: '../../parameters/path/helmId.yaml'
tags:
- Helm Main Calls
requestBody:
content:
application/json:
schema:
$ref: '../../schemas/helm/HelmRequest.yaml'
responses:
'200':
description: 'Edit helm'
content:
application/json:
schema:
$ref: '../../schemas/helm/HelmResponse.yaml'
'400':
$ref: '../../responses/BadRequest.yaml'
'401':
$ref: '../../responses/NotAuthorized.yaml'
'403':
$ref: '../../responses/Forbidden.yaml'
'404':
$ref: '../../responses/NotFound.yaml'
'409':
description: Helm name within the environment is already taken
delete:
summary: 'Delete helm'
description: 'To delete the helm you must have the admin permission'
operationId: deleteHelm
parameters:
- $ref: '../../parameters/path/helmId.yaml'
tags:
- Helm Main Calls
responses:
'204':
$ref: '../../responses/Deleted.yaml'
'401':
$ref: '../../responses/NotAuthorized.yaml'
'403':
$ref: '../../responses/Forbidden.yaml'
'404':
$ref: '../../responses/NotFound.yaml'
50 changes: 50 additions & 0 deletions src/resources/helm/HelmAdvancedSettings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
get:
summary: 'Get advanced settings'
description: Get list and values of the advanced settings of the helm.
operationId: getHelmAdvancedSettings
parameters:
- $ref: '../../parameters/path/helmId.yaml'
tags:
- Helm Configuration
responses:
'200':
description: 'Advanced settings list'
content:
application/json:
schema:
$ref: '../../schemas/helm/HelmAdvancedSettings.yaml'
'401':
$ref: '../../responses/NotAuthorized.yaml'
'403':
$ref: '../../responses/Forbidden.yaml'
'404':
$ref: '../../responses/NotFound.yaml'

put:
summary: 'Edit advanced settings'
description: Edit advanced settings by returning table of advanced settings.
operationId: editHelmAdvancedSettings
parameters:
- $ref: '../../parameters/path/helmId.yaml'
tags:
- Helm Configuration
requestBody:
content:
application/json:
schema:
$ref: '../../schemas/helm/HelmAdvancedSettings.yaml'
responses:
'201':
description: 'Updated advanced settings'
content:
application/json:
schema:
$ref: '../../schemas/helm/HelmAdvancedSettings.yaml'
'400':
$ref: '../../responses/BadRequest.yaml'
'401':
$ref: '../../responses/NotAuthorized.yaml'
'403':
$ref: '../../responses/Forbidden.yaml'
'404':
$ref: '../../responses/NotFound.yaml'
38 changes: 38 additions & 0 deletions src/resources/helm/HelmDeploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
post:
summary: 'Deploy helm'
description: You must provide a git commit id or an image tag depending on the source location of your code (git vs image repository).
operationId: deployHelm
parameters:
- $ref: '../../parameters/path/helmId.yaml'
- name: forceEvent
in: query
required: false
description: |
When filled, it indicates the target event to be deployed.
If the concerned helm hasn't the target event provided, the helm won't be deployed.
schema:
$ref: ../../schemas/enums/HelmForceEvent.yaml
tags:
- Helm Actions
requestBody:
content:
application/json:
schema:
$ref: '../../schemas/helm/HelmDeployRequest.yaml'
responses:
'202':
description: 'Deploy helm'
content:
application/json:
schema:
$ref: '../../schemas/Status.yaml'
'400':
$ref: '../../responses/BadRequest.yaml'
'401':
$ref: '../../responses/NotAuthorized.yaml'
'403':
$ref: '../../responses/Forbidden.yaml'
'404':
$ref: '../../responses/NotFound.yaml'
'409':
description: 'Operation is in progress'
21 changes: 21 additions & 0 deletions src/resources/helm/HelmDeploymentHistory.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
get:
summary: 'List helm deployments'
description: Returns the 20 last helm deployments
operationId: listHelmDeploymentHistory
parameters:
- $ref: '../../parameters/path/helmId.yaml'
tags:
- Helm Deployment History
responses:
'200':
description: 'List deployment history'
content:
application/json:
schema:
$ref: '../../schemas/helm/DeploymentHistoryHelmPaginatedResponseList.yaml'
'401':
$ref: '../../responses/NotAuthorized.yaml'
'403':
$ref: '../../responses/Forbidden.yaml'
'404':
$ref: '../../responses/NotFound.yaml'
Loading

0 comments on commit e988af7

Please sign in to comment.