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

Merge pull request #63563 from filbranden/cgroupname2

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 cgroup names in node_container_manager_test. **What this PR does / why we need it**: Fix cgroup names in node_container_manager_test. The names were made invalid for the CgroupName refactor in #62541, so update them here. Furthermore, as the new names are now compatible with what EnforceNodeAllocatable wants, reuse the constants there as well. Tested: ``` $ make test-e2e-node REMOTE=true HOSTS=test-cos-beta-67-10575-27-0 FOCUS='Validate Node Allocatable' SKIP='' TEST_ARGS='--feature-gates=DynamicKubeletConfig=true' • [SLOW TEST:39.488 seconds] [k8s.io] Node Container Manager [Serial] Validate Node Allocatable set's up the node and runs the test Ran 1 of 261 Specs in 57.348 seconds SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 260 Skipped ``` **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 #63549 **Special notes for your reviewer**: /assign @dashpole **Release note**: ```release-note NONE ```
parents 13f3c7c7 48d052fa
...@@ -38,7 +38,7 @@ import ( ...@@ -38,7 +38,7 @@ import (
) )
func setDesiredConfiguration(initialConfig *kubeletconfig.KubeletConfiguration) { func setDesiredConfiguration(initialConfig *kubeletconfig.KubeletConfiguration) {
initialConfig.EnforceNodeAllocatable = []string{"pods", "kube-reserved", "system-reserved"} initialConfig.EnforceNodeAllocatable = []string{"pods", kubeReservedCgroup, systemReservedCgroup}
initialConfig.SystemReserved = map[string]string{ initialConfig.SystemReserved = map[string]string{
string(v1.ResourceCPU): "100m", string(v1.ResourceCPU): "100m",
string(v1.ResourceMemory): "100Mi", string(v1.ResourceMemory): "100Mi",
...@@ -98,8 +98,8 @@ func getAllocatableLimits(cpu, memory string, capacity v1.ResourceList) (*resour ...@@ -98,8 +98,8 @@ func getAllocatableLimits(cpu, memory string, capacity v1.ResourceList) (*resour
} }
const ( const (
kubeReservedCgroup = "kube_reserved" kubeReservedCgroup = "kube-reserved"
systemReservedCgroup = "system_reserved" systemReservedCgroup = "system-reserved"
) )
func createIfNotExists(cm cm.CgroupManager, cgroupConfig *cm.CgroupConfig) error { func createIfNotExists(cm cm.CgroupManager, cgroupConfig *cm.CgroupConfig) error {
......
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