fix: vcluster active wait for cluster to appear
This commit is contained in:
@@ -22,8 +22,18 @@ if [ $? = 0 ]; then
|
|||||||
$k get ns $ns >/dev/null 2>&1 || $k create ns $ns
|
$k get ns $ns >/dev/null 2>&1 || $k create ns $ns
|
||||||
helm template -n $ns $@ $name ./chart | $k apply -f -
|
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
|
kubectl --context $name-vcluster -n dapr-system wait pod --for=condition=ready -l app=dapr-operator
|
||||||
|
echo "wating for Dapr..."
|
||||||
sleep 15
|
sleep 15
|
||||||
kubectl kustomize ../resources/atlantis/manifests/staging | kubectl --context $name-vcluster apply -f-
|
kubectl kustomize ../resources/atlantis/manifests/staging | kubectl --context $name-vcluster apply -f-
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user