automation: ignore completed pods when checking for readiness
@@ -274,9 +274,9 @@ for i in ${namespaces[@]}; do
# Make sure all containers are ready
current_time=0
- while [ -n "$(kubectl get pods -n $i -o'custom-columns=status:status.containerStatuses[*].ready' --no-headers | grep false)" ]; do
+ while [ -n "$(kubectl get pods -n $i --field-selector=status.phase==Running -o'custom-columns=status:status.containerStatuses[*].ready' --no-headers | grep false)" ]; do
echo "Waiting for KubeVirt containers to become ready ..."
- kubectl get pods -n $i -o'custom-columns=status:status.containerStatuses[*].ready' --no-headers | grep false || true
+ kubectl get pods -n $i --field-selector=status.phase==Running -o'custom-columns=status:status.containerStatuses[*].ready' --no-headers | grep false || true
sleep $sample
current_time=$((current_time + sample))
