Skip to content

Commit

Permalink
fixed waiting for nodes function
Browse files Browse the repository at this point in the history
  • Loading branch information
olegvorobiov committed Sep 5, 2024
1 parent fd6fe5c commit 04bdd1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/kubernetes/cluster-status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 04bdd1f

Please sign in to comment.