Make Overhead validation unconditional

This commit is contained in:
Jordan Liggitt
2019-08-02 20:09:52 -04:00
parent 802e765444
commit 2e604bedc8
4 changed files with 2 additions and 11 deletions

View File

@@ -19,11 +19,9 @@ package validation
import (
apivalidation "k8s.io/apimachinery/pkg/api/validation"
"k8s.io/apimachinery/pkg/util/validation/field"
utilfeature "k8s.io/apiserver/pkg/util/feature"
"k8s.io/kubernetes/pkg/apis/core"
corevalidation "k8s.io/kubernetes/pkg/apis/core/validation"
"k8s.io/kubernetes/pkg/apis/node"
"k8s.io/kubernetes/pkg/features"
)
// ValidateRuntimeClass validates the RuntimeClass
@@ -34,7 +32,7 @@ func ValidateRuntimeClass(rc *node.RuntimeClass) field.ErrorList {
allErrs = append(allErrs, field.Invalid(field.NewPath("handler"), rc.Handler, msg))
}
if rc.Overhead != nil && utilfeature.DefaultFeatureGate.Enabled(features.PodOverhead) {
if rc.Overhead != nil {
allErrs = append(allErrs, validateOverhead(rc.Overhead, field.NewPath("overhead"))...)
}