From 16fc22a2079070a22f8c8e6ba84108070a8f3632 Mon Sep 17 00:00:00 2001 From: rongzhang Date: Thu, 30 Aug 2018 23:04:57 +0800 Subject: [PATCH] Fix ipvs by kubeadm v1alpha1 --- .../master/templates/kubeadm-config.v1alpha1.yaml.j2 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/roles/kubernetes/master/templates/kubeadm-config.v1alpha1.yaml.j2 b/roles/kubernetes/master/templates/kubeadm-config.v1alpha1.yaml.j2 index 16474ad07..f812e52c1 100644 --- a/roles/kubernetes/master/templates/kubeadm-config.v1alpha1.yaml.j2 +++ b/roles/kubernetes/master/templates/kubeadm-config.v1alpha1.yaml.j2 @@ -23,10 +23,16 @@ kubernetesVersion: {{ kube_version }} {% if cloud_provider is defined and cloud_provider not in ["gce", "oci"] %} cloudProvider: {{ cloud_provider }} {% endif %} +{% if kube_proxy_mode == 'ipvs' %} kubeProxy: config: -{% if kube_proxy_mode == 'ipvs' and kube_version | version_compare('v1.10', '<') %} +{% if kube_version | version_compare('v1.10', '<') %} featureGates: SupportIPVSProxyMode=true +{% endif %} +{% if kube_version | version_compare('v1.10', '>=') %} + featureGates: + SupportIPVSProxyMode: true +{% endif %} mode: ipvs {% endif %} {% if kube_proxy_nodeport_addresses %}