Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Udit Gaurav <[email protected]>
  • Loading branch information
uditgaurav committed Apr 25, 2024
1 parent 697f7bd commit 773aaa9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/operator/reconcile-resiliency_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion pkg/environment/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
8 changes: 7 additions & 1 deletion pkg/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -472,3 +476,5 @@ func InstallAdminRbac(testsDetails *types.TestDetails) error {

return nil
}


0 comments on commit 773aaa9

Please sign in to comment.