From 9fb30341de48d8baecf68aaf6815a2d488c16a54 Mon Sep 17 00:00:00 2001 From: erik Date: Thu, 21 Jul 2022 16:58:49 +0200 Subject: [PATCH] Update traefik template Enable multiple loadBalancerIPs for metallb. Apply the traefik template. --- .../provs/server/infrastructure/K3s.kt | 2 +- .../provs/server/infrastructure/k3s/traefik.template.yaml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/server/infrastructure/K3s.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/server/infrastructure/K3s.kt index 6b53ff0..fbaa5cc 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/server/infrastructure/K3s.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/server/infrastructure/K3s.kt @@ -29,7 +29,7 @@ private val k3sInstallScript = File( "/usr/local/bin/k3s-install.sh") private val k3sConfigFile = File( "/etc/rancher/k3s/config.yaml") private val k3sKubeConfig = File("/etc/rancher/k3s/k3s.yaml") -private val k3sTraefikWorkaround = File(k3sManualManifestsDir, "traefik.template.yaml") +private val k3sTraefikWorkaround = File(k3sManualManifestsDir, "traefik.yaml") private val certManagerDeployment = File(k3sManualManifestsDir, "cert-manager.yaml") private val certManagerIssuer = File(k3sManualManifestsDir, "le-issuer.yaml") diff --git a/src/main/resources/org/domaindrivenarchitecture/provs/server/infrastructure/k3s/traefik.template.yaml b/src/main/resources/org/domaindrivenarchitecture/provs/server/infrastructure/k3s/traefik.template.yaml index c1f4b30..25651d8 100644 --- a/src/main/resources/org/domaindrivenarchitecture/provs/server/infrastructure/k3s/traefik.template.yaml +++ b/src/main/resources/org/domaindrivenarchitecture/provs/server/infrastructure/k3s/traefik.template.yaml @@ -46,7 +46,10 @@ spec: effect: "NoSchedule" service: ipFamilyPolicy: "PreferDualStack" - loadBalancerIP: ${node_ipv4} + metadata: + annotations: + metallb.universe.tf/loadBalancerIPs: "${node_ipv4}, ${node_ipv6}" spec: type: LoadBalancer externalTrafficPolicy: Local +