fix: wait for pods to be ready before deletion - 2
This commit is contained in:
parent
a00b867db5
commit
b69ea10df0
|
|
@ -62,13 +62,10 @@ jobs:
|
||||||
envsubst < kubernetes/templates/admin-frontend-deployment.yaml | tee deployed/admin-frontend-deployment.yaml | kubectl apply -f -
|
envsubst < kubernetes/templates/admin-frontend-deployment.yaml | tee deployed/admin-frontend-deployment.yaml | kubectl apply -f -
|
||||||
envsubst < kubernetes/templates/admin-frontend-service.yaml | tee deployed/admin-frontend-service.yaml | kubectl apply -f -
|
envsubst < kubernetes/templates/admin-frontend-service.yaml | tee deployed/admin-frontend-service.yaml | kubectl apply -f -
|
||||||
|
|
||||||
# wait until
|
|
||||||
kubectl get pods --field-selector=status.phase!=Running | grep -v "STATUS" | wc -l
|
|
||||||
|
|
||||||
# wait for all pods to be ready
|
# wait for all pods to be ready
|
||||||
tried=0
|
tried=0
|
||||||
while true; do
|
while true; do
|
||||||
if [ $tried -eq 5 ]; then
|
if [ $tried -eq 10 ]; then
|
||||||
echo "Waited too long for all pods to be ready"
|
echo "Waited too long for all pods to be ready"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue