From 1d635e04e4595aea322c0303718686cd49d40185 Mon Sep 17 00:00:00 2001 From: Tony Fouchard Date: Tue, 15 Feb 2022 13:57:19 -0800 Subject: [PATCH] Allow to specify a source address for metallb peerings, and target only some nodes using node selectors (#8534) --- .../metallb/templates/metallb-config.yml.j2 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/kubernetes-apps/metallb/templates/metallb-config.yml.j2 b/roles/kubernetes-apps/metallb/templates/metallb-config.yml.j2 index 7e33ce21d..abfcb92b8 100644 --- a/roles/kubernetes-apps/metallb/templates/metallb-config.yml.j2 +++ b/roles/kubernetes-apps/metallb/templates/metallb-config.yml.j2 @@ -12,6 +12,13 @@ data: - peer-address: {{ peer.peer_address }} peer-asn: {{ peer.peer_asn }} my-asn: {{ peer.my_asn }} +{% if peer.source_address is defined %} + source-address: {{ peer.source_address }} +{% endif %} +{% if peer.node_selectors is defined %} + node-selectors: + {{ peer.node_selectors | to_yaml(indent=2, width=1337) | indent(8) }} +{% endif %} {% endfor %} {% endif %} address-pools: