mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #39440 from apprenda/kubeadm_102-fix_proxy
Automatic merge from submit-queue (batch tested with PRs 40574, 40806, 40308, 40771, 39440) kubeadm: kube-proxy needs to know the pod subnet CIDR **What this PR does / why we need it**: `kube-proxy` 1.5 has a new flag `cluster-cidr` that isn't specified by `kubeadm`, thus resulting in bug https://github.com/kubernetes/kubeadm/issues/102. **Which issue this PR fixes**: fixes https://github.com/kubernetes/kubeadm/issues/102 **Special notes for your reviewer**: /cc @luxas @dmmcquay
This commit is contained in:
		@@ -425,7 +425,9 @@ func getSchedulerCommand(cfg *kubeadmapi.MasterConfiguration, selfHosted bool) [
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func getProxyCommand(cfg *kubeadmapi.MasterConfiguration) []string {
 | 
			
		||||
	return getComponentBaseCommand(proxy)
 | 
			
		||||
	return append(getComponentBaseCommand(proxy),
 | 
			
		||||
		"--cluster-cidr="+cfg.Networking.PodSubnet,
 | 
			
		||||
	)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func getProxyEnvVars() []api.EnvVar {
 | 
			
		||||
 
 | 
			
		||||
@@ -559,9 +559,14 @@ func TestGetProxyCommand(t *testing.T) {
 | 
			
		||||
		expected []string
 | 
			
		||||
	}{
 | 
			
		||||
		{
 | 
			
		||||
			cfg: &kubeadmapi.MasterConfiguration{},
 | 
			
		||||
			cfg: &kubeadmapi.MasterConfiguration{
 | 
			
		||||
				Networking: kubeadm.Networking{
 | 
			
		||||
					PodSubnet: "bar",
 | 
			
		||||
				},
 | 
			
		||||
			},
 | 
			
		||||
			expected: []string{
 | 
			
		||||
				"kube-proxy",
 | 
			
		||||
				"--cluster-cidr=bar",
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user