mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 16:29:21 +00:00
redudant if-block in validation code
This commit is contained in:
parent
f0962765a7
commit
18bf8f8616
@ -2190,11 +2190,9 @@ func ValidatePodSpec(spec *api.PodSpec, fldPath *field.Path) field.ErrorList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if spec.ActiveDeadlineSeconds != nil {
|
if spec.ActiveDeadlineSeconds != nil {
|
||||||
if spec.ActiveDeadlineSeconds != nil {
|
value := *spec.ActiveDeadlineSeconds
|
||||||
value := *spec.ActiveDeadlineSeconds
|
if value < 1 || value > math.MaxUint32 {
|
||||||
if value < 1 || value > math.MaxUint32 {
|
allErrs = append(allErrs, field.Invalid(fldPath.Child("activeDeadlineSeconds"), value, validation.InclusiveRangeError(1, math.MaxUint32)))
|
||||||
allErrs = append(allErrs, field.Invalid(fldPath.Child("activeDeadlineSeconds"), value, validation.InclusiveRangeError(1, math.MaxUint32)))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user