mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 11:18:16 +00:00
Merge pull request #128119 from saschagrunert/api-validation-err
Clarify API validation error for toleration if `operator` is `Exists` and `value` is not empty
This commit is contained in:
@@ -3990,7 +3990,7 @@ func ValidateTolerations(tolerations []core.Toleration, fldPath *field.Path) fie
|
|||||||
}
|
}
|
||||||
case core.TolerationOpExists:
|
case core.TolerationOpExists:
|
||||||
if len(toleration.Value) > 0 {
|
if len(toleration.Value) > 0 {
|
||||||
allErrors = append(allErrors, field.Invalid(idxPath.Child("operator"), toleration, "value must be empty when `operator` is 'Exists'"))
|
allErrors = append(allErrors, field.Invalid(idxPath.Child("operator"), toleration.Value, "value must be empty when `operator` is 'Exists'"))
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
validValues := []core.TolerationOperator{core.TolerationOpEqual, core.TolerationOpExists}
|
validValues := []core.TolerationOperator{core.TolerationOpEqual, core.TolerationOpExists}
|
||||||
|
|||||||
Reference in New Issue
Block a user