-
Bug
-
Resolution: Unresolved
-
Normal
-
4.18, 4.19, 4.20
-
None
-
Quality / Stability / Reliability
-
False
-
-
None
-
None
-
None
-
None
-
None
-
None
-
Done
-
Bug Fix
-
-
None
-
None
-
None
-
None
Description of problem:
Described in full on the upstream PR, https://github.com/kubernetes/kubernetes/pull/132837 There is an issue with resource.Quantity and other IntOrString style fields, where the CEL validation does not correctly account for the maximum length of the field per the open api validation. Prior to the fix, the validation // +kubebuilder:validation:XValidation:rule="isQuantity(self) && quantity(self).isGreaterThan(quantity('0'))",message="request must be a positive, non-zero quantity" Would fail as it declared the validation cost was too high, even when limiting the length of the string. With the upstream fix, the length of the string is now correctly taken into account and the runtime cost is correctly calculated.
Version-Release number of selected component (if applicable):
How reproducible:
100%
Steps to Reproduce:
See https://github.com/kubernetes/kubernetes/pull/132837
Actual results:
Expected results:
Additional info: