extensions: invalidate progress deadline less than minreadyseconds

This commit is contained in:
Michail Kargakis
2016-11-04 14:16:26 +01:00
parent 5a2c473c1c
commit 365cfa1ef3
2 changed files with 10 additions and 0 deletions

View File

@@ -264,6 +264,9 @@ func ValidateDeploymentSpec(spec *extensions.DeploymentSpec, fldPath *field.Path
}
if spec.ProgressDeadlineSeconds != nil {
allErrs = append(allErrs, apivalidation.ValidateNonnegativeField(int64(*spec.ProgressDeadlineSeconds), fldPath.Child("progressDeadlineSeconds"))...)
if *spec.ProgressDeadlineSeconds <= spec.MinReadySeconds {
allErrs = append(allErrs, field.Invalid(fldPath.Child("progressDeadlineSeconds"), spec.ProgressDeadlineSeconds, "must be greater than minReadySeconds."))
}
}
return allErrs
}