diff --git a/vcluster/create-vcluster.sh b/vcluster/create-vcluster.sh index d8fac5f5..def3fd4f 100755 --- a/vcluster/create-vcluster.sh +++ b/vcluster/create-vcluster.sh @@ -27,10 +27,13 @@ if [ $? = 0 ]; then 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- + vcluster connect $name-vcluster -- kubectl -n dapr-system wait pod --for=condition=ready -l app=dapr-operator + echo "wating 20s for Dapr..." + sleep 20 + tmp=/tmp/$name-vlcuster.tmp$$ + kubectl kustomize ../resources/atlantis/manifests/staging > $tmp + vcluster connect $name-vcluster -- kubectl apply -f $tmp + rm $tmp else cat << EOF ***