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 bfad0d8
Show file tree
Hide file tree
Showing 19 changed files with 785 additions and 0 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/DefaultJobAdvancedSettings.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
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:
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 failure on line 1 in src/resources/helm/Helm.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

path-params

Operation must define parameter "{helmId}" as expected by path "/helm/{helmId}".

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

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

invalid-ref

ENOENT: no such file or directory, open '/github/workspace/src/parameters/path/helmId.yaml'

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:

Check failure on line 21 in src/resources/helm/Helm.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

path-params

Operation must define parameter "{helmId}" as expected by path "/helm/{helmId}".
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:

Check failure on line 52 in src/resources/helm/Helm.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

path-params

Operation must define parameter "{helmId}" as expected by path "/helm/{helmId}".
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:

Check failure on line 1 in src/resources/helm/HelmAdvancedSettings.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

path-params

Operation must define parameter "{helmId}" as expected by path "/helm/{helmId}/advancedSettings".
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:

Check failure on line 14 in src/resources/helm/HelmAdvancedSettings.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

oas3-schema

"properties" property type must be object.
$ref: '../../schemas/helm/HelmAdvancedSettings.yaml'
'401':
$ref: '../../responses/NotAuthorized.yaml'
'403':
$ref: '../../responses/Forbidden.yaml'
'404':
$ref: '../../responses/NotFound.yaml'

put:

Check failure on line 23 in src/resources/helm/HelmAdvancedSettings.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

path-params

Operation must define parameter "{helmId}" as expected by path "/helm/{helmId}/advancedSettings".
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:

Check failure on line 34 in src/resources/helm/HelmAdvancedSettings.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

oas3-schema

"properties" property type must be object.
$ref: '../../schemas/helm/HelmAdvancedSettings.yaml'
responses:
'201':
description: 'Updated advanced settings'
content:
application/json:
schema:

Check failure on line 41 in src/resources/helm/HelmAdvancedSettings.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

oas3-schema

"properties" property type must be object.
$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:

Check failure on line 1 in src/resources/helm/HelmDeploy.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

path-params

Operation must define parameter "{helmId}" as expected by path "/helm/{helmId}/deploy".

Check failure on line 1 in src/resources/helm/HelmDeploy.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

invalid-ref

ENOENT: no such file or directory, open '/github/workspace/src/schemas/helm/HelmDeployRequest.yaml'

Check failure on line 1 in src/resources/helm/HelmDeploy.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

invalid-ref

ENOENT: no such file or directory, open '/github/workspace/src/schemas/enums/HelmForceEvent.yaml'
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:

Check failure on line 1 in src/resources/helm/HelmDeploymentHistory.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

invalid-ref

ENOENT: no such file or directory, open '/github/workspace/src/schemas/helm/DeploymentHistoryHelmPaginatedResponseList.yaml'

Check failure on line 1 in src/resources/helm/HelmDeploymentHistory.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

path-params

Operation must define parameter "{helmId}" as expected by path "/helm/{helmId}/deploymentHistory".
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'
50 changes: 50 additions & 0 deletions src/resources/helm/HelmDeploymentRestriction.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
get:

Check failure on line 1 in src/resources/helm/HelmDeploymentRestriction.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

invalid-ref

ENOENT: no such file or directory, open '/github/workspace/src/schemas/helm/HelmDeploymentRestrictionResponse.yaml'

Check failure on line 1 in src/resources/helm/HelmDeploymentRestriction.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

path-params

Operation must define parameter "{helmId}" as expected by path "/helm/{helmId}/deploymentRestriction".

Check failure on line 1 in src/resources/helm/HelmDeploymentRestriction.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

invalid-ref

ENOENT: no such file or directory, open '/github/workspace/src/schemas/helm/HelmDeploymentRestrictionRequest.yaml'

Check failure on line 1 in src/resources/helm/HelmDeploymentRestriction.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

invalid-ref

ENOENT: no such file or directory, open '/github/workspace/src/schemas/helm/HelmDeploymentRestrictionResponseList.yaml'
summary: 'Get helm deployment restrictions'
description: 'Get helm deployment restrictions'
operationId: getHelmDeploymentRestrictions
parameters:
- $ref: '../../parameters/path/helmId.yaml'
tags:
- Helm Deployment Restriction
responses:
'200':
description: 'Get helm deployment restrictions'
content:
application/json:
schema:
$ref: '../../schemas/helm/HelmDeploymentRestrictionResponseList.yaml'
'401':
$ref: '../../responses/NotAuthorized.yaml'
'403':
$ref: '../../responses/Forbidden.yaml'
'404':
$ref: '../../responses/NotFound.yaml'

post:

Check failure on line 23 in src/resources/helm/HelmDeploymentRestriction.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

path-params

Operation must define parameter "{helmId}" as expected by path "/helm/{helmId}/deploymentRestriction".
summary: 'Create a helm deployment restriction'
description: 'Create a helm deployment restriction'
operationId: createHelmDeploymentRestriction
parameters:
- $ref: '../../parameters/path/helmId.yaml'
tags:
- Helm Deployment Restriction
requestBody:
content:
application/json:
schema:
$ref: '../../schemas/helm/HelmDeploymentRestrictionRequest.yaml'
responses:
'201':
description: 'Added an environment variable'
content:
application/json:
schema:
$ref: '../../schemas/helm/HelmDeploymentRestrictionResponse.yaml'
'400':
$ref: '../../responses/BadRequest.yaml'
'401':
$ref: '../../responses/NotAuthorized.yaml'
'403':
$ref: '../../responses/Forbidden.yaml'
'409':
description: A Helm deployment restriction with same properties already exists for this helm
Loading

0 comments on commit bfad0d8

Please sign in to comment.