diff --git a/README.md b/README.md index fc07bad71..1d09927d5 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The Elemental operator can be added to a cluster running Rancher Multi Cluster Management server. It is a helm chart and can be installed as follows: ```bash -helm -n cattle-elemental-operator-system install --create-namespace elemental-operator https://github.com/rancher/elemental-operator/releases/download/v0.1.0/elemental-operator-0.1.0.tgz +helm -n cattle-elemental-system install --create-namespace elemental-operator https://github.com/rancher/elemental-operator/releases/download/v0.1.0/elemental-operator-0.1.0.tgz ``` ## Managing Upgrades diff --git a/chart/Chart.yaml b/chart/Chart.yaml index 5989a2fa7..9227de8b7 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -6,7 +6,7 @@ appVersion: 0.0.0 annotations: catalog.cattle.io/certified: rancher catalog.cattle.io/experimental: "true" - catalog.cattle.io/namespace: cattle-elemental-operator-system + catalog.cattle.io/namespace: cattle-elemental-system catalog.cattle.io/release-name: elemental-operator catalog.cattle.io/provides-gvr: elemental.cattle.io/v1beta1 catalog.cattle.io/os: linux diff --git a/tests/e2e/e2e_suite_test.go b/tests/e2e/e2e_suite_test.go index 7d229178c..13192d111 100644 --- a/tests/e2e/e2e_suite_test.go +++ b/tests/e2e/e2e_suite_test.go @@ -39,6 +39,8 @@ var ( bridgeIP string ) +const operatorNamespace = "cattle-elemental-system" + var testResources = []string{"machineregistration", "managedosversionchannel"} func TestE2e(t *testing.T) { @@ -47,7 +49,7 @@ func TestE2e(t *testing.T) { } func isOperatorInstalled(k *kubectl.Kubectl) bool { - pods, err := k.GetPodNames("cattle-elemental-operator-system", "") + pods, err := k.GetPodNames(operatorNamespace, "") Expect(err).ToNot(HaveOccurred()) return len(pods) > 0 } @@ -56,7 +58,7 @@ func deployOperator(k *kubectl.Kubectl) { By("Deploying elemental-operator chart", func() { err := kubectl.RunHelmBinaryWithCustomErr( "-n", - "cattle-elemental-operator-system", + operatorNamespace, "install", "--create-namespace", "--set", "sync_interval=30s", @@ -65,18 +67,18 @@ func deployOperator(k *kubectl.Kubectl) { chart) Expect(err).ToNot(HaveOccurred()) - err = k.WaitForPod("cattle-elemental-operator-system", "app=elemental-operator", "elemental-operator") + err = k.WaitForPod(operatorNamespace, "app=elemental-operator", "elemental-operator") Expect(err).ToNot(HaveOccurred()) - pods, err := k.GetPodNames("cattle-elemental-operator-system", "app=elemental-operator") + pods, err := k.GetPodNames(operatorNamespace, "app=elemental-operator") Expect(err).ToNot(HaveOccurred()) Expect(len(pods)).To(Equal(1)) - err = k.WaitForNamespaceWithPod("cattle-elemental-operator-system", "app=elemental-operator") + err = k.WaitForNamespaceWithPod(operatorNamespace, "app=elemental-operator") Expect(err).ToNot(HaveOccurred()) Eventually(func() string { - str, _ := kubectl.Run("logs", "-n", "cattle-elemental-operator-system", pods[0]) + str, _ := kubectl.Run("logs", "-n", operatorNamespace, pods[0]) return str }, 5*time.Minute, 2*time.Second).Should( And( @@ -128,10 +130,10 @@ var _ = BeforeSuite(func() { // Upgrade/delete of operator only goes here // (no further bootstrap is required) By("Upgrading the operator only", func() { - err := kubectl.DeleteNamespace("cattle-elemental-operator-system") + err := kubectl.DeleteNamespace(operatorNamespace) Expect(err).ToNot(HaveOccurred()) - err = k.WaitForNamespaceDelete("cattle-elemental-operator-system") + err = k.WaitForNamespaceDelete(operatorNamespace) Expect(err).ToNot(HaveOccurred()) deployOperator(k) diff --git a/tests/e2e/machineregistration_test.go b/tests/e2e/machineregistration_test.go index dc9b3fa1f..791a98a39 100644 --- a/tests/e2e/machineregistration_test.go +++ b/tests/e2e/machineregistration_test.go @@ -29,14 +29,12 @@ import ( "github.com/rancher/elemental-operator/tests/catalog" ) -const testRegistrationNamespace = "cattle-elemental-operator-system" - var _ = Describe("MachineRegistration e2e tests", func() { k := kubectl.New() Context("registration", func() { AfterEach(func() { - kubectl.New().Delete("machineregistration", "-n", testRegistrationNamespace, "machine-registration") + kubectl.New().Delete("machineregistration", "-n", operatorNamespace, "machine-registration") }) It("creates a machine registration resource and a URL attaching CA certificate", func() { @@ -51,12 +49,12 @@ var _ = Describe("MachineRegistration e2e tests", func() { spec := catalog.MachineRegistrationSpec{Config: config} mr := catalog.NewMachineRegistration("machine-registration", spec) Eventually(func() error { - return k.ApplyYAML(testRegistrationNamespace, "machine-registration", mr) + return k.ApplyYAML(operatorNamespace, "machine-registration", mr) }, 2*time.Minute, 2*time.Second).ShouldNot(HaveOccurred()) var url string Eventually(func() string { - e, err := kubectl.GetData(testRegistrationNamespace, "machineregistration", "machine-registration", `jsonpath={.status.registrationURL}`) + e, err := kubectl.GetData(operatorNamespace, "machineregistration", "machine-registration", `jsonpath={.status.registrationURL}`) if err != nil { fmt.Println(err) }