Unverified Commit a97ce942 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

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 ```
parents 1a817b15 6cf81916
...@@ -109,6 +109,10 @@ func tempSetCurrentKubeletConfig(f *framework.Framework, updateFunction func(ini ...@@ -109,6 +109,10 @@ func tempSetCurrentKubeletConfig(f *framework.Framework, updateFunction func(ini
framework.ExpectNoError(err) framework.ExpectNoError(err)
newCfg := oldCfg.DeepCopy() newCfg := oldCfg.DeepCopy()
updateFunction(newCfg) updateFunction(newCfg)
if reflect.DeepEqual(*newCfg, *oldCfg) {
return
}
framework.ExpectNoError(setKubeletConfiguration(f, newCfg)) framework.ExpectNoError(setKubeletConfiguration(f, newCfg))
}) })
AfterEach(func() { AfterEach(func() {
......
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