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 12, 2023
1 parent 1f1f6ad commit abe00cf
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 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
2 changes: 1 addition & 1 deletion test/e2e/helm_chart_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ var _ = Describe("HELM charts", func() {
})
})

Describe("HELM charts.", Label("helm-update"), func() {
FDescribe("HELM charts.", Label("helm-update"), func() {
It("User deploy operator and later deploy new version of the Atlas operator", func() {
By("User creates configuration for a new Project, Deployment, DBUser", func() {
data = model.DataProviderWithResources(
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 abe00cf

Please sign in to comment.