Add ipvs module loading logic to gce scripts

pull/8/head
Rohit Ramkumar 2018-02-15 11:06:13 -08:00
parent a38a02792b
commit cc87e73dd8
1 changed files with 10 additions and 2 deletions

View File

@ -1199,7 +1199,15 @@ function prepare-kube-proxy-manifest-variables {
params+=" --feature-gates=${FEATURE_GATES}"
fi
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
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
@ -2586,4 +2594,4 @@ if [[ "$#" -eq 1 && "${1}" == "--source-only" ]]; then
:
else
main "${@}"
fi
fi