Skip to content

Commit 9f580af

Browse files
committed
cluster: configure nftables mode for kube-proxy
(based on a patch from Antonio Ojea)
1 parent 2055a49 commit 9f580af

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

cluster/gce/config-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ KUBE_PROXY_DAEMONSET=${KUBE_PROXY_DAEMONSET:-false} # true, false
532532
# as an addon daemonset.
533533
KUBE_PROXY_DISABLE="${KUBE_PROXY_DISABLE:-false}" # true, false
534534

535-
# Optional: Change the kube-proxy implementation. Choices are [iptables, ipvs].
535+
# Optional: Change the kube-proxy implementation. Choices are [iptables, ipvs, nftables].
536536
KUBE_PROXY_MODE=${KUBE_PROXY_MODE:-iptables}
537537

538538
# Will be passed into the kube-proxy via `--detect-local-mode`

cluster/gce/gci/configure-helper.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,6 +1774,12 @@ function prepare-kube-proxy-manifest-variables {
17741774
fi
17751775
params+=" --proxy-mode=ipvs --ipvs-sync-period=1m --ipvs-min-sync-period=10s"
17761776
;;
1777+
nftables)
1778+
# Pass --conntrack-tcp-be-liberal so we can test that this makes the
1779+
# "proxy implementation should not be vulnerable to the invalid conntrack state bug"
1780+
# test pass. https://issues.k8s.io/122663#issuecomment-1885024015
1781+
params+=" --proxy-mode=nftables --conntrack-tcp-be-liberal"
1782+
;;
17771783
esac
17781784

17791785
if [[ -n "${KUBEPROXY_TEST_ARGS:-}" ]]; then

0 commit comments

Comments
 (0)