diff --git a/charts/atlas-operator/templates/deployment.yaml b/charts/atlas-operator/templates/deployment.yaml index e08eec67..f2dd099a 100644 --- a/charts/atlas-operator/templates/deployment.yaml +++ b/charts/atlas-operator/templates/deployment.yaml @@ -32,6 +32,8 @@ spec: - --atlas-domain={{ .Values.atlasURI }} - "--health-probe-bind-address=:8081" - "--metrics-bind-address=:8080" + - --object-deletion-protection={{ .Values.objectDeletionProtection }} + - --subobject-deletion-protection={{ .Values.subobjectDeletionProtection }} - "--leader-elect" command: - /manager diff --git a/charts/atlas-operator/values.yaml b/charts/atlas-operator/values.yaml index c2eb8d04..93f8d93d 100644 --- a/charts/atlas-operator/values.yaml +++ b/charts/atlas-operator/values.yaml @@ -18,6 +18,11 @@ mongodb-atlas-operator-crds: # atlasURI is the URI of the MongoDB Atlas. You should not change this value. atlasURI: https://cloud.mongodb.com/ +# objectDeletionProtection defines the operator will not delete Atlas resource when a Custom Resource is deleted +objectDeletionProtection: true +# subobjectDeletionProtection defines that the operator will not overwrite (and consequently delete) subresources that were not previously created by the operator +subobjectDeletionProtection: true + # globalConnectionSecret is a default "global" Secret containing Atlas # authentication information. #