Skip to content

Commit 6363bae

Browse files
committed
Add missing namespace param to annotate calls, update shard.lock
Signed-off-by: Rafal Lal <rafal.lal@tietoevry.com>
1 parent 2d16c6d commit 6363bae

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

shard.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ shards:
4646

4747
kubectl_client:
4848
git: https://github.com/cnf-testsuite/kubectl_client.git
49-
version: 1.0.6+git.commit.0c2f05e759404a9a558b0c2e9f68ee4b34daeefa
49+
version: 1.0.6+git.commit.0ea49dea3450699eeb3dcdda698c6231d29d5d07
5050

5151
popcorn:
5252
git: https://github.com/icyleaf/popcorn.git

src/tasks/workload/reliability.cr

+9-9
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ task "pod_network_latency", ["install_litmus"] do |t, args|
137137
KubectlClient::Apply.file(rbac_path)
138138

139139
#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)
141141

142142
chaos_experiment_name = "pod-network-latency"
143143
test_name = "#{resource["name"]}-#{Random::Secure.hex(4)}"
@@ -205,7 +205,7 @@ task "pod_network_corruption", ["install_litmus"] do |t, args|
205205
File.write(rbac_path, rbac_yaml)
206206
KubectlClient::Apply.file(rbac_path)
207207

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)
209209

210210
chaos_experiment_name = "pod-network-corruption"
211211
test_name = "#{resource["name"]}-#{Random.rand(99)}"
@@ -260,8 +260,8 @@ task "pod_network_duplication", ["install_litmus"] do |t, args|
260260
rbac_yaml = rbac_yaml.gsub("namespace: default", "namespace: #{app_namespace}")
261261
File.write(rbac_path, rbac_yaml)
262262
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)
265265

266266
chaos_experiment_name = "pod-network-duplication"
267267
test_name = "#{resource["name"]}-#{Random.rand(99)}"
@@ -315,7 +315,7 @@ task "disk_fill", ["install_litmus"] do |t, args|
315315
File.write(rbac_path, rbac_yaml)
316316
KubectlClient::Apply.file(rbac_path)
317317

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)
319319

320320
chaos_experiment_name = "disk-fill"
321321
test_name = "#{resource["name"]}-#{Random.rand(99)}"
@@ -402,7 +402,7 @@ task "pod_delete", ["install_litmus"] do |t, args|
402402
KubectlClient::Apply.file(rbac_path)
403403

404404
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)
406406

407407
chaos_experiment_name = "pod-delete"
408408
target_pod_name = ""
@@ -473,7 +473,7 @@ task "pod_memory_hog", ["install_litmus"] do |t, args|
473473
File.write(rbac_path, rbac_yaml)
474474
KubectlClient::Apply.file(rbac_path)
475475

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)
477477

478478
chaos_experiment_name = "pod-memory-hog"
479479
target_pod_name = ""
@@ -531,7 +531,7 @@ task "pod_io_stress", ["install_litmus"] do |t, args|
531531
File.write(rbac_path, rbac_yaml)
532532
KubectlClient::Apply.file(rbac_path)
533533

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)
535535

536536
chaos_experiment_name = "pod-io-stress"
537537
target_pod_name = ""
@@ -596,7 +596,7 @@ task "pod_dns_error", ["install_litmus"] do |t, args|
596596
File.write(rbac_path, rbac_yaml)
597597
KubectlClient::Apply.file(rbac_path)
598598

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)
600600

601601
chaos_experiment_name = "pod-dns-error"
602602
target_pod_name = ""

0 commit comments

Comments
 (0)