Skip to content

Commit

Permalink
Adjust helm to support deletion protection flags
Browse files Browse the repository at this point in the history
  • Loading branch information
helderjs committed Jul 13, 2023
1 parent 9d7564d commit 286217c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
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
4 changes: 2 additions & 2 deletions test/int/project_protect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var _ = Describe("AtlasProject", Label("int", "AtlasProject", "protection-enable
})

// nolint:dupl
By("Deleting project in cluster don't delete from Atlas", func() {
By("Deleting project in cluster doesn't delete from Atlas", func() {
projectID := testProject.ID()
Expect(k8sClient.Delete(context.TODO(), testProject, &client.DeleteOptions{})).To(Succeed())

Expand Down Expand Up @@ -98,7 +98,7 @@ var _ = Describe("AtlasProject", Label("int", "AtlasProject", "protection-enable
})

// nolint:dupl
By("Deleting project in cluster don't delete from Atlas", func() {
By("Deleting project in cluster doesn't delete from Atlas", func() {
projectID := testProject.ID()
Expect(k8sClient.Delete(context.TODO(), testProject, &client.DeleteOptions{})).To(Succeed())

Expand Down

0 comments on commit 286217c

Please sign in to comment.