Skip to content

feat(extproc): add requestAttributes field to ExtProcProvider#14109

Merged
puertomontt merged 8 commits into
kgateway-dev:mainfrom
livegrenier:feat/ext-proc-request-attributes
Jun 24, 2026
Merged

feat(extproc): add requestAttributes field to ExtProcProvider#14109
puertomontt merged 8 commits into
kgateway-dev:mainfrom
livegrenier:feat/ext-proc-request-attributes

Conversation

@livegrenier

Copy link
Copy Markdown
Contributor

Adds RequestAttributes []string to ExtProcProvider, which maps to the
request_attributes field on Envoy's ExternalProcessor filter. When set,
Envoy populates ProcessingRequest.attributes with the specified attribute
expressions on every HTTP request.

This allows ext_proc servers that read connection-level Envoy attributes
(e.g. source.address) to function correctly, without relying solely on
HTTP headers. Regenerates CRD and deepcopy.

Description

Envoy's ext_proc filter supports a request_attributes field that causes it
to populate ProcessingRequest.attributes on every request. This is required
for ext_proc servers that need connection-level data (such as the TCP peer
address via source.address) which is not available as an HTTP header.

Change Type

/kind feature

Changelog

Add `requestAttributes` field to `GatewayExtension` ext_proc config, allowing
Envoy attributes (e.g. `source.address`) to be forwarded to ext_proc servers.

Copilot AI review requested due to automatic review settings May 26, 2026 05:39
@livegrenier
livegrenier requested a review from a team as a code owner May 26, 2026 05:39
@gateway-bot gateway-bot added kind/feature Categorizes issue or PR as related to a new feature. release-note labels May 26, 2026

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

Note

Copilot was unable to run its full agentic suite in this review.

Adds support for configuring Envoy ext_proc request_attributes via the ExtProcProvider API and propagates it through to the generated Envoy filter config and CRD schema.

Changes:

  • Introduces requestAttributes on ExtProcProvider (API + CRD schema).
  • Wires RequestAttributes into the ext_proc filter config builder when set.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
pkg/kgateway/extensions2/plugins/trafficpolicy/gateway_extension.go Propagates configured request attributes into the constructed Envoy ext_proc filter.
api/v1alpha1/kgateway/ext_proc_types.go Adds RequestAttributes to the public API type.
install/helm/kgateway-crds/templates/gateway.kgateway.dev_gatewayextensions.yaml Extends the CRD OpenAPI schema to expose requestAttributes.
Files not reviewed (1)
  • api/v1alpha1/kgateway/zz_generated.deepcopy.go: Language not supported

Comment on lines +72 to +77
// RequestAttributes specifies a list of Envoy attribute expressions whose values will be
// included in the ProcessingRequest.attributes map sent to the external processing server
// on every HTTP request.
// See: https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/http/ext_proc/v3/ext_proc.proto
// +optional
RequestAttributes []string `json:"requestAttributes,omitempty"`
See: https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/http/ext_proc/v3/ext_proc.proto
items:
type: string
type: array
Adds RequestAttributes []string to ExtProcProvider, which maps to the
request_attributes field on Envoy's ExternalProcessor filter. When set,
Envoy populates the ProcessingRequest.attributes map with the specified
attribute expressions on every HTTP request.

This allows ext_proc servers that read connection-level Envoy attributes
(e.g. source.address) to function correctly, without relying solely on
HTTP headers. Regenerates CRD and deepcopy.

Signed-off-by: David Grenier <[email protected]>
@puertomontt

Copy link
Copy Markdown
Contributor

can you add the field to pkg/kgateway/translator/gateway/testutils/inputs/traffic-policy/extproc-full-config.yaml

@puertomontt

Copy link
Copy Markdown
Contributor

can you resolve the merge conflicts?

@puertomontt
puertomontt enabled auto-merge June 24, 2026 10:02
@puertomontt
puertomontt added this pull request to the merge queue Jun 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 24, 2026
@puertomontt
puertomontt added this pull request to the merge queue Jun 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 24, 2026
@puertomontt
puertomontt added this pull request to the merge queue Jun 24, 2026
Merged via the queue into kgateway-dev:main with commit 7124dee Jun 24, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature Categorizes issue or PR as related to a new feature. release-note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants