From bf84a76dcc404e94c4c72e1d79fabfeaac5d3f12 Mon Sep 17 00:00:00 2001 From: Florian Ruynat <16313165+floryut@users.noreply.github.com> Date: Tue, 8 Sep 2020 10:52:04 +0200 Subject: [PATCH] Add iptables_backend to weave options --- inventory/sample/group_vars/k8s-cluster/k8s-net-weave.yml | 3 +++ roles/network_plugin/weave/defaults/main.yml | 3 +++ roles/network_plugin/weave/templates/weave-net.yml.j2 | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/inventory/sample/group_vars/k8s-cluster/k8s-net-weave.yml b/inventory/sample/group_vars/k8s-cluster/k8s-net-weave.yml index f8c8bba3327..ed6c3c08e6d 100644 --- a/inventory/sample/group_vars/k8s-cluster/k8s-net-weave.yml +++ b/inventory/sample/group_vars/k8s-cluster/k8s-net-weave.yml @@ -53,6 +53,9 @@ # only with Weave IPAM (default). # weave_no_masq_local: true +# set to nft to use nftables backend for iptables (default is iptables) +# weave_iptables_backend: iptables + # Extra variables that passing to launch.sh, useful for enabling seed mode, see # https://www.weave.works/docs/net/latest/tasks/ipam/ipam/ # weave_extra_args: ~ diff --git a/roles/network_plugin/weave/defaults/main.yml b/roles/network_plugin/weave/defaults/main.yml index ee636e56f42..b1c79a6db8c 100644 --- a/roles/network_plugin/weave/defaults/main.yml +++ b/roles/network_plugin/weave/defaults/main.yml @@ -53,6 +53,9 @@ weave_mtu: 1376 # only with Weave IPAM (default). weave_no_masq_local: true +# set to nft to use nftables backend for iptables (default is iptables) +weave_iptables_backend: ~ + # Extra variables that passing to launch.sh, useful for enabling seed mode, see # https://www.weave.works/docs/net/latest/tasks/ipam/ipam/ weave_extra_args: ~ diff --git a/roles/network_plugin/weave/templates/weave-net.yml.j2 b/roles/network_plugin/weave/templates/weave-net.yml.j2 index 28540bcfa5e..04bc8e4317f 100644 --- a/roles/network_plugin/weave/templates/weave-net.yml.j2 +++ b/roles/network_plugin/weave/templates/weave-net.yml.j2 @@ -163,6 +163,10 @@ items: {% if weave_status_addr %} - name: WEAVE_STATUS_ADDR value: "{{ weave_status_addr }}" +{% endif %} +{% if weave_iptables_backend %} + - name: IPTABLES_BACKEND + value: "{{ weave_iptables_backend }}" {% endif %} - name: WEAVE_MTU value: "{{ weave_mtu | int }}"