From 4dedd1d750c9835945443290695ea1f4ed86086b Mon Sep 17 00:00:00 2001 From: "Joseph D. Marhee" Date: Mon, 17 Jun 2024 10:54:14 -0500 Subject: [PATCH] Updates scripts/retrieve_kubeconfig.sh to remove sleep, now just waits until the file is present instead of an arbitrary 180s Signed-off-by: Joseph D. Marhee --- scripts/retrieve_kubeconfig.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/retrieve_kubeconfig.sh b/scripts/retrieve_kubeconfig.sh index 71bce6e..8586f40 100755 --- a/scripts/retrieve_kubeconfig.sh +++ b/scripts/retrieve_kubeconfig.sh @@ -3,7 +3,10 @@ CONTROLLER_IP=$1 KEY_PATH=$2 -/bin/sleep 180 ; \ +while ! /usr/bin/ssh -i $KEY_PATH \ + -o StrictHostKeyChecking=no \ + -o UserKnownHostsFile=/dev/null -q \ + root@$CONTROLLER_IP "ls /etc/rancher/k3s/k3s.yaml" &> /dev/null; do sleep 1; done && \ if [[ "$OSTYPE" == "darwin"* ]]; then CONFIG=$(/usr/bin/ssh -i \ $KEY_PATH \