Merge pull request #70847 from krmayankk/active-dead

fix error type when using activeDeadlineSeconds with RS/RC
This commit is contained in:
k8s-ci-robot
2018-11-29 19:04:36 -08:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

View File

@@ -4062,7 +4062,7 @@ func ValidatePodTemplateSpecForRC(template *core.PodTemplateSpec, selectorMap ma
allErrs = append(allErrs, field.NotSupported(fldPath.Child("spec", "restartPolicy"), template.Spec.RestartPolicy, []string{string(core.RestartPolicyAlways)}))
}
if template.Spec.ActiveDeadlineSeconds != nil {
allErrs = append(allErrs, field.Invalid(fldPath.Child("spec", "activeDeadlineSeconds"), template.Spec.ActiveDeadlineSeconds, "must not be specified"))
allErrs = append(allErrs, field.Forbidden(fldPath.Child("spec", "activeDeadlineSeconds"), "activeDeadlineSeconds in ReplicationController is not Supported"))
}
}
return allErrs