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,6 +176,22 @@ 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=5m
181+ # Wait for registration-service route to exist
182+ NEXT_WAIT_TIME=0
183+ while [[ -z $( oc get routes registration-service -n ${HOST_NS} -o jsonpath=' {.status.ingress[0].host}' 2> /dev/null || true) ]]; do
184+ if [[ ${NEXT_WAIT_TIME} -eq 60 ]]; then
185+ echo " "
186+ echo " [$( date ' +%Y-%m-%d %H:%M:%S' ) ] ERROR: Timeout waiting for registration-service route"
187+ oc get routes -n ${HOST_NS}
188+ exit 1
189+ fi
190+ echo -n " ."
191+ sleep 2
192+ (( NEXT_WAIT_TIME++ ))
193+ done
194+
179195 # Get the Registration Service API URL
180196 REGISTRATION_SERVICE_API=" https://$( oc get route registration-service -n ${HOST_NS} -o custom-columns=" :spec.host" | tr -d ' \n' ) /api/v1"
181197
You can’t perform that action at this time.
0 commit comments