Skip to content
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

api: ext-proc attributes #4747

Closed
wants to merge 14 commits into from
Closed
53 changes: 0 additions & 53 deletions ADOPTERS.md

This file was deleted.

34 changes: 34 additions & 0 deletions api/v1alpha1/ext_proc_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,21 @@ const (
)

// ProcessingModeOptions defines if headers or body should be processed by the external service
// and which attributes are sent to the processor
type ProcessingModeOptions struct {
// Defines body processing mode
//
// +optional
Body *ExtProcBodyProcessingMode `json:"body,omitempty"`

// Defines which attributes are sent to the external processor. Envoy Gateway currently
// supports only the following attribute prefixes: connection, source, destination,
// request, response, upstream and xds.route.
// https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/advanced/attributes
//
// +optional
// +kubebuilder:validation:items:Pattern=`^(connection\.|source\.|destination\.|request\.|response\.|upstream\.|xds\.route_)[a-z_1-9]*$`
Attributes []string `json:"attributes,omitempty"`
}

// ExtProcProcessingMode defines if and how headers and bodies are sent to the service.
Expand Down Expand Up @@ -70,4 +80,28 @@ type ExtProc struct {
//
// +optional
ProcessingMode *ExtProcProcessingMode `json:"processingMode,omitempty"`

// MetadataOptions defines options related to the sending and receiving of dynamic metadata.
// These options define which metadata namespaces would be sent to the processor and which dynamic metadata
// namespaces the processor would be permitted to emit metadata to.
// Users can specify custom namespaces or well-known envoy metadata namespace (such as envoy.filters.http.ext_authz)
// documented here: https://www.envoyproxy.io/docs/envoy/latest/configuration/advanced/well_known_dynamic_metadata#well-known-dynamic-metadata
// Default: no metadata context is sent or received from the external processor
//
// +optional
MetadataOptions *ExtProcMetadataOptions `json:"metadataOptions,omitempty"`
Comment on lines +84 to +92
Copy link
Member

Choose a reason for hiding this comment

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

+1 on this

}

