fix: vcluster active wait for cluster to appear

This commit is contained in:
Jonas Juselius
2024-05-30 10:54:09 +02:00
parent 7220cad121
commit 17aeae836f
+11 -1
View File
@@ -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