From 52f221f9766f7c2c0688d3104f1123bb91729d42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=8E=E5=BF=A0=E5=95=8A?= <571912102@qq.com> Date: Thu, 27 Jan 2022 17:08:10 +0800 Subject: [PATCH] Adaptive Kube-ovn (#8454) --- .../control-plane/templates/kubeadm-config.v1beta2.yaml.j2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/roles/kubernetes/control-plane/templates/kubeadm-config.v1beta2.yaml.j2 b/roles/kubernetes/control-plane/templates/kubeadm-config.v1beta2.yaml.j2 index 387f7610f..ba14a9586 100644 --- a/roles/kubernetes/control-plane/templates/kubeadm-config.v1beta2.yaml.j2 +++ b/roles/kubernetes/control-plane/templates/kubeadm-config.v1beta2.yaml.j2 @@ -89,7 +89,9 @@ dns: networking: dnsDomain: {{ dns_domain }} serviceSubnet: "{{ kube_service_addresses }}{{ ',' + kube_service_addresses_ipv6 if enable_dual_stack_networks else '' }}" +{% if kube_network_plugin is defined and kube_network_plugin not in ["kube-ovn"] %} podSubnet: "{{ kube_pods_subnet }}{{ ',' + kube_pods_subnet_ipv6 if enable_dual_stack_networks else '' }}" +{% endif %} {% if kubeadm_feature_gates %} featureGates: {% for feature in kubeadm_feature_gates %} @@ -271,7 +273,9 @@ controllerManager: extraArgs: node-monitor-grace-period: {{ kube_controller_node_monitor_grace_period }} node-monitor-period: {{ kube_controller_node_monitor_period }} +{% if kube_network_plugin is defined and kube_network_plugin not in ["kube-ovn"] %} cluster-cidr: "{{ kube_pods_subnet }}{{ ',' + kube_pods_subnet_ipv6 if enable_dual_stack_networks else '' }}" +{% endif %} service-cluster-ip-range: "{{ kube_service_addresses }}{{ ',' + kube_service_addresses_ipv6 if enable_dual_stack_networks else '' }}" {% if enable_dual_stack_networks %} node-cidr-mask-size-ipv4: "{{ kube_network_node_prefix }}" @@ -368,7 +372,9 @@ clientConnection: contentType: {{ kube_proxy_client_content_type }} kubeconfig: {{ kube_proxy_client_kubeconfig }} qps: {{ kube_proxy_client_qps }} +{% if kube_network_plugin is defined and kube_network_plugin not in ["kube-ovn"] %} clusterCIDR: "{{ kube_pods_subnet }}{{ ',' + kube_pods_subnet_ipv6 if enable_dual_stack_networks else '' }}" +{% endif %} configSyncPeriod: {{ kube_proxy_config_sync_period }} conntrack: maxPerCore: {{ kube_proxy_conntrack_max_per_core }}