From 668d7fb896c226cde2960491a60b917db8a4bf7e Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Mon, 29 Jul 2024 23:05:30 +0200 Subject: [PATCH] k3s_server: add kube_vip_arp parameter (#550) With the kube_vip_arp parameter it is possible to set or unset the vip_arp environment variable of the kube-vip-ds daemonset. The value of the kube_vip_arp is true by default to not change the existing default. Signed-off-by: Christian Berendt Co-authored-by: Techno Tim --- roles/k3s_server/defaults/main.yml | 3 +++ roles/k3s_server/templates/vip.yaml.j2 | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/k3s_server/defaults/main.yml b/roles/k3s_server/defaults/main.yml index 46f1528c..349889b5 100644 --- a/roles/k3s_server/defaults/main.yml +++ b/roles/k3s_server/defaults/main.yml @@ -4,6 +4,9 @@ # will determine the right interface automatically at runtime. kube_vip_iface: null +# Enables ARP broadcasts from Leader +kube_vip_arp: true + # Name of the master group group_name_master: master diff --git a/roles/k3s_server/templates/vip.yaml.j2 b/roles/k3s_server/templates/vip.yaml.j2 index 1092557a..47d4e8f5 100644 --- a/roles/k3s_server/templates/vip.yaml.j2 +++ b/roles/k3s_server/templates/vip.yaml.j2 @@ -27,7 +27,7 @@ spec: - manager env: - name: vip_arp - value: "true" + value: "{{ 'true' if kube_vip_arp | bool else 'false' }}" - name: port value: "6443" {% if kube_vip_iface %}