mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Merge pull request #57890 from miaoyq/fix-e2e-node-panic
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>. Fix e2e-node test panic Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn> **What this PR does / why we need it**: Execute e2e-node test locally like: ```bash # make test-e2e-node FOCUS="should assign CPUs as expected based on the Pod spec" SKIP="" ``` received a panic see #57889 This pr fixes the panic. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #57889 **Special notes for your reviewer**: **Release note**: ```release-note none ```
This commit is contained in:
commit
cfc1d47397
@ -143,6 +143,9 @@ func enableCPUManagerInKubelet(f *framework.Framework) (oldCfg *kubeletconfig.Ku
|
||||
oldCfg, err := getCurrentKubeletConfig()
|
||||
framework.ExpectNoError(err)
|
||||
newCfg := oldCfg.DeepCopy()
|
||||
if newCfg.FeatureGates == nil {
|
||||
newCfg.FeatureGates = make(map[string]bool)
|
||||
}
|
||||
|
||||
// Enable CPU Manager using feature gate.
|
||||
newCfg.FeatureGates[string(features.CPUManager)] = true
|
||||
|
Loading…
Reference in New Issue
Block a user