mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-11-03 23:40:03 +00:00 
			
		
		
		
	add flag to kubelet to ignore the cidr passed down by the apiserver on the master
This commit is contained in:
		@@ -22,6 +22,8 @@
 | 
			
		||||
  {% set api_servers_with_port = api_servers + ":6443" -%}
 | 
			
		||||
{% endif -%}
 | 
			
		||||
 | 
			
		||||
{% set master_kubelet_args = "" %}
 | 
			
		||||
 | 
			
		||||
{% set debugging_handlers = "--enable-debugging-handlers=true" -%}
 | 
			
		||||
 | 
			
		||||
{% if grains['roles'][0] == 'kubernetes-master' -%}
 | 
			
		||||
@@ -31,6 +33,7 @@
 | 
			
		||||
    # running on the master.
 | 
			
		||||
    {% if grains.kubelet_api_servers is defined -%}
 | 
			
		||||
      {% set api_servers_with_port = "--api-servers=https://" + grains.kubelet_api_servers -%}
 | 
			
		||||
      {% set master_kubelet_args = master_kubelet_args + "--register-schedulable=false --reconcile-cidr=false" -%}
 | 
			
		||||
    {% else -%}
 | 
			
		||||
      {% set api_servers_with_port = "" -%}
 | 
			
		||||
    {% endif -%}
 | 
			
		||||
@@ -114,4 +117,4 @@
 | 
			
		||||
{% endif -%}
 | 
			
		||||
 | 
			
		||||
# test_args has to be kept at the end, so they'll overwrite any prior configuration
 | 
			
		||||
DAEMON_ARGS="{{daemon_args}} {{api_servers_with_port}} {{debugging_handlers}} {{hostname_override}} {{cloud_provider}} {{config}} {{manifest_url}} --allow-privileged={{pillar['allow_privileged']}} {{pillar['log_level']}} {{cluster_dns}} {{cluster_domain}} {{docker_root}} {{kubelet_root}} {{configure_cbr0}} {{cgroup_root}} {{system_container}} {{pod_cidr}} {{cpu_cfs_quota}} {{network_plugin}} {{test_args}}"
 | 
			
		||||
DAEMON_ARGS="{{daemon_args}} {{api_servers_with_port}} {{debugging_handlers}} {{hostname_override}} {{cloud_provider}} {{config}} {{manifest_url}} --allow-privileged={{pillar['allow_privileged']}} {{pillar['log_level']}} {{cluster_dns}} {{cluster_domain}} {{docker_root}} {{kubelet_root}} {{configure_cbr0}} {{cgroup_root}} {{system_container}} {{pod_cidr}} {{ master_kubelet_args }} {{cpu_cfs_quota}} {{network_plugin}} {{test_args}}"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user