From ed33c1b0c2f3845f59ee59bd4e7f24595d060ad5 Mon Sep 17 00:00:00 2001 From: jerger Date: Fri, 25 Nov 2022 13:15:54 +0100 Subject: [PATCH] add one additional private address-pool --- .../infrastructure/k3s/metallb-config.dual.template.yaml | 9 +++++++-- .../infrastructure/k3s/metallb-config.ipv4.template.yaml | 8 ++++++-- .../provs/server/infrastructure/k3s/traefik.yaml | 1 + 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/main/resources/org/domaindrivenarchitecture/provs/server/infrastructure/k3s/metallb-config.dual.template.yaml b/src/main/resources/org/domaindrivenarchitecture/provs/server/infrastructure/k3s/metallb-config.dual.template.yaml index 2bb9135..a1e43df 100644 --- a/src/main/resources/org/domaindrivenarchitecture/provs/server/infrastructure/k3s/metallb-config.dual.template.yaml +++ b/src/main/resources/org/domaindrivenarchitecture/provs/server/infrastructure/k3s/metallb-config.dual.template.yaml @@ -6,8 +6,13 @@ metadata: data: config: | address-pools: - - name: default + - name: public protocol: layer2 addresses: - ${node_ipv4}/32 - - ${node_ipv6}/128 \ No newline at end of file + - ${node_ipv6}/128 + - name: private + protocol: layer2 + addresses: + - ${loopback_ipv4}/32 + - ${loopback_ipv6}/128 \ No newline at end of file diff --git a/src/main/resources/org/domaindrivenarchitecture/provs/server/infrastructure/k3s/metallb-config.ipv4.template.yaml b/src/main/resources/org/domaindrivenarchitecture/provs/server/infrastructure/k3s/metallb-config.ipv4.template.yaml index f56534f..818bd6c 100644 --- a/src/main/resources/org/domaindrivenarchitecture/provs/server/infrastructure/k3s/metallb-config.ipv4.template.yaml +++ b/src/main/resources/org/domaindrivenarchitecture/provs/server/infrastructure/k3s/metallb-config.ipv4.template.yaml @@ -6,7 +6,11 @@ metadata: data: config: | address-pools: - - name: default + - name: public protocol: layer2 addresses: - - ${node_ipv4}/32 \ No newline at end of file + - ${node_ipv4}/32 + - name: private + protocol: layer2 + addresses: + - ${loopback_ipv4}/32 \ No newline at end of file diff --git a/src/main/resources/org/domaindrivenarchitecture/provs/server/infrastructure/k3s/traefik.yaml b/src/main/resources/org/domaindrivenarchitecture/provs/server/infrastructure/k3s/traefik.yaml index 1c1b5c8..b196f10 100644 --- a/src/main/resources/org/domaindrivenarchitecture/provs/server/infrastructure/k3s/traefik.yaml +++ b/src/main/resources/org/domaindrivenarchitecture/provs/server/infrastructure/k3s/traefik.yaml @@ -48,6 +48,7 @@ spec: ipFamilyPolicy: "PreferDualStack" annotations: metallb.universe.tf/allow-shared-ip: "shared-ip-service-group" + metallb.universe.tf/address-pool: public spec: type: LoadBalancer externalTrafficPolicy: Cluster