Move util/validation files to their own package

This commit is contained in:
tummychow
2015-09-10 15:48:28 -07:00
parent c8f9219272
commit a21c52a766
11 changed files with 58 additions and 56 deletions

View File

@@ -18,8 +18,8 @@ package validation
import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/util"
errs "k8s.io/kubernetes/pkg/util/fielderrors"
"k8s.io/kubernetes/pkg/util/validation"
)
// ValidateEvent makes sure that the event makes sense.
@@ -30,7 +30,7 @@ func ValidateEvent(event *api.Event) errs.ValidationErrorList {
event.Namespace != event.InvolvedObject.Namespace {
allErrs = append(allErrs, errs.NewFieldInvalid("involvedObject.namespace", event.InvolvedObject.Namespace, "namespace does not match involvedObject"))
}
if !util.IsDNS1123Subdomain(event.Namespace) {
if !validation.IsDNS1123Subdomain(event.Namespace) {
allErrs = append(allErrs, errs.NewFieldInvalid("namespace", event.Namespace, ""))
}
return allErrs