Skip to content

Commit

Permalink
Wait for k8s pods on initial cluster start
Browse files Browse the repository at this point in the history
Don't wait for previous kubevirt deployments to become ready. It will be
deleted and redeployed anyway, and it can be broken.

Signed-off-by: Roman Mohr <[email protected]>
  • Loading branch information
rmohr committed Dec 7, 2017
1 parent 151c32d commit 46631b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions automation/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,16 @@ done
echo "Nodes are ready:"
kubectl get nodes

# Wait for all kubernetes pods to become ready (dont't wait for kubevirt pods from previous deployments)
sleep 10
while [ -n "$(kubectl get pods -n kube-system --no-headers | grep -v Running)" ]; do
while [ -n "$(kubectl get pods -n kube-system -l '!kubevirt.io' --no-headers | grep -v Running)" ]; do
echo "Waiting for kubernetes pods to become ready ..."
kubectl get pods -n kube-system --no-headers | >&2 grep -v Running
sleep 10
done

echo "Kubernetes is ready:"
kubectl get pods -n kube-system
kubectl get pods -n kube-system -l '!kubevirt.io'
echo ""
echo ""

Expand Down

0 comments on commit 46631b1

Please sign in to comment.