#0000 - Add MetalLB Helm values and update installation script

Introduces custom `metallb.yaml` Helm values with node selectors and tolerations targeting specific nodes. Renames and adjusts MetalLB resource file, removing unused IPs. Updates installation script to apply the new Helm values and handle namespace creation idempotently.
This commit is contained in:
Guillaume "B.B." Van Hemmen 2024-12-27 13:46:42 +01:00
parent d271b24685
commit 58986afe32
3 changed files with 21 additions and 4 deletions

19
helm-values/metallb.yaml Normal file
View file

@ -0,0 +1,19 @@
controller:
nodeSelector:
com.van-hemmen.role: gateway
com.van-hemmen.hosting: ovh
tolerations:
- key: "com.van-hemmen.role"
operator: "Equal"
value: "gateway"
effect: "NoSchedule"
speaker:
nodeSelector:
com.van-hemmen.role: gateway
com.van-hemmen.hosting: ovh
tolerations:
- key: "com.van-hemmen.role"
operator: "Equal"
value: "gateway"
effect: "NoSchedule"

View file

@ -5,8 +5,6 @@ metadata:
namespace: metallb-system
spec:
addresses:
- 5.196.149.159/32
- 5.196.149.200/32
- 5.196.149.203/32
---
apiVersion: metallb.io/v1beta1

4
scripts/00_install_metalLB.sh Normal file → Executable file
View file

@ -5,7 +5,7 @@ set -ex
helm repo add metallb https://metallb.github.io/metallb
helm repo update
kubectl create namespace metallb-system
kubectl create namespace metallb-system || true
kubectl label namespace metallb-system pod-security.kubernetes.io/enforce=privileged
helm install metallb metallb/metallb --namespace metallb-system
helm install metallb metallb/metallb --namespace metallb-system -f ./helm-values/metallb.yaml