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
pull/8/head
Filipe Brandenburger 2018-05-08 16:15:26 -07:00
parent f13fa1e3af
commit 48d052fae4
1 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ import (
)
func setDesiredConfiguration(initialConfig *kubeletconfig.KubeletConfiguration) {
initialConfig.EnforceNodeAllocatable = []string{"pods", "kube-reserved", "system-reserved"}
initialConfig.EnforceNodeAllocatable = []string{"pods", kubeReservedCgroup, systemReservedCgroup}
initialConfig.SystemReserved = map[string]string{
string(v1.ResourceCPU): "100m",
string(v1.ResourceMemory): "100Mi",
@ -98,8 +98,8 @@ func getAllocatableLimits(cpu, memory string, capacity v1.ResourceList) (*resour
}
const (
kubeReservedCgroup = "kube_reserved"
systemReservedCgroup = "system_reserved"
kubeReservedCgroup = "kube-reserved"
systemReservedCgroup = "system-reserved"
)
func createIfNotExists(cm cm.CgroupManager, cgroupConfig *cm.CgroupConfig) error {