From 5a40884543cc406ac2075ac386640759f64fe663 Mon Sep 17 00:00:00 2001 From: bom Date: Fri, 20 Jan 2023 10:50:53 +0100 Subject: [PATCH] Add Layer 2 advertisement for IPAddressPools --- .../provs/server/infrastructure/K3s.kt | 2 ++ .../infrastructure/k3s/metallb-l2advertisement.yaml | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 src/main/resources/org/domaindrivenarchitecture/provs/server/infrastructure/k3s/metallb-l2advertisement.yaml 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 9bb158f..4d57a7b 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/server/infrastructure/K3s.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/server/infrastructure/K3s.kt @@ -100,6 +100,8 @@ fun Prov.installK3s(k3sConfig: K3sConfig): ProvResult { ) } + applyK3sFileFromResource(File(k3sManualManifestsDir, "metallb-l2advertisement.yaml")) + // traefik if (k3sConfig.isDualStack()) { // see https://github.com/k3s-io/k3s/discussions/5003 diff --git a/src/main/resources/org/domaindrivenarchitecture/provs/server/infrastructure/k3s/metallb-l2advertisement.yaml b/src/main/resources/org/domaindrivenarchitecture/provs/server/infrastructure/k3s/metallb-l2advertisement.yaml new file mode 100644 index 0000000..3adbac6 --- /dev/null +++ b/src/main/resources/org/domaindrivenarchitecture/provs/server/infrastructure/k3s/metallb-l2advertisement.yaml @@ -0,0 +1,9 @@ +apiVersion: metallb.io/v1beta1 +kind: L2Advertisement +metadata: + name: layer2 + namespace: metallb-system +spec: + ipAddressPools: + - private + - public \ No newline at end of file