@@ -137,7 +137,7 @@ task "pod_network_latency", ["install_litmus"] do |t, args|
137
137
KubectlClient ::Apply .file(rbac_path)
138
138
139
139
# TODO Use Labels to Annotate, not resource["name"]
140
- KubectlClient ::Utils .annotate(" deployment" , resource[" name" ], " litmuschaos.io/chaos=\" true\" " )
140
+ KubectlClient ::Utils .annotate(" deployment" , resource[" name" ], " litmuschaos.io/chaos=\" true\" " , namespace: app_namespace )
141
141
142
142
chaos_experiment_name = " pod-network-latency"
143
143
test_name = " #{ resource[" name" ] } -#{ Random ::Secure .hex(4 )} "
@@ -205,7 +205,7 @@ task "pod_network_corruption", ["install_litmus"] do |t, args|
205
205
File .write(rbac_path, rbac_yaml)
206
206
KubectlClient ::Apply .file(rbac_path)
207
207
208
- KubectlClient ::Utils .annotate(" deployment" , resource[" name" ], " litmuschaos.io/chaos=\" true\" " )
208
+ KubectlClient ::Utils .annotate(" deployment" , resource[" name" ], " litmuschaos.io/chaos=\" true\" " , namespace: app_namespace )
209
209
210
210
chaos_experiment_name = " pod-network-corruption"
211
211
test_name = " #{ resource[" name" ] } -#{ Random .rand(99 )} "
@@ -260,8 +260,8 @@ task "pod_network_duplication", ["install_litmus"] do |t, args|
260
260
rbac_yaml = rbac_yaml.gsub(" namespace: default" , " namespace: #{ app_namespace } " )
261
261
File .write(rbac_path, rbac_yaml)
262
262
KubectlClient ::Apply .file(rbac_path)
263
-
264
- KubectlClient ::Utils .annotate(" deployment" , resource[" name" ], " litmuschaos.io/chaos=\" true\" " )
263
+ puts resource[ " name " ]
264
+ KubectlClient ::Utils .annotate(" deployment" , resource[" name" ], " litmuschaos.io/chaos=\" true\" " , namespace: app_namespace )
265
265
266
266
chaos_experiment_name = " pod-network-duplication"
267
267
test_name = " #{ resource[" name" ] } -#{ Random .rand(99 )} "
@@ -315,7 +315,7 @@ task "disk_fill", ["install_litmus"] do |t, args|
315
315
File .write(rbac_path, rbac_yaml)
316
316
KubectlClient ::Apply .file(rbac_path)
317
317
318
- KubectlClient ::Utils .annotate(" deployment" , resource[" name" ], " litmuschaos.io/chaos=\" true\" " )
318
+ KubectlClient ::Utils .annotate(" deployment" , resource[" name" ], " litmuschaos.io/chaos=\" true\" " , namespace: app_namespace )
319
319
320
320
chaos_experiment_name = " disk-fill"
321
321
test_name = " #{ resource[" name" ] } -#{ Random .rand(99 )} "
@@ -402,7 +402,7 @@ task "pod_delete", ["install_litmus"] do |t, args|
402
402
KubectlClient ::Apply .file(rbac_path)
403
403
404
404
Log .info { " resource: #{ resource[" name" ] } " }
405
- KubectlClient ::Utils .annotate(" deployment" , resource[" name" ], " litmuschaos.io/chaos=\" true\" " )
405
+ KubectlClient ::Utils .annotate(" deployment" , resource[" name" ], " litmuschaos.io/chaos=\" true\" " , namespace: app_namespace )
406
406
407
407
chaos_experiment_name = " pod-delete"
408
408
target_pod_name = " "
@@ -473,7 +473,7 @@ task "pod_memory_hog", ["install_litmus"] do |t, args|
473
473
File .write(rbac_path, rbac_yaml)
474
474
KubectlClient ::Apply .file(rbac_path)
475
475
476
- KubectlClient ::Utils .annotate(" deployment" , resource[" name" ], " litmuschaos.io/chaos=\" true\" " )
476
+ KubectlClient ::Utils .annotate(" deployment" , resource[" name" ], " litmuschaos.io/chaos=\" true\" " , namespace: app_namespace )
477
477
478
478
chaos_experiment_name = " pod-memory-hog"
479
479
target_pod_name = " "
@@ -531,7 +531,7 @@ task "pod_io_stress", ["install_litmus"] do |t, args|
531
531
File .write(rbac_path, rbac_yaml)
532
532
KubectlClient ::Apply .file(rbac_path)
533
533
534
- KubectlClient ::Utils .annotate(" deployment" , resource[" name" ], " litmuschaos.io/chaos=\" true\" " )
534
+ KubectlClient ::Utils .annotate(" deployment" , resource[" name" ], " litmuschaos.io/chaos=\" true\" " , namespace: app_namespace )
535
535
536
536
chaos_experiment_name = " pod-io-stress"
537
537
target_pod_name = " "
@@ -596,7 +596,7 @@ task "pod_dns_error", ["install_litmus"] do |t, args|
596
596
File .write(rbac_path, rbac_yaml)
597
597
KubectlClient ::Apply .file(rbac_path)
598
598
599
- KubectlClient ::Utils .annotate(" deployment" , resource[" name" ], " litmuschaos.io/chaos=\" true\" " )
599
+ KubectlClient ::Utils .annotate(" deployment" , resource[" name" ], " litmuschaos.io/chaos=\" true\" " , namespace: app_namespace )
600
600
601
601
chaos_experiment_name = " pod-dns-error"
602
602
target_pod_name = " "
0 commit comments