From 9d9fab02ac724e9fba3e25088214a3d8ebebc8cc Mon Sep 17 00:00:00 2001 From: Naga Ravi Chaitanya Elluri Date: Sat, 22 Jul 2023 17:57:09 -0400 Subject: [PATCH] Label the nodes to target for the chaos hog in prow --- prow/cpu-hog/prow_run.sh | 3 +++ prow/memory-hog/prow_run.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/prow/cpu-hog/prow_run.sh b/prow/cpu-hog/prow_run.sh index 4e71ccb..cc59854 100644 --- a/prow/cpu-hog/prow_run.sh +++ b/prow/cpu-hog/prow_run.sh @@ -21,6 +21,9 @@ oc config view echo "Printing node info" for node in $(oc get nodes | awk 'NR!=1{print $1}'); do oc get node/$node -o yaml; done +# Label the nodes to target +for node in $(oc get nodes --selector="node-role.kubernetes.io/worker=" | awk ' NR>1 {print $1}'); do oc label node/$node chaos-hog=true; done + source node-cpu-hog/env.sh source env.sh source common_run.sh diff --git a/prow/memory-hog/prow_run.sh b/prow/memory-hog/prow_run.sh index 4d61618..65e5cc4 100755 --- a/prow/memory-hog/prow_run.sh +++ b/prow/memory-hog/prow_run.sh @@ -21,6 +21,9 @@ oc config view echo "Printing node info" for node in $(oc get nodes | awk 'NR!=1{print $1}'); do oc get node/$node -o yaml; done +# Label the nodes to target +for node in $(oc get nodes --selector="node-role.kubernetes.io/worker=" | awk ' NR>1 {print $1}'); do oc label node/$node chaos-hog=true; done + source node-memory-hog/env.sh source env.sh source common_run.sh