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

feat: Add cluster delete mode #459

Merged
1 commit merged into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/resources/OrganizationClusterRef.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
delete:

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

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
summary: 'Delete a cluster'
operationId: deleteCluster
parameters:
- $ref: '../parameters/path/organizationId.yaml'
- $ref: '../parameters/path/clusterId.yaml'
- in: query
name: deleteMode
schema:
$ref: '../schemas/enums/ClusterDeleteMode.yaml'
tags:
- Clusters
responses:
Expand All @@ -16,7 +20,7 @@
'404':
$ref: '../responses/NotFound.yaml'

put:

Check warning on line 23 in src/resources/OrganizationClusterRef.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

operation-description

Operation "description" must be present and non-empty string.
summary: 'Edit a cluster'
operationId: editCluster
parameters:
Expand Down
13 changes: 13 additions & 0 deletions src/schemas/enums/ClusterDeleteMode.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
type: string
description: |
Indicates the mode to apply on cluster deletion
**"hard delete"** means that we delete directly from our database, this is different from a **"trigger delete"** that cleans the resource
- `DEFAULT`: this is the normal way, trigger delete the cluster only if no environment linked to this cluster remains
- `DELETE_CLUSTER_AND_QOVERY_CONFIG`: hard delete environments linked to this cluster then trigger delete the cluster
- `DELETE_QOVERY_CONFIG`: hard delete environments linked to this cluster then hard delete the cluster
enum:
- DEFAULT
- DELETE_CLUSTER_AND_QOVERY_CONFIG
- DELETE_QOVERY_CONFIG
example: DEFAULT
default: DEFAULT
Loading