Skip to content

Commit 2bffa22

Browse files
authored
[CherryPick for 1.6.1] (#64)
* feat(istio): Adding support to run in istio enabled mode (#59) Signed-off-by: shubhamchaudhary <shubham.chaudhary@mayadata.io> * feat(istio): Adding the tc-image as env in network experiments (#60) Signed-off-by: shubhamchaudhary <shubham.chaudhary@mayadata.io>
1 parent 0e36e55 commit 2bffa22

File tree

14 files changed

+112
-30
lines changed

14 files changed

+112
-30
lines changed

chaoslib/litmus/container_kill/container-kill.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func PrepareContainerKill(experimentsDetails *experimentTypes.ExperimentDetails,
8585
// Wait till the completion of the helper pod
8686
// set an upper limit for the waiting time
8787
log.Info("[Wait]: waiting till the completion of the helper pod")
88-
podStatus, err := status.WaitForCompletion(experimentsDetails.ChaosNamespace, "name=container-kill-"+experimentsDetails.RunID, clients, experimentsDetails.ChaosDuration+experimentsDetails.ChaosInterval+60)
88+
podStatus, err := status.WaitForCompletion(experimentsDetails.ChaosNamespace, "name=container-kill-"+experimentsDetails.RunID, clients, experimentsDetails.ChaosDuration+experimentsDetails.ChaosInterval+60, "container-kill")
8989
if err != nil || podStatus == "Failed" {
9090
return errors.Errorf("helper pod failed due to, err: %v", err)
9191
}

chaoslib/litmus/kubelet_service_kill/kubelet-service-kill.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func PrepareKubeletKill(experimentsDetails *experimentTypes.ExperimentDetails, c
7272
// Wait till the completion of helper pod
7373
log.Infof("[Wait]: Waiting for %vs till the completion of the helper pod", strconv.Itoa(experimentsDetails.ChaosDuration+30))
7474

75-
podStatus, err := status.WaitForCompletion(experimentsDetails.ChaosNamespace, "name=kubelet-service-kill-"+experimentsDetails.RunID, clients, experimentsDetails.ChaosDuration+30)
75+
podStatus, err := status.WaitForCompletion(experimentsDetails.ChaosNamespace, "name=kubelet-service-kill-"+experimentsDetails.RunID, clients, experimentsDetails.ChaosDuration+30, "kubelet-service-kill")
7676
if err != nil || podStatus == "Failed" {
7777
return errors.Errorf("helper pod failed due to, err: %v", err)
7878
}

chaoslib/litmus/node_cpu_hog/node-cpu-hog.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func PrepareNodeCPUHog(experimentsDetails *experimentTypes.ExperimentDetails, cl
7272
// Wait till the completion of helper pod
7373
log.Infof("[Wait]: Waiting for %vs till the completion of the helper pod", strconv.Itoa(experimentsDetails.ChaosDuration+30))
7474

75-
podStatus, err := status.WaitForCompletion(experimentsDetails.ChaosNamespace, "name=node-cpu-hog-"+experimentsDetails.RunID, clients, experimentsDetails.ChaosDuration+30)
75+
podStatus, err := status.WaitForCompletion(experimentsDetails.ChaosNamespace, "name=node-cpu-hog-"+experimentsDetails.RunID, clients, experimentsDetails.ChaosDuration+30, "node-cpu-hog")
7676
if err != nil || podStatus == "Failed" {
7777
return errors.Errorf("helper pod failed due to, err: %v", err)
7878
}

chaoslib/litmus/node_memory_hog/node-memory-hog.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func PrepareNodeMemoryHog(experimentsDetails *experimentTypes.ExperimentDetails,
6262
// Wait till the completion of helper pod
6363
log.Infof("[Wait]: Waiting for %vs till the completion of the helper pod", strconv.Itoa(experimentsDetails.ChaosDuration+30))
6464

65-
podStatus, err := status.WaitForCompletion(experimentsDetails.ChaosNamespace, "name=node-memory-hog-"+experimentsDetails.RunID, clients, experimentsDetails.ChaosDuration+30)
65+
podStatus, err := status.WaitForCompletion(experimentsDetails.ChaosNamespace, "name=node-memory-hog-"+experimentsDetails.RunID, clients, experimentsDetails.ChaosDuration+30, "node-memory-hog")
6666
if err != nil || podStatus == "Failed" {
6767
return errors.Errorf("helper pod failed due to, err: %v", err)
6868
}

chaoslib/litmus/pod_delete/pod-delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func PreparePodDelete(experimentsDetails *experimentTypes.ExperimentDetails, cli
5454

5555
// Wait till the completion of helper pod
5656
log.Info("[Wait]: waiting till the completion of the helper pod")
57-
podStatus, err := status.WaitForCompletion(experimentsDetails.ChaosNamespace, "name=pod-delete"+runID, clients, experimentsDetails.ChaosDuration+experimentsDetails.ChaosInterval+60)
57+
podStatus, err := status.WaitForCompletion(experimentsDetails.ChaosNamespace, "name=pod-delete"+runID, clients, experimentsDetails.ChaosDuration+experimentsDetails.ChaosInterval+60, "pod-delete")
5858
if err != nil || podStatus == "Failed" {
5959
return errors.Errorf("helper pod failed due to, err: %v", err)
6060
}

chaoslib/pumba/network_chaos/network-chaos.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func PreparePodNetworkChaos(experimentsDetails *experimentTypes.ExperimentDetail
7373
// Wait till the completion of helper pod
7474
log.Infof("[Wait]: Waiting for %vs till the completion of the helper pod", strconv.Itoa(experimentsDetails.ChaosDuration))
7575

76-
podStatus, err := status.WaitForCompletion(experimentsDetails.ChaosNamespace, "name=pumba-netem-"+experimentsDetails.RunID, clients, experimentsDetails.ChaosDuration+30)
76+
podStatus, err := status.WaitForCompletion(experimentsDetails.ChaosNamespace, "name=pumba-netem-"+experimentsDetails.RunID, clients, experimentsDetails.ChaosDuration+30, "pumba")
7777
if err != nil || podStatus == "Failed" {
7878
return errors.Errorf("helper pod failed due to, err: %v", err)
7979
}
@@ -171,7 +171,7 @@ func CreateHelperPod(experimentsDetails *experimentTypes.ExperimentDetails, clie
171171
Args: []string{
172172
"netem",
173173
"--tc-image",
174-
"gaiadocker/iproute2",
174+
experimentsDetails.TCImage,
175175
"--interface",
176176
experimentsDetails.NetworkInterface,
177177
"--duration",

experiments/generic/pod-network-corruption/pod-network-corruption-k8s-job.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ spec:
3737
- name: NETWORK_INTERFACE
3838
value: 'eth0'
3939

40+
- name: TC_IMAGE
41+
value: 'gaiadocker/iproute2'
42+
4043
- name: NETWORK_PACKET_CORRUPTION_PERCENTAGE
4144
value: '100' # in percentage
4245

experiments/generic/pod-network-duplication/pod-network-duplication-k8s-job.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ spec:
3737
- name: NETWORK_INTERFACE
3838
value: 'eth0'
3939

40+
- name: TC_IMAGE
41+
value: 'gaiadocker/iproute2'
42+
4043
- name: NETWORK_PACKET_DUPLICATION_PERCENTAGE
4144
value: '100' # in percentage
4245

experiments/generic/pod-network-latency/pod-network-latency-k8s-job.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ spec:
3737
- name: NETWORK_INTERFACE
3838
value: 'eth0'
3939

40+
- name: TC_IMAGE
41+
value: 'gaiadocker/iproute2'
42+
4043
- name: NETWORK_LATENCY
4144
value: '60000' # in ms
4245

experiments/generic/pod-network-loss/pod-network-loss-k8s-job.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ spec:
3737
- name: NETWORK_INTERFACE
3838
value: 'eth0'
3939

40+
- name: TC_IMAGE
41+
value: 'gaiadocker/iproute2'
42+
4043
- name: NETWORK_PACKET_LOSS_PERCENTAGE
4144
value: '100' # in percentage
4245

0 commit comments

Comments
 (0)