Skip to content

Conversation

@kkk777-7
Copy link
Member

@kkk777-7 kkk777-7 commented Dec 7, 2025

What this PR does / why we need it:
Added gatewayapi layer validation for request buffer limit in BackendTrafficPolicy.

Which issue(s) this PR fixes:

Fixes #7677

Release Notes: Yes

@kkk777-7 kkk777-7 requested a review from a team as a code owner December 7, 2025 15:42
@codecov
Copy link

codecov bot commented Dec 7, 2025

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 72.41%. Comparing base (aa3ad43) to head (00162ed).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/gatewayapi/backendtrafficpolicy.go 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7687      +/-   ##
==========================================
+ Coverage   72.36%   72.41%   +0.05%     
==========================================
  Files         233      233              
  Lines       34343    34347       +4     
==========================================
+ Hits        24851    24873      +22     
+ Misses       7712     7699      -13     
+ Partials     1780     1775       -5     

☔ 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.

@zirain
Copy link
Member

zirain commented Dec 7, 2025

is it possible to validate this with CEL?

@kkk777-7
Copy link
Member Author

kkk777-7 commented Dec 8, 2025

is it possible to validate this with CEL?

I've thought about this a bit, but given the possible input types, it seems somewhat difficult to implement strict validation at the CRD layer.
https://github.com/envoyproxy/gateway/blob/main/api/v1alpha1/backendtrafficpolicy_types.go#L181-L183

I feel it’s best to limit the CRD validation to format checks and handle min/max constraints within the application code instead. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BackendTrafficPolicy does not validate maximum value of requestBuffer.limit

4 participants