api: add cel validation of MaxEjectionPercent#8804
api: add cel validation of MaxEjectionPercent#8804kkk777-7 wants to merge 1 commit intoenvoyproxy:mainfrom
Conversation
✅ Deploy Preview for cerulean-figolla-1f9435 canceled.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8087a02020
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| // +kubebuilder:validation:Maximum=100 | ||
| // +optional | ||
| MaxEjectionPercent *int32 `json:"maxEjectionPercent,omitempty"` | ||
| MaxEjectionPercent *uint32 `json:"maxEjectionPercent,omitempty"` |
There was a problem hiding this comment.
Regenerate CRD manifests after changing MaxEjectionPercent type
This API field was changed to *uint32 with Minimum/Maximum markers, but the generated CRD manifests were not updated in this commit (for example, charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_backendtrafficpolicies.yaml still defines maxEjectionPercent as unconstrained int32). In clusters that install these shipped CRDs, negative or >100 values will still be admitted, and negative values can then fail decoding into the new uint32 type in the controller path, causing the policy to be rejected at runtime instead of being blocked by schema validation.
Useful? React with 👍 / 👎.
8087a02 to
5bc4ffa
Compare
Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
5bc4ffa to
3cb5b79
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8804 +/- ##
==========================================
+ Coverage 74.40% 74.42% +0.01%
==========================================
Files 245 245
Lines 38973 38974 +1
==========================================
+ Hits 28998 29006 +8
+ Misses 7971 7964 -7
Partials 2004 2004 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
/retest |
What this PR does / why we need it:
Improve: add validation of valid values.
Ref: https://github.com/envoyproxy/envoy/blob/main/api/envoy/config/cluster/v3/outlier_detection.proto#L47-L49
Related: #8800
Which issue(s) this PR fixes:
Fixes #
Release Notes: No