Unverified Commit 86e1da5f authored by Darren Shepherd's avatar Darren Shepherd Committed by GitHub

Revert "Fix kubelet --enforce-node-allocatable validation"

parent 7b9f8a30
...@@ -18,7 +18,6 @@ package validation ...@@ -18,7 +18,6 @@ package validation
import ( import (
"fmt" "fmt"
utilerrors "k8s.io/apimachinery/pkg/util/errors" utilerrors "k8s.io/apimachinery/pkg/util/errors"
utilvalidation "k8s.io/apimachinery/pkg/util/validation" utilvalidation "k8s.io/apimachinery/pkg/util/validation"
utilfeature "k8s.io/apiserver/pkg/util/feature" utilfeature "k8s.io/apiserver/pkg/util/feature"
...@@ -39,8 +38,7 @@ func ValidateKubeletConfiguration(kc *kubeletconfig.KubeletConfiguration) error ...@@ -39,8 +38,7 @@ func ValidateKubeletConfiguration(kc *kubeletconfig.KubeletConfiguration) error
if kc.NodeLeaseDurationSeconds <= 0 { if kc.NodeLeaseDurationSeconds <= 0 {
allErrors = append(allErrors, fmt.Errorf("invalid configuration: NodeLeaseDurationSeconds must be greater than 0")) allErrors = append(allErrors, fmt.Errorf("invalid configuration: NodeLeaseDurationSeconds must be greater than 0"))
} }
if !kc.CgroupsPerQOS && len(kc.EnforceNodeAllocatable) > 0 && if !kc.CgroupsPerQOS && len(kc.EnforceNodeAllocatable) > 0 {
!(len(kc.EnforceNodeAllocatable) == 1 && kc.EnforceNodeAllocatable[0] == kubetypes.NodeAllocatableNoneKey) {
allErrors = append(allErrors, fmt.Errorf("invalid configuration: EnforceNodeAllocatable (--enforce-node-allocatable) is not supported unless CgroupsPerQOS (--cgroups-per-qos) feature is turned on")) allErrors = append(allErrors, fmt.Errorf("invalid configuration: EnforceNodeAllocatable (--enforce-node-allocatable) is not supported unless CgroupsPerQOS (--cgroups-per-qos) feature is turned on"))
} }
if kc.SystemCgroups != "" && kc.CgroupRoot == "" { if kc.SystemCgroups != "" && kc.CgroupRoot == "" {
......
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