Skip to content

Commit

Permalink
chore(pumba): Adding dynamic socketPath pumba helper (#238)
Browse files Browse the repository at this point in the history
Signed-off-by: shubhamchaudhary <[email protected]>
  • Loading branch information
ispeakc0de authored Dec 14, 2020
1 parent c812f06 commit 59cefce
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions chaoslib/pumba/container-kill/lib/container-kill.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ func CreateHelperPod(experimentsDetails *experimentTypes.ExperimentDetails, clie
Name: "dockersocket",
VolumeSource: apiv1.VolumeSource{
HostPath: &apiv1.HostPathVolumeSource{
Path: "/var/run/docker.sock",
Path: experimentsDetails.SocketPath,
},
},
},
Expand All @@ -316,7 +316,7 @@ func CreateHelperPod(experimentsDetails *experimentTypes.ExperimentDetails, clie
VolumeMounts: []apiv1.VolumeMount{
{
Name: "dockersocket",
MountPath: "/var/run/docker.sock",
MountPath: experimentsDetails.SocketPath,
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions chaoslib/pumba/network-chaos/lib/network-chaos.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func CreateHelperPod(experimentsDetails *experimentTypes.ExperimentDetails, clie
Name: "dockersocket",
VolumeSource: apiv1.VolumeSource{
HostPath: &apiv1.HostPathVolumeSource{
Path: "/var/run/docker.sock",
Path: experimentsDetails.SocketPath,
},
},
},
Expand All @@ -228,7 +228,7 @@ func CreateHelperPod(experimentsDetails *experimentTypes.ExperimentDetails, clie
VolumeMounts: []apiv1.VolumeMount{
{
Name: "dockersocket",
MountPath: "/var/run/docker.sock",
MountPath: experimentsDetails.SocketPath,
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/generic/container-kill/environment/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func GetENV(experimentDetails *experimentTypes.ExperimentDetails) {
experimentDetails.LIBImage = Getenv("LIB_IMAGE", "litmuschaos/go-runner:latest")
experimentDetails.LIBImagePullPolicy = Getenv("LIB_IMAGE_PULL_POLICY", "Always")
experimentDetails.TargetContainer = Getenv("TARGET_CONTAINER", "")
experimentDetails.SocketPath = Getenv("SOCKET_PATH", "/run/containerd/containerd.sock")
experimentDetails.SocketPath = Getenv("SOCKET_PATH", "/var/run/docker.sock")
experimentDetails.Delay, _ = strconv.Atoi(Getenv("STATUS_CHECK_DELAY", "2"))
experimentDetails.Timeout, _ = strconv.Atoi(Getenv("STATUS_CHECK_TIMEOUT", "180"))
experimentDetails.TargetPods = Getenv("TARGET_PODS", "")
Expand Down
2 changes: 1 addition & 1 deletion pkg/generic/network-chaos/environment/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func GetENV(experimentDetails *experimentTypes.ExperimentDetails) {
experimentDetails.DestinationHosts = Getenv("DESTINATION_HOSTS", "")
experimentDetails.ContainerRuntime = Getenv("CONTAINER_RUNTIME", "docker")
experimentDetails.ChaosServiceAccount = Getenv("CHAOS_SERVICE_ACCOUNT", "")
experimentDetails.SocketPath = Getenv("SOCKET_PATH", "/run/containerd/containerd.sock")
experimentDetails.SocketPath = Getenv("SOCKET_PATH", "/var/run/docker.sock")
experimentDetails.Sequence = Getenv("SEQUENCE", "parallel")

}
Expand Down

0 comments on commit 59cefce

Please sign in to comment.