Skip to content

api: add cel validation of MaxEjectionPercent#8804

Open
kkk777-7 wants to merge 1 commit intoenvoyproxy:mainfrom
kkk777-7:improve-ejection-percent-type
Open

api: add cel validation of MaxEjectionPercent#8804
kkk777-7 wants to merge 1 commit intoenvoyproxy:mainfrom
kkk777-7:improve-ejection-percent-type

Conversation

@kkk777-7
Copy link
Copy Markdown
Member

@kkk777-7 kkk777-7 commented Apr 21, 2026

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

@kkk777-7 kkk777-7 requested a review from a team as a code owner April 21, 2026 07:09
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 21, 2026

Deploy Preview for cerulean-figolla-1f9435 canceled.

Name Link
🔨 Latest commit 3cb5b79
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/69e7289fb3b69e000888585d

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread api/v1alpha1/healthcheck_types.go Outdated
// +kubebuilder:validation:Maximum=100
// +optional
MaxEjectionPercent *int32 `json:"maxEjectionPercent,omitempty"`
MaxEjectionPercent *uint32 `json:"maxEjectionPercent,omitempty"`
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@kkk777-7 kkk777-7 force-pushed the improve-ejection-percent-type branch from 8087a02 to 5bc4ffa Compare April 21, 2026 07:34
Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
@kkk777-7 kkk777-7 force-pushed the improve-ejection-percent-type branch from 5bc4ffa to 3cb5b79 Compare April 21, 2026 07:34
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.42%. Comparing base (a7545ce) to head (3cb5b79).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kkk777-7
Copy link
Copy Markdown
Member Author

/retest

@kkk777-7 kkk777-7 changed the title update: MaxEjectionPercent type api: add cel validation of MaxEjectionPercent Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants