From cc87e73dd881e50ad04e39e2cea599a03c517935 Mon Sep 17 00:00:00 2001 From: Rohit Ramkumar Date: Thu, 15 Feb 2018 11:06:13 -0800 Subject: [PATCH] Add ipvs module loading logic to gce scripts --- cluster/gce/gci/configure-helper.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index ebf735955c..07bbfdc613 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -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 \ No newline at end of file +fi