Skip to content

Commit

Permalink
CLOUDP-175080: Support deletion protection for Atlas projects (#1028)
Browse files Browse the repository at this point in the history
  • Loading branch information
helderjs committed Aug 2, 2023
1 parent 912a485 commit fc62e96
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
3 changes: 1 addition & 2 deletions pkg/api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions test/e2e/cli/helm/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ func InstallOperatorWideSubmodule(input model.UserInputs) {
"atlas-operator-"+input.Project.GetProjectName(),
config.AtlasOperatorHelmChartPath,
"--set-string", fmt.Sprintf("atlasURI=%s", config.AtlasHost),
"--set", "objectDeletionProtection=false",
"--set", "subobjectDeletionProtection=false",
"--set-string", fmt.Sprintf("image.repository=%s", repo),
"--set-string", fmt.Sprintf("image.tag=%s", tag),
"--namespace", input.Namespace,
Expand All @@ -122,6 +124,8 @@ func InstallOperatorNamespacedFromLatestRelease(input model.UserInputs) {
"mongodb/mongodb-atlas-operator",
"--set", fmt.Sprintf("watchNamespaces={%s}", input.Namespace),
"--set-string", fmt.Sprintf("atlasURI=%s", config.AtlasHost),
"--set", "objectDeletionProtection=false",
"--set", "subobjectDeletionProtection=false",
"--namespace="+input.Namespace,
"--create-namespace",
)
Expand All @@ -141,6 +145,8 @@ func InstallOperatorNamespacedSubmodule(input model.UserInputs) {
"--set-string", fmt.Sprintf("image.tag=%s", tag),
"--set", fmt.Sprintf("watchNamespaces={%s}", input.Namespace),
"--set", "mongodb-atlas-operator-crds.enabled=false",
"--set", "objectDeletionProtection=false",
"--set", "subobjectDeletionProtection=false",
"--namespace="+input.Namespace,
"--create-namespace",
)
Expand Down Expand Up @@ -188,6 +194,8 @@ func UpgradeOperatorChart(input model.UserInputs) {
"atlas-operator-"+input.Project.GetProjectName(),
config.AtlasOperatorHelmChartPath,
"--set-string", fmt.Sprintf("atlasURI=%s", config.AtlasHost),
"--set", "objectDeletionProtection=false",
"--set", "subobjectDeletionProtection=false",
"--set-string", fmt.Sprintf("image.repository=%s", repo),
"--set-string", fmt.Sprintf("image.tag=%s", tag),
"-n", input.Namespace,
Expand Down
1 change: 1 addition & 0 deletions test/e2e/helm_chart_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package e2e_test

import (
"context"
"encoding/json"
"fmt"
"os"
Expand Down

0 comments on commit fc62e96

Please sign in to comment.