Commit 9dedf92d authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

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
parents 2ee058c2 cae862da
......@@ -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",
},
},
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment