Validate numberReady in DaemonSet status

In #32781 numberReady was introduced but it wasn't validated.
This commit is contained in:
Łukasz Oleś
2016-12-21 12:41:49 +01:00
parent f42574893b
commit e1a19fecf8
2 changed files with 113 additions and 0 deletions

View File

@@ -108,6 +108,7 @@ func validateDaemonSetStatus(status *extensions.DaemonSetStatus, fldPath *field.
allErrs = append(allErrs, apivalidation.ValidateNonnegativeField(int64(status.CurrentNumberScheduled), fldPath.Child("currentNumberScheduled"))...)
allErrs = append(allErrs, apivalidation.ValidateNonnegativeField(int64(status.NumberMisscheduled), fldPath.Child("numberMisscheduled"))...)
allErrs = append(allErrs, apivalidation.ValidateNonnegativeField(int64(status.DesiredNumberScheduled), fldPath.Child("desiredNumberScheduled"))...)
allErrs = append(allErrs, apivalidation.ValidateNonnegativeField(int64(status.NumberReady), fldPath.Child("numberReady"))...)
return allErrs
}