Skip to content

Commit

Permalink
Merge pull request kubernetes#39440 from apprenda/kubeadm_102-fix_proxy
Browse files Browse the repository at this point in the history
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 kubernetes/kubeadm#102.

**Which issue this PR fixes**: fixes kubernetes/kubeadm#102

**Special notes for your reviewer**:
/cc @luxas @dmmcquay
  • Loading branch information
Kubernetes Submit Queue committed Feb 2, 2017
2 parents 2ee058c + cae862d commit 9dedf92
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion cmd/kubeadm/app/master/manifests.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 6 additions & 1 deletion cmd/kubeadm/app/master/manifests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
},
}
Expand Down

0 comments on commit 9dedf92

Please sign in to comment.