diff --git a/helm-values/traefik.yaml b/helm-values/traefik.yaml new file mode 100644 index 0000000..9babe00 --- /dev/null +++ b/helm-values/traefik.yaml @@ -0,0 +1,8 @@ +nodeSelector: + com.van-hemmen.role: gateway + com.van-hemmen.hosting: ovh +tolerations: + - key: "com.van-hemmen.role" + operator: "Equal" + value: "gateway" + effect: "NoSchedule" diff --git a/scripts/01_install_traefik.sh b/scripts/01_install_traefik.sh old mode 100644 new mode 100755 index fe070f6..cd435c4 --- a/scripts/01_install_traefik.sh +++ b/scripts/01_install_traefik.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -ex +set -e # This script installs Traefik using Helm, with MetalLB load balancer configuration. # Ensure you pass the IP from the MetalLB pool as an argument when running the script. @@ -20,11 +20,11 @@ helm repo add traefik https://traefik.github.io/charts helm repo update # Creating the Traefik namespace -kubectl create namespace traefik +kubectl create namespace traefik || true # Uncomment the line below to enable privileged pod security policy for the namespace kubectl label namespace traefik pod-security.kubernetes.io/enforce=privileged # Installing Traefik with the MetalLB IP specified -helm install traefik traefik/traefik --namespace traefik \ +helm install traefik traefik/traefik --namespace traefik -f helm-values/traefik.yaml \ --set service.type=LoadBalancer \ --set service.loadBalancerIP=$METALLB_IP