mirror of https://github.com/k3s-io/k3s
Add ipvs module loading logic to gce scripts
parent
a38a02792b
commit
cc87e73dd8
|
@ -1199,7 +1199,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
|
||||||
|
@ -2586,4 +2594,4 @@ if [[ "$#" -eq 1 && "${1}" == "--source-only" ]]; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
main "${@}"
|
main "${@}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue