Skip to content

Commit 5c6a3f3

Browse files
author
Lily He
committed
add timebound wait until voyager controller pod is ready
1 parent 8e55fec commit 5c6a3f3

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

kubernetes/internal/create-weblogic-domain.sh

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -736,13 +736,22 @@ function setupVoyagerLoadBalancer {
736736
| bash -s -- --provider=baremetal --namespace=voyager
737737
fi
738738

739-
# verify Voyager controller pod is ready
740-
local ready=`kubectl -n voyager get pod | grep voyager-operator | awk ' { print $2; } '`
741-
if [ "${ready}" != "1/1" ] ; then
742-
fail "Voyager Ingress Controller is not ready"
743-
fi
739+
echo Checking voyager controller pod is ready
740+
local maxwaitsecs=30
741+
local mstart=`date +%s`
742+
while : ; do
743+
local mnow=`date +%s`
744+
local ready=`kubectl -n voyager get pod | grep voyager-operator | awk ' { print $2; } '`
745+
if [ "${ready}" = "1/1" ] ; then
746+
echo "Voyager Ingress Controller is ready"
747+
break
748+
fi
749+
if [ $((mnow - mstart)) -gt $((maxwaitsecs)) ]; then
750+
fail "The Voyager Ingress Controller is not ready."
751+
fi
752+
sleep 1
753+
done
744754

745-
# deploy Voyager Ingress resource
746755
kubectl apply -f ${voyagerOutput}
747756

748757
echo Checking Voyager Ingress resource

0 commit comments

Comments
 (0)