mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 22:17:14 +00:00
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
This commit is contained in:
parent
f13fa1e3af
commit
48d052fae4
@ -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
|
|||||||
}
|
}
|
||||||
|
|
||||||
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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user