File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -176,8 +176,24 @@ if [[ ${DEPLOY_UI} == "true" ]]; then
176176 # Get the HOST_NS (host operator namespace)
177177 HOST_NS=$( oc get projects -l app=host-operator --output=name -o jsonpath=' {range .items[*]}{.metadata.name}{"\n"}{end}' | sort | tail -n 1)
178178
179- # Wait for registration-service deployment and route to be ready
180- oc wait --for=condition=Available deployment/registration-service -n ${HOST_NS} --timeout=10m
179+ # Wait for registration-service deployment to be created
180+ MAX_ITERATIONS=150 # 5 minutes in 2-second intervals
181+ COUNTER=0
182+ while ! oc get deployment/registration-service -n ${HOST_NS} & > /dev/null; do
183+ if [[ $COUNTER -ge $MAX_ITERATIONS ]]; then
184+ echo " ERROR: registration-service was not created after 5m"
185+ echo " Available deployments in ${HOST_NS} :"
186+ oc get deployments -n ${HOST_NS}
187+ exit 1
188+ fi
189+ echo -n " ."
190+ sleep 2
191+ (( ++ COUNTER))
192+ done
193+
194+ # Wait for registration-service deployment to be available
195+ oc wait --for=condition=Available deployment/registration-service -n ${HOST_NS} --timeout=2m
196+
181197 # Wait for registration-service route to exist
182198 NEXT_WAIT_TIME=0
183199 while [[ -z $( oc get routes registration-service -n ${HOST_NS} -o jsonpath=' {.status.ingress[0].host}' 2> /dev/null || true) ]]; do
@@ -189,7 +205,7 @@ if [[ ${DEPLOY_UI} == "true" ]]; then
189205 fi
190206 echo -n " ."
191207 sleep 2
192- (( NEXT_WAIT_TIME ++ ))
208+ (( ++ NEXT_WAIT_TIME ))
193209 done
194210
195211 # Get the Registration Service API URL
You can’t perform that action at this time.
0 commit comments