diff --git a/Jenkinsfile b/Jenkinsfile index 1208721..e3a6443 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -117,13 +117,23 @@ pipeline { # Install MetalLB if not already present (idempotent) kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.14.8/config/manifests/metallb-native.yaml - # Wait for MetalLB controller and speaker to be ready - # speaker is a DaemonSet on all 3 nodes — give it extra time + # Controller must be ready before applying CRDs kubectl rollout status deployment/controller -n metallb-system --timeout=120s - kubectl rollout status daemonset/speaker -n metallb-system --timeout=180s - # Apply IP pool config — CRDs must be ready before this + # Speaker runs on every node as a DaemonSet. + # On CPU-constrained clusters it may be slow — don't fail the + # pipeline, just print status so we can diagnose if needed. + kubectl rollout status daemonset/speaker -n metallb-system --timeout=180s || { + echo "WARNING: MetalLB speaker rollout not complete — printing diagnostics" + kubectl get pods -n metallb-system -o wide + kubectl describe pods -l component=speaker -n metallb-system | grep -A 10 Events + } + + # Apply IP pool and L2Advertisement (idempotent) kubectl apply -f k8s/overlays/on-premise/metallb/ + + echo "MetalLB setup done. Current pod state:" + kubectl get pods -n metallb-system -o wide """ } }