mirror of https://github.com/k3s-io/k3s
Merge pull request #59938 from rramkumar1/gce-cluster-up-ipvs
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Add ipvs module loading logic to gce scripts **What this PR does / why we need it**: Add ipvs module loading logic to gce scripts. Fixes a part of #59402. /cc @Lion-Wei /assign @roberthbailey @m1093782566 **Release note**: ```release-note None ```pull/8/head
commit
586e558c3b
|
@ -1207,7 +1207,15 @@ function prepare-kube-proxy-manifest-variables {
|
||||||
params+=" --feature-gates=${FEATURE_GATES}"
|
params+=" --feature-gates=${FEATURE_GATES}"
|
||||||
fi
|
fi
|
||||||
if [[ "${KUBE_PROXY_MODE:-}" == "ipvs" ]];then
|
if [[ "${KUBE_PROXY_MODE:-}" == "ipvs" ]];then
|
||||||
params+=" --proxy-mode=ipvs --feature-gates=SupportIPVSProxyMode=true"
|
sudo modprobe -a ip_vs ip_vs_rr ip_vs_wrr ip_vs_sh nf_conntrack_ipv4
|
||||||
|
if [[ $? -eq 0 ]];
|
||||||
|
then
|
||||||
|
params+=" --proxy-mode=ipvs"
|
||||||
|
else
|
||||||
|
# If IPVS modules are not present, make sure the node does not come up as
|
||||||
|
# healthy.
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
params+=" --iptables-sync-period=1m --iptables-min-sync-period=10s --ipvs-sync-period=1m --ipvs-min-sync-period=10s"
|
params+=" --iptables-sync-period=1m --iptables-min-sync-period=10s --ipvs-sync-period=1m --ipvs-min-sync-period=10s"
|
||||||
if [[ -n "${KUBEPROXY_TEST_ARGS:-}" ]]; then
|
if [[ -n "${KUBEPROXY_TEST_ARGS:-}" ]]; then
|
||||||
|
|
Loading…
Reference in New Issue