feat: expose request body buffer limit#9431
Conversation
Signed-off-by: liuhy <liuhongyu@apache.org>
✅ Deploy Preview for cerulean-figolla-1f9435 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
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
requestBodyBufferLimitto 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 Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
Summary
BackendTrafficPolicy.spec.requestBodyBufferLimitto configure Envoy routerequest_body_buffer_limit.Fixes #8891
Testing
go test ./internal/gatewayapi -run 'TestBuildTrafficFeaturesRequestBodyBufferLimit|TestBuildTrafficFeaturesRejectsRequestBufferWithHTTPUpgrade' -count=1go test ./internal/xds/translator -run 'TestBuildXdsRouteRequestBodyBufferLimit|TestBuildUpgradeConfig|TestTranslateXds/request-body-buffer-limit$' -count=1make manifestsmake helm-template.gateway-crds-helmmake helm-template.gateway-helmbash tools/hack/check-release-notes-filenames.shgit diff --check