From 3166dc921a9da8a43dd4f5dd5577ac10fe1051c4 Mon Sep 17 00:00:00 2001 From: Jonas Juselius Date: Thu, 6 Jun 2024 10:18:36 +0200 Subject: [PATCH] fix: fix vcluster creation script --- vcluster/create-vcluster.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 ***