2022-04-08 08:22:01 +00:00
|
|
|
#! /bin/bash
|
|
|
|
set -euxo pipefail
|
|
|
|
|
2022-04-12 09:19:24 +00:00
|
|
|
max_retries=500
|
2022-04-08 08:22:01 +00:00
|
|
|
c=0
|
|
|
|
while [[ $(kubectl get keycloaks/example-kc -o jsonpath="{.status.conditions[?(@.type == 'Ready')].status}") != "true" ]]
|
|
|
|
do
|
|
|
|
echo "waiting for Keycloak example-kc status"
|
|
|
|
((c++)) && ((c==max_retries)) && exit -1
|
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
|
|
|
|
c=0
|
|
|
|
while [[ $(kubectl get keycloakrealmimports/example-count0-kc -o jsonpath="{.status.conditions[?(@.type == 'Done')].status}") != "true" ]]
|
|
|
|
do
|
|
|
|
echo "waiting for Keycloak Realm Import example-count0-kc status"
|
|
|
|
((c++)) && ((c==max_retries)) && exit -1
|
|
|
|
sleep 1
|
|
|
|
done
|