-
Notifications
You must be signed in to change notification settings - Fork 820
feat: request buffer limit #8893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
0d4098c
0ac8c0d
ae8458c
afec703
c0d266a
d59c24d
33c5fcf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -138,6 +138,32 @@ type BackendTrafficPolicySpec struct { | |
| // | ||
| // +optional | ||
| RequestBuffer *RequestBuffer `json:"requestBuffer,omitempty"` | ||
|
|
||
| // RequestBodyBufferLimit specifies the maximum size in bytes that Envoy may buffer for request bodies. | ||
| // This configures Envoy's request body buffer limit without enabling full request buffering. | ||
| // | ||
| // This Request body buffer limit is independent of the connection buffer limits configured by | ||
| // ClientTrafficPolicy and BackendTrafficPolicy. The connection buffer limits control downstream | ||
| // and upstream connection read/write buffering and back pressure, while this field sets the | ||
| // maximum size of an individual request body that Envoy may buffer for HTTP processing. | ||
| // | ||
| // For HTTP/1, connection buffer limits can still affect how request body data is read and buffered | ||
| // before or while the request body limit is enforced. Configure connection buffer limits large | ||
| // enough for the request body buffering you expect to allow on those connections. | ||
| // | ||
| // For HTTP/2, initial stream and connection window sizes control HTTP/2 flow control: how much data | ||
| // can be in flight before back pressure applies. They affect upload throughput and buffering | ||
| // behavior, but they are not a replacement for this request body size limit. | ||
| // | ||
| // If exceeded, the request will be rejected with HTTP 413 Content Too Large. | ||
| // | ||
| // Accepts values in resource.Quantity format (e.g., "10Mi", "500Ki"). | ||
| // | ||
| // +kubebuilder:validation:XIntOrString | ||
| // +kubebuilder:validation:Pattern="^[1-9]+[0-9]*([EPTGMK]i|[EPTGMk])?$" | ||
| // +optional | ||
| RequestBodyBufferLimit *resource.Quantity `json:"requestBodyBufferLimit,omitempty"` | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not a must, but could this be part of
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They have different meanings:
I'm afraid it would cause confusion if we include both of them inside one
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| // Telemetry configures the telemetry settings for the policy target (Gateway or xRoute). | ||
| // This will override the telemetry settings in the EnvoyProxy resource. | ||
| // | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| gateways: | ||
| - apiVersion: gateway.networking.k8s.io/v1 | ||
| kind: Gateway | ||
| metadata: | ||
| namespace: envoy-gateway | ||
| name: gateway-1 | ||
| spec: | ||
| gatewayClassName: envoy-gateway-class | ||
| listeners: | ||
| - name: http | ||
| protocol: HTTP | ||
| port: 80 | ||
| allowedRoutes: | ||
| namespaces: | ||
| from: All | ||
| - apiVersion: gateway.networking.k8s.io/v1 | ||
| kind: Gateway | ||
| metadata: | ||
| namespace: envoy-gateway | ||
| name: gateway-2 | ||
| spec: | ||
| gatewayClassName: envoy-gateway-class | ||
| listeners: | ||
| - name: http | ||
| protocol: HTTP | ||
| port: 8080 | ||
| allowedRoutes: | ||
| namespaces: | ||
| from: All | ||
| httpRoutes: | ||
| - apiVersion: gateway.networking.k8s.io/v1 | ||
| kind: HTTPRoute | ||
| metadata: | ||
| namespace: default | ||
| name: httproute-1 | ||
| spec: | ||
| hostnames: | ||
| - gateway.envoyproxy.io | ||
| parentRefs: | ||
| - namespace: envoy-gateway | ||
| name: gateway-1 | ||
| sectionName: http | ||
| rules: | ||
| - matches: | ||
| - path: | ||
| value: "/foo" | ||
| backendRefs: | ||
| - name: service-1 | ||
| port: 8080 | ||
| - apiVersion: gateway.networking.k8s.io/v1 | ||
| kind: HTTPRoute | ||
| metadata: | ||
| namespace: default | ||
| name: httproute-2 | ||
| spec: | ||
| hostnames: | ||
| - gateway.envoyproxy.io | ||
| parentRefs: | ||
| - namespace: envoy-gateway | ||
| name: gateway-2 | ||
| sectionName: http | ||
| rules: | ||
| - matches: | ||
| - path: | ||
| value: "/foo" | ||
| backendRefs: | ||
| - name: service-2 | ||
| port: 8080 | ||
| backendTrafficPolicies: | ||
| - apiVersion: gateway.envoyproxy.io/v1alpha1 | ||
| kind: BackendTrafficPolicy | ||
| metadata: | ||
| name: policy-for-route | ||
| namespace: default | ||
| spec: | ||
| targetRef: | ||
| group: gateway.networking.k8s.io | ||
| kind: HTTPRoute | ||
| name: httproute-2 | ||
| requestBodyBufferLimit: 4Mi | ||
| - apiVersion: gateway.envoyproxy.io/v1alpha1 | ||
| kind: BackendTrafficPolicy | ||
| metadata: | ||
| name: policy-for-gateway | ||
| namespace: envoy-gateway | ||
| spec: | ||
| targetRef: | ||
| group: gateway.networking.k8s.io | ||
| kind: Gateway | ||
| name: gateway-1 | ||
| requestBodyBufferLimit: 4Mi |
Uh oh!
There was an error while loading. Please reload this page.