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

CLOUDP-224541: Added terminationProtection flag #1356

Merged
merged 4 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 11 additions & 1 deletion config/crd/bases/atlas.mongodb.com_atlasdeployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,13 @@ spec:
type: object
maxItems: 50
type: array
terminationProtectionEnabled:
default: false
description: Flag that indicates whether termination protection
is enabled on the cluster. If set to true, MongoDB Cloud won't
delete the cluster. If set to false, MongoDB Cloud will delete
the cluster.
type: boolean
versionReleaseSystem:
type: string
type: object
Expand Down Expand Up @@ -594,7 +601,10 @@ spec:
type: array
terminationProtectionEnabled:
default: false
description: TerminationProtectionEnabled flag
description: Flag that indicates whether termination protection
is enabled on the cluster. If set to true, MongoDB Cloud won't
delete the cluster. If set to false, MongoDB Cloud will delete
the cluster.
type: boolean
required:
- name
Expand Down
4 changes: 2 additions & 2 deletions config/crd/bases/atlas.mongodb.com_atlasprojects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ spec:
types.
type: boolean
flowName:
description: Flowdock flow namse in lower-case letters.
description: Flowdock flow name in lower-case letters.
type: string
flowdockApiTokenRef:
description: The Flowdock personal API token. Populated
Expand Down Expand Up @@ -185,7 +185,7 @@ spec:
are sent. Populated for the SMS notifications type.
type: string
opsGenieApiKeyRef:
description: Opsgenie API Key. Populated for the OPS_GENIE
description: OpsGenie API Key. Populated for the OPS_GENIE
notifications type. If the key later becomes invalid,
Atlas sends an email to the project owner and eventually
removes the token.
Expand Down
5 changes: 4 additions & 1 deletion pkg/api/v1/atlasdeployment_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ type AdvancedDeploymentSpec struct {
CustomZoneMapping []CustomZoneMapping `json:"customZoneMapping,omitempty"`
// +optional
ManagedNamespaces []ManagedNamespace `json:"managedNamespaces,omitempty"`
// Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.
// +kubebuilder:default:=false
TerminationProtectionEnabled bool `json:"terminationProtectionEnabled,omitempty"`
}

// ToAtlas converts the AdvancedDeploymentSpec to native Atlas client ToAtlas format.
Expand Down Expand Up @@ -169,7 +172,7 @@ type ServerlessSpec struct {
// Serverless Backup Options
BackupOptions ServerlessBackupOptions `json:"backupOptions,omitempty"`

// TerminationProtectionEnabled flag
// Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.
// +kubebuilder:default:=false
TerminationProtectionEnabled bool `json:"terminationProtectionEnabled,omitempty"`
}
Expand Down
Loading