Skip to content

Commit 2fcc060

Browse files
josvazghelderjs
andauthored
Reapply: Add support for deletion protection flags (#301)
Co-authored-by: Helder Santana <[email protected]>
1 parent fb2809a commit 2fcc060

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

charts/atlas-operator/templates/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ spec:
3232
- --atlas-domain={{ .Values.atlasURI }}
3333
- "--health-probe-bind-address=:8081"
3434
- "--metrics-bind-address=:8080"
35+
- --object-deletion-protection={{ .Values.objectDeletionProtection }}
36+
- --subobject-deletion-protection={{ .Values.subobjectDeletionProtection }}
3537
- "--leader-elect"
3638
command:
3739
- /manager

charts/atlas-operator/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ mongodb-atlas-operator-crds:
1818
# atlasURI is the URI of the MongoDB Atlas. You should not change this value.
1919
atlasURI: https://cloud.mongodb.com/
2020

21+
# objectDeletionProtection defines the operator will not delete Atlas resource when a Custom Resource is deleted
22+
objectDeletionProtection: true
23+
# subobjectDeletionProtection defines that the operator will not overwrite (and consequently delete) subresources that were not previously created by the operator
24+
subobjectDeletionProtection: true
25+
2126
# globalConnectionSecret is a default "global" Secret containing Atlas
2227
# authentication information.
2328
#

0 commit comments

Comments
 (0)