2022-04-08 08:22:01 +00:00
|
|
|
#! /bin/bash
|
2024-02-14 18:41:50 +00:00
|
|
|
set -euo pipefail
|
2022-04-08 08:22:01 +00:00
|
|
|
|
|
|
|
max_retries=240
|
|
|
|
c=0
|
|
|
|
while ! kubectl get keycloaks
|
|
|
|
do
|
2024-02-14 18:41:50 +00:00
|
|
|
echo "$(date +"%T") Waiting for Keycloak CRD"
|
2022-04-08 08:22:01 +00:00
|
|
|
((c++)) && ((c==max_retries)) && exit -1
|
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
|
|
|
|
c=0
|
|
|
|
while ! kubectl get keycloakrealmimports
|
|
|
|
do
|
2024-02-14 18:41:50 +00:00
|
|
|
echo "$(date +"%T") Waiting for Keycloak Realm Import CRD"
|
2022-04-08 08:22:01 +00:00
|
|
|
((c++)) && ((c==max_retries)) && exit -1
|
|
|
|
sleep 1
|
|
|
|
done
|