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 d8cbeaf commit 1b29554
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pkg/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (

var err error

//CreateChaosResource creates litmus components with given inputs
// CreateChaosResource creates litmus components with given inputs
func CreateChaosResource(testsDetails *types.TestDetails, fileData []byte, namespace string, clients environment.ClientSets) error {

decoder := yamlutil.NewYAMLOrJSONDecoder(bytes.NewReader(fileData), 100)
Expand Down Expand Up @@ -131,7 +131,7 @@ func UpdateExperiment(testsDetails *types.TestDetails, clients environment.Clien
return nil
}

//InstallGoRbac installs and configure rbac for running go based chaos
// InstallGoRbac installs and configure rbac for running go based chaos
func InstallGoRbac(testsDetails *types.TestDetails, rbacNamespace string) error {

//Fetch RBAC file
Expand Down Expand Up @@ -214,7 +214,7 @@ func setExperimentVar(chaosExperiment *v1alpha1.ChaosExperiment, testsDetails *t
}
}

//InstallGoChaosExperiment installs the given go based chaos experiment
// InstallGoChaosExperiment installs the given go based chaos experiment
func InstallGoChaosExperiment(testsDetails *types.TestDetails, chaosExperiment *v1alpha1.ChaosExperiment, experimentNamespace string, clients environment.ClientSets) error {

//Fetch Experiment file
Expand Down Expand Up @@ -377,7 +377,7 @@ func setEngineVar(chaosEngine *v1alpha1.ChaosEngine, testsDetails *types.TestDet
}
}

//InstallGoChaosEngine installs the given go based chaos engine
// InstallGoChaosEngine installs the given go based chaos engine
func InstallGoChaosEngine(testsDetails *types.TestDetails, chaosEngine *v1alpha1.ChaosEngine, engineNamespace string, clients environment.ClientSets) error {

//Fetch Engine file
Expand Down Expand Up @@ -416,23 +416,23 @@ func InstallGoChaosEngine(testsDetails *types.TestDetails, chaosEngine *v1alpha1
return nil
}

//InstallLitmus installs the latest version of litmus
// InstallLitmus installs the latest version of litmus
func InstallLitmus(testsDetails *types.TestDetails) error {

log.Info("Installing Litmus ...")
if err := DownloadFile("install-litmus.yaml", testsDetails.InstallLitmus); err != nil {
return errors.Errorf("Failed to fetch litmus operator file due to %v", err)
}
log.Info("Updating ChaosOperator Image ...")
if err := EditFile("install-litmus.yaml", "image: litmuschaos/chaos-operator:latest", "image: "+testsDetails.OperatorImage); err != nil {
if err := EditFile("install-litmus.yaml", "image: litmuschaos.docker.scarf.sh/litmuschaos/chaos-operator:latest", "image: "+testsDetails.OperatorImage); err != nil {
return errors.Errorf("Unable to update operator image due to %v", err)

}
if err = EditKeyValue("install-litmus.yaml", " - chaos-operator", "imagePullPolicy: Always", "imagePullPolicy: "+testsDetails.ImagePullPolicy); err != nil {
return errors.Errorf("Unable to update image pull policy due to %v", err)
}
log.Info("Updating Chaos Runner Image ...")
if err := EditKeyValue("install-litmus.yaml", "CHAOS_RUNNER_IMAGE", "value: \"litmuschaos/chaos-runner:latest\"", "value: '"+testsDetails.RunnerImage+"'"); err != nil {
if err := EditKeyValue("install-litmus.yaml", "CHAOS_RUNNER_IMAGE", "value: \"litmuschaos.docker.scarf.sh/litmuschaos/chaos-runner:latest\"", "value: '"+testsDetails.RunnerImage+"'"); err != nil {
return errors.Errorf("Unable to update runner image due to %v", err)
}
//Creating engine
Expand All @@ -446,7 +446,7 @@ func InstallLitmus(testsDetails *types.TestDetails) error {
return nil
}

//InstallAdminRbac installs admin rbac to run chaos
// InstallAdminRbac installs admin rbac to run chaos
func InstallAdminRbac(testsDetails *types.TestDetails) error {

//Fetch RBAC file
Expand Down

0 comments on commit 1b29554

Please sign in to comment.