Merge pull request #57812 from ScorpioCPH/double-check-set-kubelet-config

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>.

[Alpha: DynamicKubeletConfig] Double check before setKubeletConfiguration

**What this PR does / why we need it**:

Double check the `newCfg` is not equal to the `oldCfg` before we call `setKubeletConfiguration(newCfg)` in `tempSetCurrentKubeletConfig()`.

**Which issue(s) this PR fixes**:
Fixes https://github.com/kubernetes/kubernetes/issues/57701

**Special notes for your reviewer**:

/area kubelet
/sig node
/assign @mtaufen 
/cc @vishh @jiayingz @derekwaynecarr @dchen1107 @liggitt 
PTAL, Thanks!

**Release note**:

```release-note
NONE
```
pull/6/head
Kubernetes Submit Queue 2018-01-12 00:00:37 -08:00 committed by GitHub
commit a97ce942e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -109,6 +109,10 @@ func tempSetCurrentKubeletConfig(f *framework.Framework, updateFunction func(ini
framework.ExpectNoError(err)
newCfg := oldCfg.DeepCopy()
updateFunction(newCfg)
if reflect.DeepEqual(*newCfg, *oldCfg) {
return
}
framework.ExpectNoError(setKubeletConfiguration(f, newCfg))
})
AfterEach(func() {