Revert "Introduce topology into the runtimeClass API"

This commit is contained in:
Yassine TIJANI
2019-05-31 20:49:40 +00:00
committed by GitHub
parent b7fa33ec15
commit 480d5e47b6
27 changed files with 76 additions and 1341 deletions

View File

@@ -18,9 +18,7 @@ package validation
import (
apivalidation "k8s.io/apimachinery/pkg/api/validation"
unversionedvalidation "k8s.io/apimachinery/pkg/apis/meta/v1/validation"
"k8s.io/apimachinery/pkg/util/validation/field"
corevalidation "k8s.io/kubernetes/pkg/apis/core/validation"
"k8s.io/kubernetes/pkg/apis/node"
)
@@ -32,10 +30,6 @@ func ValidateRuntimeClass(rc *node.RuntimeClass) field.ErrorList {
allErrs = append(allErrs, field.Invalid(field.NewPath("handler"), rc.Handler, msg))
}
if rc.Scheduling != nil {
allErrs = append(allErrs, validateScheduling(rc.Scheduling, field.NewPath("scheduling"))...)
}
return allErrs
}
@@ -47,12 +41,3 @@ func ValidateRuntimeClassUpdate(new, old *node.RuntimeClass) field.ErrorList {
return allErrs
}
func validateScheduling(s *node.Scheduling, fldPath *field.Path) field.ErrorList {
var allErrs field.ErrorList
if s.NodeSelector != nil {
allErrs = append(allErrs, unversionedvalidation.ValidateLabels(s.NodeSelector, fldPath.Child("nodeSelector"))...)
}
allErrs = append(allErrs, corevalidation.ValidateTolerations(s.Tolerations, fldPath.Child("tolerations"))...)
return allErrs
}