Skip to content

fix: allow requests:0 for global rate limit block rules#9333

Open
mvanhorn wants to merge 1 commit into
envoyproxy:mainfrom
mvanhorn:fix/9273-ratelimit-requests-zero-block-rule
Open

fix: allow requests:0 for global rate limit block rules#9333
mvanhorn wants to merge 1 commit into
envoyproxy:mainfrom
mvanhorn:fix/9273-ratelimit-requests-zero-block-rule

Conversation

@mvanhorn

Copy link
Copy Markdown
Contributor

Summary

For a global rate-limit rule, limit.requests: 0 now passes admission validation, since a zero global limit expresses a valid "block all matching traffic" rule. Local rate limits continue to reject zero. A release-note fragment is included under release-notes/current/bug_fixes.

Why this matters

The CEL validation on BackendTrafficPolicy rejected requests: 0 for both local and global rate limits, but a zero global limit is the documented way to express a block-all rule. The validation now distinguishes the two cases so block rules are accepted while local zero limits stay rejected. Reported in #9273.

Testing

Added a CEL-validation test asserting that a global rule with requests: 0 is accepted and that a local zero limit is still rejected. (The CEL test could not run in this environment because the envtest binaries are absent; the schema, generated CRD, and validation changes are self-consistent.)

Fixes #9273

@mvanhorn mvanhorn requested a review from a team as a code owner June 24, 2026 07:44
@netlify

netlify Bot commented Jun 24, 2026

Copy link
Copy Markdown

Deploy Preview for cerulean-figolla-1f9435 ready!

Name Link
🔨 Latest commit d8d1e37
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6a3bccae8e40dc0008c6e8a2
😎 Deploy Preview https://deploy-preview-9333--cerulean-figolla-1f9435.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9333   +/-   ##
=======================================
  Coverage   75.17%   75.17%           
=======================================
  Files         252      252           
  Lines       41049    41049           
=======================================
  Hits        30860    30860           
+ Misses       8094     8093    -1     
- Partials     2095     2096    +1     

☔ View full report in Codecov by Harness.
📢 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.

Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
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.

RateLimitValue.Requests Minimum=1 prevents using limit 0 as a block rule in global rate limiting

1 participant