diff --git a/components/operator/reconcile-resiliency_test.go b/components/operator/reconcile-resiliency_test.go index 8b634b74a..c83f8ca6b 100644 --- a/components/operator/reconcile-resiliency_test.go +++ b/components/operator/reconcile-resiliency_test.go @@ -66,7 +66,7 @@ var _ = Describe("BDD of operator reconcile resiliency check", func() { Expect(err).To(BeNil(), "create testapp2 deployment due to {%v}", err) //Waiting for deployment to get ready - err = pkg.DeploymentStatusCheck(&testsDetails, "testapp2", "default", clients) + err = pkg.DeploymentStatusCheck(&testsDetails, "testapp2", "litmus", clients) Expect(err).To(BeNil(), "Error Timeout due to {%v}", err) //////////////////////////////////////////////////////// diff --git a/pkg/environment/environment.go b/pkg/environment/environment.go index 22fc4fc11..781a37766 100644 --- a/pkg/environment/environment.go +++ b/pkg/environment/environment.go @@ -61,7 +61,7 @@ func GetENV(testDetails *types.TestDetails, expName, engineName string) { testDetails.LibImage = Getenv("LIB_IMAGE", "") // All Links for running chaos testing - testDetails.RbacPath = Getenv("RBAC_PATH", "https://hub.litmuschaos.io/api/chaos/master?file=charts/generic/"+expName+"/rbac.yaml") + testDetails.RbacPath = Getenv("RBAC_PATH", "https://litmuschaos.github.io/litmus/litmus-admin-rbac.yaml") testDetails.ExperimentPath = Getenv("EXPERIMENT_PATH", "https://hub.litmuschaos.io/api/chaos/master?file=faults/kubernetes/"+expName+"/fault.yaml") testDetails.EnginePath = Getenv("ENGINE_PATH", "https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/faults/kubernetes/"+expName+"/engine.yaml") testDetails.AnsibleRbacPath = Getenv("ANSIBLE_RBAC_PATH", "https://raw.githubusercontent.com/litmuschaos/chaos-charts/master/charts/generic/"+expName+"/ansible/rbac.yaml") diff --git a/pkg/install.go b/pkg/install.go index 3c402b6f6..2270b1394 100644 --- a/pkg/install.go +++ b/pkg/install.go @@ -141,11 +141,15 @@ func InstallGoRbac(testsDetails *types.TestDetails, rbacNamespace string) error } //Modify Namespace field of the RBAC if rbacNamespace != "" { - err = EditFile("/tmp/"+testsDetails.ExperimentName+"-sa.yaml", "namespace: default", "namespace: "+rbacNamespace) + err = EditFile("/tmp/"+testsDetails.ExperimentName+"-sa.yaml", "namespace: litmus", "namespace: "+rbacNamespace) if err != nil { return errors.Errorf("Failed to Modify rbac file due to %v", err) } } + err = EditFile("/tmp/"+testsDetails.ExperimentName+"-sa.yaml", "litmus-admin", testsDetails.ExperimentName+"-sa") + if err != nil { + return errors.Errorf("Failed to Modify rbac file due to %v", err) + } log.Info("[RBAC]: Installing RBAC...") //Creating rbac command := []string{"apply", "-f", "/tmp/" + testsDetails.ExperimentName + "-sa.yaml", "-n", rbacNamespace} @@ -472,3 +476,5 @@ func InstallAdminRbac(testsDetails *types.TestDetails) error { return nil } + +