Merge pull request #64682 from dixudx/kubeadm_remove_kubelet_flags

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

kubeadm: remove redundant flags settings for kubelet

**What this PR does / why we need it**:
#63580 fixes flag bindings for `--cni-conf-dir` and `cni-bin-dir`. No need to explicitly specify default value when building kubelet args in kubeadm.

Depends on #63580

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:

**Special notes for your reviewer**:
/kind cleanup
/area kubeadm
/sig cluster-lifecycle
/cc timothysc luxas 

**Release note**:

```release-note
kubeadm: remove redundant flags settings for kubelet
```
This commit is contained in:
Kubernetes Submit Queue 2018-07-01 09:41:06 -07:00 committed by GitHub
commit 8d32e07776
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 10 deletions

View File

@ -70,8 +70,6 @@ func buildKubeletArgMap(opts kubeletFlagsOpts) map[string]string {
if opts.nodeRegOpts.CRISocket == kubeadmapiv1alpha2.DefaultCRISocket {
// These flags should only be set when running docker
kubeletFlags["network-plugin"] = "cni"
kubeletFlags["cni-conf-dir"] = "/etc/cni/net.d"
kubeletFlags["cni-bin-dir"] = "/opt/cni/bin"
driver, err := kubeadmutil.GetCgroupDriverDocker(opts.execer)
if err != nil {
glog.Warningf("cannot automatically assign a '--cgroup-driver' value when starting the Kubelet: %v\n", err)

View File

@ -119,8 +119,6 @@ func TestBuildKubeletArgMap(t *testing.T) {
},
expected: map[string]string{
"network-plugin": "cni",
"cni-conf-dir": "/etc/cni/net.d",
"cni-bin-dir": "/opt/cni/bin",
},
},
{
@ -136,8 +134,6 @@ func TestBuildKubeletArgMap(t *testing.T) {
},
expected: map[string]string{
"network-plugin": "cni",
"cni-conf-dir": "/etc/cni/net.d",
"cni-bin-dir": "/opt/cni/bin",
"hostname-override": "override-name",
},
},
@ -154,8 +150,6 @@ func TestBuildKubeletArgMap(t *testing.T) {
},
expected: map[string]string{
"network-plugin": "cni",
"cni-conf-dir": "/etc/cni/net.d",
"cni-bin-dir": "/opt/cni/bin",
"cgroup-driver": "systemd",
},
},
@ -172,8 +166,6 @@ func TestBuildKubeletArgMap(t *testing.T) {
},
expected: map[string]string{
"network-plugin": "cni",
"cni-conf-dir": "/etc/cni/net.d",
"cni-bin-dir": "/opt/cni/bin",
"cgroup-driver": "cgroupfs",
},
},