From 04bdd1f79bb31527bb3088af4ba5be578d8a17f3 Mon Sep 17 00:00:00 2001 From: olegvorobiov Date: Thu, 5 Sep 2024 11:53:55 -0400 Subject: [PATCH] fixed waiting for nodes function --- scripts/kubernetes/cluster-status.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kubernetes/cluster-status.sh b/scripts/kubernetes/cluster-status.sh index 846b3f2..634c6de 100644 --- a/scripts/kubernetes/cluster-status.sh +++ b/scripts/kubernetes/cluster-status.sh @@ -15,7 +15,7 @@ k8s_wait_fornodesandpods() { sleep 5 done while true; do - NOT_READY_NODES=$(kubectl get nodes --no-headers 2>/dev/null | grep -c " Ready") + NOT_READY_NODES=$(kubectl get nodes --no-headers 2>/dev/null | grep -v " Ready" | wc -l) if [ "$NOT_READY_NODES" -eq 0 ]; then echo "All nodes are ready." break