mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Rename validation 'New' funcs
This commit is contained in:
@@ -27,10 +27,10 @@ func ValidateEvent(event *api.Event) validation.ErrorList {
|
||||
// TODO: There is no namespace required for node.
|
||||
if event.InvolvedObject.Kind != "Node" &&
|
||||
event.Namespace != event.InvolvedObject.Namespace {
|
||||
allErrs = append(allErrs, validation.NewFieldInvalid("involvedObject.namespace", event.InvolvedObject.Namespace, "namespace does not match involvedObject"))
|
||||
allErrs = append(allErrs, validation.NewInvalidError("involvedObject.namespace", event.InvolvedObject.Namespace, "namespace does not match involvedObject"))
|
||||
}
|
||||
if !validation.IsDNS1123Subdomain(event.Namespace) {
|
||||
allErrs = append(allErrs, validation.NewFieldInvalid("namespace", event.Namespace, ""))
|
||||
allErrs = append(allErrs, validation.NewInvalidError("namespace", event.Namespace, ""))
|
||||
}
|
||||
return allErrs
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user