Skip to content

Commit 5f3316f

Browse files
authored
Merge pull request kubernetes#128119 from saschagrunert/api-validation-err
Clarify API validation error for toleration if `operator` is `Exists` and `value` is not empty
2 parents 8d37306 + 544d8c0 commit 5f3316f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/apis/core/validation/validation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3990,7 +3990,7 @@ func ValidateTolerations(tolerations []core.Toleration, fldPath *field.Path) fie
39903990
}
39913991
case core.TolerationOpExists:
39923992
if len(toleration.Value) > 0 {
3993-
allErrors = append(allErrors, field.Invalid(idxPath.Child("operator"), toleration, "value must be empty when `operator` is 'Exists'"))
3993+
allErrors = append(allErrors, field.Invalid(idxPath.Child("operator"), toleration.Value, "value must be empty when `operator` is 'Exists'"))
39943994
}
39953995
default:
39963996
validValues := []core.TolerationOperator{core.TolerationOpEqual, core.TolerationOpExists}

0 commit comments

Comments
 (0)