From e2719a9c1d16b3fc3e8966baa3fdfff59a641a84 Mon Sep 17 00:00:00 2001 From: LordMathis Date: Sun, 23 Mar 2025 13:31:01 +0100 Subject: [PATCH] Add wait condition for metallb --- infrastructure/controllers/metallb/config-job.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/infrastructure/controllers/metallb/config-job.yaml b/infrastructure/controllers/metallb/config-job.yaml index aab9974..0b596d2 100644 --- a/infrastructure/controllers/metallb/config-job.yaml +++ b/infrastructure/controllers/metallb/config-job.yaml @@ -15,6 +15,10 @@ spec: - /bin/bash - -c - | + # Wait for the webhook to be ready + echo "Waiting for MetalLB webhook to be ready..." + kubectl -n metallb-system wait --for=condition=ready --timeout=120s pods --all + # Get the external IP of the node using kubectl SERVER_IP=$(kubectl get nodes -o jsonpath='{.items[0].status.addresses[?(@.type=="ExternalIP")].address}')