kubeadm: kube-proxy needs to know the pod subnet CIDR in order to understand what's internal and external traffic.
Fixes https://github.com/kubernetes/kubeadm/issues/102
This commit is contained in:
		| @@ -386,7 +386,9 @@ func getSchedulerCommand(cfg *kubeadmapi.MasterConfiguration) []string { | ||||
| } | ||||
|  | ||||
| func getProxyCommand(cfg *kubeadmapi.MasterConfiguration) []string { | ||||
| 	return getComponentBaseCommand(proxy) | ||||
| 	return append(getComponentBaseCommand(proxy), | ||||
| 		"--cluster-cidr="+cfg.Networking.PodSubnet, | ||||
| 	) | ||||
| } | ||||
|  | ||||
| func getProxyEnvVars() []api.EnvVar { | ||||
|   | ||||
| @@ -572,9 +572,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
	 Paulo Pires
					Paulo Pires