Skip to content

feat: expose request body buffer limit#9431

Closed
Aias00 wants to merge 1 commit into
envoyproxy:mainfrom
Aias00:worktree-issue-8891-request-body-buffer-limit
Closed

feat: expose request body buffer limit#9431
Aias00 wants to merge 1 commit into
envoyproxy:mainfrom
Aias00:worktree-issue-8891-request-body-buffer-limit

Conversation

@Aias00

@Aias00 Aias00 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Added BackendTrafficPolicy.spec.requestBodyBufferLimit to configure Envoy route request_body_buffer_limit.
  • Wired the field through Gateway API translation, IR, and xDS route generation without enabling the HTTP buffer filter.
  • Added API docs, CRD/Helm generated output, xDS golden coverage, and a release note.

Fixes #8891

Testing

  • go test ./internal/gatewayapi -run 'TestBuildTrafficFeaturesRequestBodyBufferLimit|TestBuildTrafficFeaturesRejectsRequestBufferWithHTTPUpgrade' -count=1
  • go test ./internal/xds/translator -run 'TestBuildXdsRouteRequestBodyBufferLimit|TestBuildUpgradeConfig|TestTranslateXds/request-body-buffer-limit$' -count=1
  • make manifests
  • make helm-template.gateway-crds-helm
  • make helm-template.gateway-helm
  • bash tools/hack/check-release-notes-filenames.sh
  • git diff --check

Signed-off-by: liuhy <liuhongyu@apache.org>
@Aias00
Aias00 requested a review from a team as a code owner July 7, 2026 14:17
Copilot AI review requested due to automatic review settings July 7, 2026 14:17
@netlify

netlify Bot commented Jul 7, 2026

Copy link
Copy Markdown

Deploy Preview for cerulean-figolla-1f9435 ready!

Name Link
🔨 Latest commit 4916530
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6a4d0a691544e2000864dad5
😎 Deploy Preview https://deploy-preview-9431--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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new BackendTrafficPolicy.spec.requestBodyBufferLimit field to expose Envoy’s per-route request_body_buffer_limit as a distinct knob from request buffering (HTTP buffer filter), wiring it end-to-end through translation, IR, and xDS, with docs, generated artifacts, and golden coverage.

Changes:

  • Added requestBodyBufferLimit to the v1alpha1 API (with quantity validation) and updated generated CRDs/Helm outputs and API docs.
  • Translated the new field into IR and set it on generated xDS routes (Route.request_body_buffer_limit) without enabling the HTTP buffer filter; added unit + golden coverage.
  • Added a release note fragment for the new feature.

Reviewed changes

Copilot reviewed 12 out of 20 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/helm/gateway-crds-helm/envoy-gateway-crds.out.yaml CRD schema output updated to include requestBodyBufferLimit.
test/helm/gateway-crds-helm/e2e.out.yaml E2E CRD schema output updated to include requestBodyBufferLimit.
test/helm/gateway-crds-helm/all.out.yaml Aggregated CRD schema output updated to include requestBodyBufferLimit.
site/content/en/latest/api/extension_types.md API reference docs updated with the new field and its semantics.
release-notes/current/new_features/8891-request-body-buffer-limit-backendtrafficpolicy.md Release note fragment added for the new feature.
internal/xds/translator/testdata/out/xds-ir/request-body-buffer-limit.routes.yaml Golden output added to validate route-level requestBodyBufferLimit in xDS IR rendering.
internal/xds/translator/testdata/out/xds-ir/request-body-buffer-limit.listeners.yaml Golden listener output for the new xDS IR scenario.
internal/xds/translator/testdata/out/xds-ir/request-body-buffer-limit.endpoints.yaml Golden endpoints output for the new xDS IR scenario.
internal/xds/translator/testdata/out/xds-ir/request-body-buffer-limit.clusters.yaml Golden clusters output for the new xDS IR scenario.
internal/xds/translator/testdata/in/xds-ir/request-body-buffer-limit.yaml New xDS IR input fixture that sets traffic.requestBodyBufferLimit.
internal/xds/translator/route.go Sets Route.RequestBodyBufferLimit from IR traffic features when configured.
internal/xds/translator/route_test.go Adds unit coverage for upgrade defaults and xDS route field population.
internal/ir/zz_generated.deepcopy.go DeepCopy updated for the new IR RequestBodyBufferLimit pointer field.
internal/ir/xds.go IR TrafficFeatures extended with RequestBodyBufferLimit.
internal/gatewayapi/backendtrafficpolicy.go Gateway API translation extended to parse/validate and populate the IR field.
internal/gatewayapi/backendtrafficpolicy_test.go Unit test added for translating requestBodyBufferLimit from policy spec.
charts/gateway-helm/charts/crds/crds/generated/gateway.envoyproxy.io_backendtrafficpolicies.yaml Generated CRD chart updated with the new schema field/description.
charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_backendtrafficpolicies.yaml Generated CRD templates updated with the new schema field/description.
api/v1alpha1/zz_generated.deepcopy.go API DeepCopy updated for the new RequestBodyBufferLimit field.
api/v1alpha1/backendtrafficpolicy_types.go API type extended with RequestBodyBufferLimit and kubebuilder validation markers.
Files not reviewed (2)
  • api/v1alpha1/zz_generated.deepcopy.go: Generated file
  • internal/ir/zz_generated.deepcopy.go: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.33%. Comparing base (30d456e) to head (4916530).

Files with missing lines Patch % Lines
internal/gatewayapi/backendtrafficpolicy.go 78.78% 4 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9431      +/-   ##
==========================================
- Coverage   75.35%   75.33%   -0.02%     
==========================================
  Files         252      252              
  Lines       41475    41491      +16     
==========================================
+ Hits        31254    31258       +4     
- Misses       8108     8116       +8     
- Partials     2113     2117       +4     

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

@zhaohuabing

Copy link
Copy Markdown
Member

@Aias00 thanks for working on this, but there is already an open pr #8893.

@Aias00

Aias00 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@Aias00 thanks for working on this, but there is already an open pr #8893.

my mistake, closing this pr

@Aias00 Aias00 closed this Jul 7, 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.

Expose Envoy route request_body_buffer_limit separately from request buffering

3 participants