fix: remove MetalLB setup stage — rely on pre-installed MetalLB
Some checks failed
test reactjs website/pipeline/head Build started...
scrum-manager/pipeline/head There was a failure building this commit

MetalLB is already installed and configured on the cluster. The pipeline
no longer needs to apply IPAddressPool or L2Advertisement resources.
Removed the 'Setup MetalLB' stage and deleted the metallb overlay files.
The frontend Service type: LoadBalancer is already set, so MetalLB will
automatically assign an external IP on deployment.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
tusuii
2026-02-28 00:45:41 +05:30
parent c6bb1ac9b4
commit c55c0dff69
3 changed files with 0 additions and 45 deletions

29
Jenkinsfile vendored
View File

@@ -110,35 +110,6 @@ pipeline {
} }
} }
stage('Setup MetalLB') {
steps {
withKubeConfig([credentialsId: "${K8S_CRED_ID}"]) {
sh """
# MetalLB is already installed on this cluster.
# Wait for the controller to be ready — the webhook runs inside it.
kubectl rollout status deployment/controller -n metallb-system --timeout=120s
# If the webhook service has no ready endpoints (e.g. stale ClusterIP
# from a previously applied metallb-native.yaml whose pods were removed),
# delete the broken ValidatingWebhookConfiguration so the apply can
# proceed without being blocked by an unreachable webhook.
READY_ADDRS=\$(kubectl get endpoints metallb-webhook-service \\
-n metallb-system \\
-o jsonpath='{.subsets[*].addresses[*].ip}' 2>/dev/null || echo "")
if [ -z "\$READY_ADDRS" ]; then
echo "WARNING: metallb-webhook-service has no ready endpoints — removing stale webhook config."
kubectl delete validatingwebhookconfiguration metallb-webhook-configuration 2>/dev/null || true
fi
kubectl apply -f k8s/overlays/on-premise/metallb/
echo "MetalLB pod state:"
kubectl get pods -n metallb-system -o wide
"""
}
}
}
stage('Deploy to K8s') { stage('Deploy to K8s') {
steps { steps {
withKubeConfig([credentialsId: "${K8S_CRED_ID}"]) { withKubeConfig([credentialsId: "${K8S_CRED_ID}"]) {

View File

@@ -1,8 +0,0 @@
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: scrum-manager-pool
namespace: metallb-system
spec:
addresses:
- 192.168.108.213/32

View File

@@ -1,8 +0,0 @@
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: scrum-manager-l2
namespace: metallb-system
spec:
ipAddressPools:
- scrum-manager-pool