From b4c6d4822bc6bc6ef7f7d9c352e1f87eb2a12d69 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Sat, 4 Nov 2023 22:21:04 +0100 Subject: [PATCH] Wait for microk8s before attempting to install further things --- .../modules/k8s-cluster/templates/scripts/cluster-setup.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/terraform/modules/k8s-cluster/templates/scripts/cluster-setup.sh b/terraform/modules/k8s-cluster/templates/scripts/cluster-setup.sh index 99b7a31..d3fbfb4 100644 --- a/terraform/modules/k8s-cluster/templates/scripts/cluster-setup.sh +++ b/terraform/modules/k8s-cluster/templates/scripts/cluster-setup.sh @@ -1,5 +1,9 @@ #!/bin/sh +until /snap/bin/microk8s.status --wait-ready; + do sleep 3; echo "waiting for worker status.."; +done + /snap/bin/microk8s helm repo add 2martens https://repo.2martens.de/charts/ /snap/bin/microk8s helm install setup 2martens/cluster_setup --values /run/tmpfiles.d/cluster-setup-values.yaml %{ if high_availability ~}