fix: wait for pods to be ready before deletion - 2

This commit is contained in:
Fu Zi Xiang 2023-12-25 19:33:20 +08:00
parent a00b867db5
commit b69ea10df0
No known key found for this signature in database
1 changed files with 1 additions and 4 deletions

View File

@ -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-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
tried=0
while true; do
if [ $tried -eq 5 ]; then
if [ $tried -eq 10 ]; then
echo "Waited too long for all pods to be ready"
exit 1
fi