diff --git a/vcluster/create-vcluster.sh b/vcluster/create-vcluster.sh index c5e8bf49..b08c8013 100755 --- a/vcluster/create-vcluster.sh +++ b/vcluster/create-vcluster.sh @@ -22,8 +22,18 @@ if [ $? = 0 ]; then $k get ns $ns >/dev/null 2>&1 || $k create ns $ns helm template -n $ns $@ $name ./chart | $k apply -f - - $k wait -n $ns --for=condition=ready pod -l app=vcluster + echo "waiting for vcluster $name to appear... " + while true; do + $k wait -n $ns --for=condition=ready pod -l app=vcluster 2>&1 > /dev/null + if [ $? != 0 ]; then + echo "zzz..." + sleep 15 + else + break + fi + done kubectl --context $name-vcluster -n dapr-system wait pod --for=condition=ready -l app=dapr-operator + echo "wating for Dapr..." sleep 15 kubectl kustomize ../resources/atlantis/manifests/staging | kubectl --context $name-vcluster apply -f- else