// ExtProcMetadataOptions defines options related to the sending and receiving of dynamic metadata to and from the
// external processor service
type ExtProcMetadataOptions struct {
// metadata namespaces forwarded to external processor
//
// +optional
ForwardingNamespaces []string `json:"forwardingNamespaces,omitempty"`

// metadata namespaces updatable by external processor
//
// +optional
ReceivingNamespaces []string `json:"receivingNamespaces,omitempty"`
}
35 changes: 35 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

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
Expand Up @@ -908,6 +908,26 @@ spec:
Default: 200ms
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
metadataOptions:
description: |-
MetadataOptions defines options related to the sending and receiving of dynamic metadata.
These options define which metadata namespaces would be sent to the processor and which dynamic metadata
namespaces the processor would be permitted to emit metadata to.
Users can specify custom namespaces or well-known envoy metadata namespace (such as envoy.filters.http.ext_authz)
documented here: https://www.envoyproxy.io/docs/envoy/latest/configuration/advanced/well_known_dynamic_metadata#well-known-dynamic-metadata
Default: no metadata context is sent or received from the external processor
properties:
forwardingNamespaces:
description: metadata namespaces forwarded to external processor
items:
type: string
type: array
receivingNamespaces:
description: metadata namespaces updatable by external processor
items:
type: string
type: array
type: object
processingMode:
description: |-
ProcessingMode defines how request and response body is processed
Expand All @@ -918,6 +938,16 @@ spec:
Defines processing mode for requests. If present, request headers are sent. Request body is processed according
to the specified mode.
properties:
attributes:
description: |-
Defines which attributes are sent to the external processor. Envoy Gateway currently
supports only the following attribute prefixes: connection, source, destination,
request, response, upstream and xds.route.
https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/advanced/attributes
items:
pattern: ^(connection\.|source\.|destination\.|request\.|response\.|upstream\.|xds\.route_)[a-z_1-9]*$
type: string
type: array
body:
description: Defines body processing mode
enum:
Expand All @@ -931,6 +961,16 @@ spec:
Defines processing mode for responses. If present, response headers are sent. Response body is processed according
to the specified mode.
properties:
attributes:
description: |-
Defines which attributes are sent to the external processor. Envoy Gateway currently
supports only the following attribute prefixes: connection, source, destination,
request, response, upstream and xds.route.
https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/advanced/attributes
items:
pattern: ^(connection\.|source\.|destination\.|request\.|response\.|upstream\.|xds\.route_)[a-z_1-9]*$
type: string
type: array
body:
description: Defines body processing mode
enum:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,7 @@ xds:
commonLbConfig:
localityWeightedLbConfig: {}
connectTimeout: 10s
dnsLookupFamily: V4_PREFERRED
edsClusterConfig:
edsConfig:
ads: {}
Expand All @@ -791,6 +792,7 @@ xds:
commonLbConfig:
localityWeightedLbConfig: {}
connectTimeout: 10s
dnsLookupFamily: V4_PREFERRED
edsClusterConfig:
edsConfig:
ads: {}
Expand All @@ -817,6 +819,7 @@ xds:
commonLbConfig:
localityWeightedLbConfig: {}
connectTimeout: 10s
dnsLookupFamily: V4_PREFERRED
edsClusterConfig:
edsConfig:
ads: {}
Expand All @@ -836,6 +839,7 @@ xds:
commonLbConfig:
localityWeightedLbConfig: {}
connectTimeout: 10s
dnsLookupFamily: V4_PREFERRED
edsClusterConfig:
edsConfig:
ads: {}
Expand All @@ -855,6 +859,7 @@ xds:
commonLbConfig:
localityWeightedLbConfig: {}
connectTimeout: 10s
dnsLookupFamily: V4_PREFERRED
edsClusterConfig:
edsConfig:
ads: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ xds:
commonLbConfig:
localityWeightedLbConfig: {}
connectTimeout: 10s
dnsLookupFamily: V4_PREFERRED
edsClusterConfig:
edsConfig:
ads: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@
"localityWeightedLbConfig": {}
},
"connectTimeout": "10s",
"dnsLookupFamily": "V4_PREFERRED",
"edsClusterConfig": {
"edsConfig": {
"ads": {},
Expand Down Expand Up @@ -487,6 +488,7 @@
"localityWeightedLbConfig": {}
},
"connectTimeout": "10s",
"dnsLookupFamily": "V4_PREFERRED",
"edsClusterConfig": {
"edsConfig": {
"ads": {},
Expand Down Expand Up @@ -527,6 +529,7 @@
"localityWeightedLbConfig": {}
},
"connectTimeout": "10s",
"dnsLookupFamily": "V4_PREFERRED",
"edsClusterConfig": {
"edsConfig": {
"ads": {},
Expand Down Expand Up @@ -556,6 +559,7 @@
"localityWeightedLbConfig": {}
},
"connectTimeout": "10s",
"dnsLookupFamily": "V4_PREFERRED",
"edsClusterConfig": {
"edsConfig": {
"ads": {},
Expand Down Expand Up @@ -585,6 +589,7 @@
"localityWeightedLbConfig": {}
},
"connectTimeout": "10s",
"dnsLookupFamily": "V4_PREFERRED",
"edsClusterConfig": {
"edsConfig": {
"ads": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ xds:
commonLbConfig:
localityWeightedLbConfig: {}
connectTimeout: 10s
dnsLookupFamily: V4_PREFERRED
edsClusterConfig:
edsConfig:
ads: {}
Expand All @@ -270,6 +271,7 @@ xds:
commonLbConfig:
localityWeightedLbConfig: {}
connectTimeout: 10s
dnsLookupFamily: V4_PREFERRED
edsClusterConfig:
edsConfig:
ads: {}
Expand All @@ -296,6 +298,7 @@ xds:
commonLbConfig:
localityWeightedLbConfig: {}
connectTimeout: 10s
dnsLookupFamily: V4_PREFERRED
edsClusterConfig:
edsConfig:
ads: {}
Expand All @@ -315,6 +318,7 @@ xds:
commonLbConfig:
localityWeightedLbConfig: {}
connectTimeout: 10s
dnsLookupFamily: V4_PREFERRED
edsClusterConfig:
edsConfig:
ads: {}
Expand All @@ -334,6 +338,7 @@ xds:
commonLbConfig:
localityWeightedLbConfig: {}
connectTimeout: 10s
dnsLookupFamily: V4_PREFERRED
edsClusterConfig:
edsConfig:
ads: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ xds:
commonLbConfig:
localityWeightedLbConfig: {}
connectTimeout: 10s
dnsLookupFamily: V4_PREFERRED
edsClusterConfig:
edsConfig:
ads: {}
Expand All @@ -29,6 +30,7 @@ xds:
commonLbConfig:
localityWeightedLbConfig: {}
connectTimeout: 10s
dnsLookupFamily: V4_PREFERRED
edsClusterConfig:
edsConfig:
ads: {}
Expand All @@ -55,6 +57,7 @@ xds:
commonLbConfig:
localityWeightedLbConfig: {}
connectTimeout: 10s
dnsLookupFamily: V4_PREFERRED
edsClusterConfig:
edsConfig:
ads: {}
Expand All @@ -74,6 +77,7 @@ xds:
commonLbConfig:
localityWeightedLbConfig: {}
connectTimeout: 10s
dnsLookupFamily: V4_PREFERRED
edsClusterConfig:
edsConfig:
ads: {}
Expand All @@ -93,6 +97,7 @@ xds:
commonLbConfig:
localityWeightedLbConfig: {}
connectTimeout: 10s
dnsLookupFamily: V4_PREFERRED
edsClusterConfig:
edsConfig:
ads: {}
Expand Down
Loading