fix: make MetalLB speaker rollout non-blocking with diagnostics
Speaker DaemonSet on CPU-constrained cluster takes >180s to start all 3 pods. Don't fail the entire pipeline — warn and print speaker pod status instead. Controller must still be ready (it handles IP assignment) before continuing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
18
Jenkinsfile
vendored
18
Jenkinsfile
vendored
@@ -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
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user