BackendSecurityPolicy
aigateway.envoyproxy.io / v1beta1
apiVersion: aigateway.envoyproxy.io/v1beta1
kind: BackendSecurityPolicy
metadata:
name: example
apiVersion
string
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
kind
string
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadata
object
spec object
BackendSecurityPolicySpec specifies authentication rules on access the provider from the Gateway.
Only one mechanism to access a backend(s) can be specified.
Only one type of BackendSecurityPolicy can be defined.
anthropicAPIKey object
AnthropicAPIKey is a mechanism to access Anthropic backend(s). The API key will be injected into the "x-api-key" header.
https://docs.claude.com/en/api/overview#authentication
secretRef object required
SecretRef is the reference to the secret containing the Anthropic API key.
ai-gateway must be given the permission to read this secret.
The key of the secret should be "apiKey".
group
string
Group is the group of the referent. For example, "gateway.networking.k8s.io".
When unspecified or empty string, core API group is inferred.
pattern:
^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$maxLength:
253
kind
string
Kind is kind of the referent. For example "Secret".
pattern:
^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$minLength:
1maxLength:
63
name
string required
Name is the name of the referent.
minLength:
1maxLength:
253
namespace
string
Namespace is the namespace of the referenced object. When unspecified, the local
namespace is inferred.
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
Support: Core
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?$minLength:
1maxLength:
63apiKey object
APIKey is a mechanism to access a backend(s). The API key will be injected into the Authorization header.
secretRef object required
SecretRef is the reference to the secret containing the API key.
ai-gateway must be given the permission to read this secret.
The key of the secret should be "apiKey".
group
string
Group is the group of the referent. For example, "gateway.networking.k8s.io".
When unspecified or empty string, core API group is inferred.
pattern:
^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$maxLength:
253
kind
string
Kind is kind of the referent. For example "Secret".
pattern:
^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$minLength:
1maxLength:
63
name
string required
Name is the name of the referent.
minLength:
1maxLength:
253
namespace
string
Namespace is the namespace of the referenced object. When unspecified, the local
namespace is inferred.
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
Support: Core
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?$minLength:
1maxLength:
63awsCredentials object
AWSCredentials is a mechanism to access a backend(s). AWS specific logic will be applied.
credentialsFile object
CredentialsFile specifies the credentials file to use for the AWS provider.
When specified, this takes precedence over the default credential chain.
profile
string
Profile is the profile to use in the credentials file.
secretRef object required
SecretRef is the reference to the credential file.
The secret should contain the AWS credentials file keyed on "credentials".
group
string
Group is the group of the referent. For example, "gateway.networking.k8s.io".
When unspecified or empty string, core API group is inferred.
pattern:
^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$maxLength:
253
kind
string
Kind is kind of the referent. For example "Secret".
pattern:
^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$minLength:
1maxLength:
63
name
string required
Name is the name of the referent.
minLength:
1maxLength:
253
namespace
string
Namespace is the namespace of the referenced object. When unspecified, the local
namespace is inferred.
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
Support: Core
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?$minLength:
1maxLength:
63oidcExchangeToken object
OIDCExchangeToken specifies the oidc configurations used to obtain an oidc token. The oidc token will be
used to obtain temporary credentials to access AWS.
When specified, this takes precedence over the default credential chain.
aud
string
Aud defines the audience that this ID Token is intended for.
awsRoleArn
string required
AwsRoleArn is the AWS IAM Role with the permission to use specific resources in AWS account
which maps to the temporary AWS security credentials exchanged using the authentication token issued by OIDC provider.
minLength:
1
grantType
string
GrantType is the method application gets access token.
oidc object required
OIDC is used to obtain oidc tokens via an SSO server which will be used to exchange for provider credentials.
clientID
string
The client ID to be used in the OIDC
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
Only one of clientID or clientIDRef must be set.
minLength:
1clientIDRef object
The Kubernetes secret which contains the client ID to be used in the
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
Exactly one of clientID or clientIDRef must be set.
This is an Opaque secret. The client ID should be stored in the key "client-id".
Only one of clientID or clientIDRef must be set.
group
string
Group is the group of the referent. For example, "gateway.networking.k8s.io".
When unspecified or empty string, core API group is inferred.
pattern:
^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$maxLength:
253
kind
string
Kind is kind of the referent. For example "Secret".
pattern:
^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$minLength:
1maxLength:
63
name
string required
Name is the name of the referent.
minLength:
1maxLength:
253
namespace
string
Namespace is the namespace of the referenced object. When unspecified, the local
namespace is inferred.
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
Support: Core
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?$minLength:
1maxLength:
63clientSecret object required
The Kubernetes secret which contains the OIDC client secret to be used in the
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
This is an Opaque secret. The client secret should be stored in the key
"client-secret".
group
string
Group is the group of the referent. For example, "gateway.networking.k8s.io".
When unspecified or empty string, core API group is inferred.
pattern:
^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$maxLength:
253
kind
string
Kind is kind of the referent. For example "Secret".
pattern:
^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$minLength:
1maxLength:
63
name
string required
Name is the name of the referent.
minLength:
1maxLength:
253
namespace
string
Namespace is the namespace of the referenced object. When unspecified, the local
namespace is inferred.
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
Support: Core
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?$minLength:
1maxLength:
63cookieConfig object
CookieConfigs allows setting the SameSite attribute for OIDC cookies.
By default, its unset.
sameSite
string
enum:
Lax, Strict, None
cookieDomain
string
The optional domain to set the access and ID token cookies on.
If not set, the cookies will default to the host of the request, not including the subdomains.
If set, the cookies will be set on the specified domain and all subdomains.
This means that requests to any subdomain will not require reauthentication after users log in to the parent domain.
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9]))*$cookieNames object
The optional cookie name overrides to be used for Bearer and IdToken cookies in the
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
If not specified, uses a randomly generated suffix
accessToken
string
The name of the cookie used to store the AccessToken in the
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
If not specified, defaults to "AccessToken-(randomly generated uid)"
idToken
string
The name of the cookie used to store the IdToken in the
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
If not specified, defaults to "IdToken-(randomly generated uid)"
csrfTokenTTL
string
CSRFTokenTTL defines how long the CSRF token generated during the OAuth2 authorization flow remains valid.
This duration determines the lifetime of the CSRF cookie, which is validated against the CSRF token
in the "state" parameter when the provider redirects back to the callback endpoint.
If omitted, Envoy Gateway defaults the token expiration to 10 minutes.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
defaultRefreshTokenTTL
string
DefaultRefreshTokenTTL is the default lifetime of the refresh token.
This field is only used when the exp (expiration time) claim is omitted in
the refresh token or the refresh token is not JWT.
If not specified, defaults to 604800s (one week).
Note: this field is only applicable when the "refreshToken" field is set to true.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
defaultTokenTTL
string
DefaultTokenTTL is the default lifetime of the id token and access token.
Please note that Envoy will always use the expiry time from the response
of the authorization server if it is provided. This field is only used when
the expiry time is not provided by the authorization.
If not specified, defaults to 0. In this case, the "expires_in" field in
the authorization response must be set by the authorization server, or the
OAuth flow will fail.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$denyRedirect object
Any request that matches any of the provided matchers (with either tokens that are expired or missing tokens) will not be redirected to the OIDC Provider.
This behavior can be useful for AJAX or machine requests.
headers []object required
Defines the headers to match against the request to deny redirect to the OIDC Provider.
minItems:
1maxItems:
16
name
string required
Specifies the name of the header in the request.
minLength:
1
type
string
Type specifies how to match against a string.
enum:
Exact, Prefix, Suffix, RegularExpression
value
string required
Value specifies the string value that the match must have.
minLength:
1maxLength:
1024
disableTokenEncryption
boolean
Disable token encryption. When set to true, both the access token and the ID token will be stored in plain text.
This option should only be used in secure environments where token encryption is not required.
Default is false (tokens are encrypted).
forwardAccessToken
boolean
ForwardAccessToken indicates whether the Envoy should forward the access token
via the Authorization header Bearer scheme to the upstream.
If not specified, defaults to false.
forwardIDToken object
ForwardIDToken configures forwarding of the OIDC ID token to the upstream.
If the configured header is "Authorization", EG forwards the ID token using
the "Bearer " prefix. For any other header, EG forwards the raw token value.
If not specified, the ID token will not be forwarded.
header
string required
Header is the upstream request header that will carry the ID token.
minLength:
1
logoutPath
string
The path to log a user out, clearing their credential cookies.
If not specified, uses a default logout path "/logout"
passThroughAuthHeader
boolean
Skips OIDC authentication when the request contains a header that will be extracted by the JWT filter. Unless
explicitly stated otherwise in the extractFrom field, this will be the "Authorization: Bearer ..." header.
The passThroughAuthHeader option is typically used for non-browser clients that may not be able to handle OIDC
redirects and wish to directly supply a token instead.
If not specified, defaults to false.
provider object required
The OIDC Provider configuration.
authorizationEndpoint
string
The OIDC Provider's [authorization endpoint](https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint).
If not provided, EG will try to discover it from the provider's [Well-Known Configuration Endpoint](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse).
backendRef object
BackendRef references a Kubernetes object that represents the
backend server to which the authorization request will be sent.
Deprecated: Use BackendRefs instead.
group
string
Group is the group of the referent. For example, "gateway.networking.k8s.io".
When unspecified or empty string, core API group is inferred.
pattern:
^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$maxLength:
253
kind
string
Kind is the Kubernetes resource kind of the referent. For example
"Service".
Defaults to "Service" when not specified.
ExternalName services can refer to CNAME DNS records that may live
outside of the cluster and as such are difficult to reason about in
terms of conformance. They also may not be safe to forward to (see
CVE-2021-25740 for more information). Implementations SHOULD NOT
support ExternalName Services.
Support: Core (Services with a type other than ExternalName)
Support: Implementation-specific (Services with type ExternalName)
pattern:
^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$minLength:
1maxLength:
63
name
string required
Name is the name of the referent.
minLength:
1maxLength:
253
namespace
string
Namespace is the namespace of the backend. When unspecified, the local
namespace is inferred.
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
Support: Core
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?$minLength:
1maxLength:
63
port
integer
Port specifies the destination port number to use for this resource.
Port is required when the referent is a Kubernetes Service. In this
case, the port number is the service port number, not the target port.
For other resources, destination port might be derived from the referent
resource or this field.
format:
int32minimum:
1maximum:
65535backendRefs []object
BackendRefs references a Kubernetes object that represents the
backend server to which the authorization request will be sent.
maxItems:
16
fallback
boolean
Fallback indicates whether the backend is designated as a fallback.
Multiple fallback backends can be configured.
It is highly recommended to configure active or passive health checks to ensure that failover can be detected
when the active backends become unhealthy and to automatically readjust once the primary backends are healthy again.
The overprovisioning factor is set to 1.4, meaning the fallback backends will only start receiving traffic when
the health of the active backends falls below 72%.
group
string
Group is the group of the referent. For example, "gateway.networking.k8s.io".
When unspecified or empty string, core API group is inferred.
pattern:
^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$maxLength:
253
kind
string
Kind is the Kubernetes resource kind of the referent. For example
"Service".
Defaults to "Service" when not specified.
ExternalName services can refer to CNAME DNS records that may live
outside of the cluster and as such are difficult to reason about in
terms of conformance. They also may not be safe to forward to (see
CVE-2021-25740 for more information). Implementations SHOULD NOT
support ExternalName Services.
Support: Core (Services with a type other than ExternalName)
Support: Implementation-specific (Services with type ExternalName)
pattern:
^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$minLength:
1maxLength:
63
name
string required
Name is the name of the referent.
minLength:
1maxLength:
253
namespace
string
Namespace is the namespace of the backend. When unspecified, the local
namespace is inferred.
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
Support: Core
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?$minLength:
1maxLength:
63
port
integer
Port specifies the destination port number to use for this resource.
Port is required when the referent is a Kubernetes Service. In this
case, the port number is the service port number, not the target port.
For other resources, destination port might be derived from the referent
resource or this field.
format:
int32minimum:
1maximum:
65535
weight
integer
Weight specifies the proportion of requests forwarded to the referenced
backend. This is computed as weight/(sum of all weights in this
BackendRefs list). For non-zero values, there may be some epsilon from
the exact proportion defined here depending on the precision an
implementation supports. Weight is not a percentage and the sum of
weights does not need to equal 100.
If only one backend is specified and it has a weight greater than 0, 100%
of the traffic is forwarded to that backend. If weight is set to 0, no
traffic should be forwarded for this entry. If unspecified, weight
defaults to 1.
Support for this field varies based on the context where used.
format:
int32minimum:
0maximum:
1e+06backendSettings object
BackendSettings holds configuration for managing the connection
to the backend.
circuitBreaker object
Circuit Breaker settings for the upstream connections and requests.
If not set, circuit breakers will be enabled with the default thresholds
maxConnections
integer
The maximum number of connections that Envoy will establish to the referenced backend defined within a xRoute rule.
format:
int64minimum:
0maximum:
4.294967295e+09
maxParallelRequests
integer
The maximum number of parallel requests that Envoy will make to the referenced backend defined within a xRoute rule.
format:
int64minimum:
0maximum:
4.294967295e+09
maxParallelRetries
integer
The maximum number of parallel retries that Envoy will make to the referenced backend defined within a xRoute rule.
format:
int64minimum:
0maximum:
4.294967295e+09
maxPendingRequests
integer
The maximum number of pending requests that Envoy will queue to the referenced backend defined within a xRoute rule.
format:
int64minimum:
0maximum:
4.294967295e+09
maxRequestsPerConnection
integer
The maximum number of requests that Envoy will make over a single connection to the referenced backend defined within a xRoute rule.
Default: unlimited.
format:
int64minimum:
0maximum:
4.294967295e+09perEndpoint object
PerEndpoint defines Circuit Breakers that will apply per-endpoint for an upstream cluster
maxConnections
integer
MaxConnections configures the maximum number of connections that Envoy will establish per-endpoint to the referenced backend defined within a xRoute rule.
format:
int64minimum:
0maximum:
4.294967295e+09retryBudget object
RetryBudget provides settings for retry budget, which limits the number of retries in a given percentage.
RetryBudget take precedence over maxParallelRetries.
minRetryConcurrency
integer
MinRetryConcurrency specifies the minimum retry concurrency allowed for the retry budget.
For example, a budget of 20% with a minimum retry concurrency of 3
will allow 5 active retries while there are 25 active requests.
If there are 2 active requests, there are still 3 active retries
allowed because of the minimum retry concurrency.
Defaults to 3.
format:
int32percent object required
Percent specifies the limit on concurrent retries as a percentage [0, 100] of
the sum of active requests and active pending requests.
denominator
integer
format:
int32minimum:
1
numerator
integer required
format:
int32minimum:
0connection object
Connection includes backend connection settings.
bufferLimit
string | integer
BufferLimit Soft limit on size of the cluster’s connections read and write buffers.
BufferLimit applies to connection streaming (maybe non-streaming) channel between processes, it's in user space.
If unspecified, an implementation defined default is applied (32768 bytes).
For example, 20Mi, 1Gi, 256Ki etc.
Note: that when the suffix is not provided, the value is interpreted as bytes.
preconnect object
Preconnect configures proactive upstream connections to reduce latency by establishing
connections before they’re needed and avoiding connection establishment overhead.
If unset, Envoy will fetch connections as needed to serve in-flight requests.
perEndpointPercent
integer
PerEndpointPercent configures how many additional connections to maintain per
upstream endpoint, useful for high-QPS or latency sensitive services. Expressed as a
percentage of the connections required by active streams
(e.g. 100 = preconnect disabled, 105 = 1.05x connections per-endpoint, 200 = 2.00×).
Allowed value range is between 100-300. When both PerEndpointPercent and
PredictivePercent are set, Envoy ensures both are satisfied (max of the two).
format:
int32minimum:
100maximum:
300
predictivePercent
integer
PredictivePercent configures how many additional connections to maintain
across the cluster by anticipating which upstream endpoint the load balancer
will select next, useful for low-QPS services. Relies on deterministic
loadbalancing and is only supported with Random or RoundRobin.
Expressed as a percentage of the connections required by active streams
(e.g. 100 = 1.0 (no preconnect), 105 = 1.05× connections across the cluster, 200 = 2.00×).
Minimum allowed value is 100. When both PerEndpointPercent and PredictivePercent are
set Envoy ensures both are satisfied per host (max of the two).
format:
int32minimum:
100
socketBufferLimit
string | integer
SocketBufferLimit provides configuration for the maximum buffer size in bytes for each socket
to backend.
SocketBufferLimit applies to socket streaming channel between TCP/IP stacks, it's in kernel space.
For example, 20Mi, 1Gi, 256Ki etc.
Note that when the suffix is not provided, the value is interpreted as bytes.
dns object
DNS includes dns resolution settings.
dnsRefreshRate
string
DNSRefreshRate specifies the rate at which DNS records should be refreshed.
Defaults to 30 seconds.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
lookupFamily
string
LookupFamily determines how Envoy would resolve DNS for Routes where the backend is specified as a fully qualified domain name (FQDN).
If set, this configuration overrides other defaults.
enum:
IPv4, IPv6, IPv4Preferred, IPv6Preferred, IPv4AndIPv6
respectDnsTtl
boolean
RespectDNSTTL indicates whether the DNS Time-To-Live (TTL) should be respected.
If the value is set to true, the DNS refresh rate will be set to the resource record’s TTL.
Defaults to true.
healthCheck object
HealthCheck allows gateway to perform active health checking on backends.
active object
Active health check configuration
grpc object
GRPC defines the configuration of the GRPC health checker.
It's optional, and can only be used if the specified type is GRPC.
service
string
Service to send in the health check request.
If this is not specified, then the health check request applies to the entire
server and not to a specific service.
healthyThreshold
integer
HealthyThreshold defines the number of healthy health checks required before a backend host is marked healthy.
format:
int32minimum:
1http object
HTTP defines the configuration of http health checker.
It's required while the health checker type is HTTP.
expectedResponse object
ExpectedResponse defines a list of HTTP expected responses to match.
binary
string
Binary payload base64 encoded.
format:
byte
text
string
Text payload in plain text.
type
string required
Type defines the type of the payload.
expectedStatuses
[]integer
ExpectedStatuses defines a list of HTTP response statuses considered healthy.
Defaults to 200 only
hostname
string
Hostname defines the HTTP Host header used for active HTTP health checks.
Host selection uses this order: this field, the associated Backend endpoint
hostname if available, then the effective Route hostname.
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$minLength:
1maxLength:
253
method
string
Method defines the HTTP method used for health checking.
Defaults to GET
path
string required
Path defines the HTTP path that will be requested during health checking.
minLength:
1maxLength:
1024
retriableStatuses
[]integer
RetriableStatuses defines a list of HTTP response statuses considered retriable.
Responses matching these statuses count towards the unhealthy threshold but
do not result in the host being considered immediately unhealthy.
The expected statuses take precedence for any range overlaps with this field.
initialJitter
string
InitialJitter defines the maximum time Envoy will wait before the first health check.
Envoy will randomly select a value between 0 and the initial jitter value.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
interval
string
Interval defines the time between active health checks.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$overrides object
Overrides defines the configuration of the overriding health check settings for all endpoints
in the backend cluster. This allows customization of port and other settings that may differ
from the main service configuration.
port
integer
Port overrides the health check port.
If not set, the endpoint's serving port is used for health checks.
This is useful when health checks are served on a different port than
the main service port (e.g., port 443 for service, port 9090 for health checks).
format:
int32minimum:
1maximum:
65535tcp object
TCP defines the configuration of tcp health checker.
It's required while the health checker type is TCP.
receive object
Receive defines the expected response payload.
binary
string
Binary payload base64 encoded.
format:
byte
text
string
Text payload in plain text.
type
string required
Type defines the type of the payload.
send object
Send defines the request payload.
binary
string
Binary payload base64 encoded.
format:
byte
text
string
Text payload in plain text.
type
string required
Type defines the type of the payload.
timeout
string
Timeout defines the time to wait for a health check response.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
type
string required
Type defines the type of health checker.
unhealthyThreshold
integer
UnhealthyThreshold defines the number of unhealthy health checks required before a backend host is marked unhealthy.
Without RetriableStatuses configured, any health check failure results in the host being immediately
considered unhealthy. When RetriableStatuses is set, health checks returning those statuses are retried
up to this threshold before the host is marked unhealthy.
format:
int32minimum:
1
panicThreshold
integer
When number of unhealthy endpoints for a backend reaches this threshold
Envoy will disregard health status and balance across all endpoints.
It's designed to prevent a situation in which host failures cascade throughout the cluster
as load increases. If not set, the default value is 50%. To disable panic mode, set value to `0`.
format:
int32minimum:
0maximum:
100passive object
Passive passive check configuration
alwaysEjectOneEndpoint
boolean
AlwaysEjectOneEndpoint defines whether at least one host should be ejected,
regardless of MaxEjectionPercent.
baseEjectionTime
string
BaseEjectionTime defines the base duration for which a host will be ejected on consecutive failures.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
consecutive5XxErrors
integer
Consecutive5xxErrors sets the number of consecutive 5xx errors triggering ejection.
format:
int32
consecutiveGatewayErrors
integer
ConsecutiveGatewayErrors sets the number of consecutive gateway errors triggering ejection.
format:
int32
consecutiveLocalOriginFailures
integer
ConsecutiveLocalOriginFailures sets the number of consecutive local origin failures triggering ejection.
Parameter takes effect only when split_external_local_origin_errors is set to true.
format:
int32
failurePercentageThreshold
integer
FailurePercentageThreshold sets the failure percentage threshold for outlier detection.
If the failure percentage of a given host is greater than or equal to this value, it will be ejected.
Defaults to 85.
format:
int32minimum:
0maximum:
100
interval
string
Interval defines the time between passive health checks.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
maxEjectionPercent
integer
MaxEjectionPercent sets the maximum percentage of hosts in a cluster that can be ejected.
format:
int32minimum:
0maximum:
100
splitExternalLocalOriginErrors
boolean
SplitExternalLocalOriginErrors enables splitting of errors between external and local origin.
http2 object
HTTP2 provides HTTP/2 configuration for backend connections.
connectionKeepalive object
ConnectionKeepalive configures HTTP/2 connection keepalive using PING frames.
idleInterval
string
IdleInterval specifies how long a connection must be idle before a PING is sent.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
interval
string
Interval specifies how often to send HTTP/2 PING frames to keep the connection alive.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
intervalJitter
integer
IntervalJitter specifies a random jitter percentage added to each interval.
Defaults to 15% if not specified.
format:
int32minimum:
0maximum:
100
timeout
string
Timeout specifies how long to wait for a PING response before considering the connection dead.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
initialConnectionWindowSize
string | integer
InitialConnectionWindowSize sets the initial window size for HTTP/2 connections.
If not set, the default value is 1 MiB.
initialStreamWindowSize
string | integer
InitialStreamWindowSize sets the initial window size for HTTP/2 streams.
If not set, the default value is 64 KiB(64*1024).
maxConcurrentStreams
integer
MaxConcurrentStreams sets the maximum number of concurrent streams allowed per connection.
If not set, the default value is 100.
format:
int32minimum:
1maximum:
2.147483647e+09
onInvalidMessage
string
OnInvalidMessage determines if Envoy will terminate the connection or just the offending stream in the event of HTTP messaging error
It's recommended for L2 Envoy deployments to set this value to TerminateStream.
https://www.envoyproxy.io/docs/envoy/latest/configuration/best_practices/level_two
Default: TerminateConnection
loadBalancer object
LoadBalancer policy to apply when routing traffic from the gateway to
the backend endpoints. Defaults to `LeastRequest`.
backendUtilization object
BackendUtilization defines the configuration when the load balancer type is
set to BackendUtilization.
blackoutPeriod
string
A given endpoint must report load metrics continuously for at least this long before the endpoint weight will be used.
Default is 10s.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
errorUtilizationPenaltyPercent
integer
ErrorUtilizationPenaltyPercent adjusts endpoint weights based on the error rate (eps/qps).
This is expressed as a percentage-based integer where 100 represents 1.0, 150 represents 1.5, etc.
For example:
- 100 => 1.0x
- 120 => 1.2x
- 200 => 2.0x
Must be non-negative.
format:
int32minimum:
0
keepResponseHeaders
boolean
KeepResponseHeaders keeps the ORCA load report headers/trailers before sending the response to the client.
Defaults to false.
metricNamesForComputingUtilization
[]string
Metric names used to compute utilization if application_utilization is not set.
For map fields in ORCA proto, use the form "<map_field>.<key>", e.g., "named_metrics.foo".
weightExpirationPeriod
string
If a given endpoint has not reported load metrics in this long, stop using the reported weight. Defaults to 3m.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
weightUpdatePeriod
string
How often endpoint weights are recalculated. Values less than 100ms are capped at 100ms. Default 1s.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$consistentHash object
ConsistentHash defines the configuration when the load balancer type is
set to ConsistentHash
cookie object
Cookie configures the cookie hash policy when the consistent hash type is set to Cookie.
attributes
object
Additional Attributes to set for the generated cookie.
name
string required
Name of the cookie to hash.
If this cookie does not exist in the request, Envoy will generate a cookie and set
the TTL on the response back to the client based on Layer 4
attributes of the backend endpoint, to ensure that these future requests
go to the same backend endpoint. Make sure to set the TTL field for this case.
ttl
string
TTL of the generated cookie if the cookie is not present. This value sets the
Max-Age attribute value.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$header object
Header configures the header hash policy when the consistent hash type is set to Header.
Deprecated: use Headers instead
name
string required
Name of the header to hash.
headers []object
Headers configures the header hash policy for each header, when the consistent hash type is set to Headers.
name
string required
Name of the header to hash.
queryParams []object
QueryParams configures the query parameter hash policy when the consistent hash type is set to QueryParams.
name
string required
Name of the query param to hash.
tableSize
integer
The table size for consistent hashing, must be prime number limited to 5000011.
format:
int64minimum:
2maximum:
5.000011e+06
type
string required
ConsistentHashType defines the type of input to hash on. Valid Type values are
"SourceIP",
"Header",
"Headers",
"Cookie".
"QueryParams".
enum:
SourceIP, Header, Headers, Cookie, QueryParamsdynamicModule object
DynamicModule defines the configuration when the load balancer type is
set to DynamicModule. The referenced module must be registered in the
EnvoyProxy resource's dynamicModules allowlist.
config
object
Config is optional configuration for the module's load balancer
implementation. This is serialized and passed to the module's
initialization function.
lbPolicyName
string required
LBPolicyName identifies a specific load balancer implementation within
the dynamic module. A single shared library can contain multiple LB
policy implementations. This value is passed to the module's
initialization function to select the appropriate implementation.
minLength:
1maxLength:
253
name
string required
Name references a dynamic module registered in the EnvoyProxy resource's
dynamicModules list. The referenced module must exist in the registry;
otherwise, the policy will be rejected.
pattern:
^[a-z0-9]([a-z0-9.-]*[a-z0-9])?$minLength:
1maxLength:
253endpointOverride object
EndpointOverride defines the configuration for endpoint override.
When specified, the load balancer will attempt to route requests to endpoints
based on the override information extracted from request headers or metadata.
If the override endpoints are not available, the configured load balancer policy will be used as fallback.
extractFrom []object required
ExtractFrom defines the sources to extract endpoint override information from.
minItems:
1maxItems:
10
header
string
Header defines the header to get the override endpoint addresses.
The header value must specify at least one endpoint in `IP:Port` format or multiple endpoints in `IP:Port,IP:Port,...` format.
For example `10.0.0.5:8080` or `[2600:4040:5204::1574:24ae]:80`.
The IPv6 address is enclosed in square brackets.
slowStart object
SlowStart defines the configuration related to the slow start load balancer policy.
If set, during slow start window, traffic sent to the newly added hosts will gradually increase.
Supported for RoundRobin, LeastRequest, and BackendUtilization load balancers.
window
string required
Window defines the duration of the warm up period for newly added host.
During slow start window, traffic sent to the newly added hosts will gradually increase.
Currently only supports linear growth of traffic. For additional details,
see https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/cluster/v3/cluster.proto#config-cluster-v3-cluster-slowstartconfig
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
type
string required
Type decides the type of Load Balancer policy.
Valid LoadBalancerType values are
"ConsistentHash",
"LeastRequest",
"Random",
"RoundRobin",
"BackendUtilization",
"DynamicModule".
enum:
ConsistentHash, LeastRequest, Random, RoundRobin, BackendUtilization, DynamicModulezoneAware object
ZoneAware defines the configuration related to the distribution of requests between locality zones.
preferLocal object
PreferLocalZone configures zone-aware routing to prefer sending traffic to the local locality zone.
force object
ForceLocalZone defines override configuration for forcing all traffic to stay within the local zone instead of the default behavior
which maintains equal distribution among upstream endpoints while sending as much traffic as possible locally.
minEndpointsInZoneThreshold
integer
MinEndpointsInZoneThreshold is the minimum number of upstream endpoints in the local zone required to honor the forceLocalZone
override. This is useful for protecting zones with fewer endpoints.
format:
int32
minEndpointsThreshold
integer
MinEndpointsThreshold is the minimum number of total upstream endpoints across all zones required to enable zone-aware routing.
format:
int64
percentageEnabled
integer
Configures percentage of requests that will be considered for zone aware routing if zone aware routing is configured. If not specified, Envoy defaults to 100%.
format:
int32minimum:
0maximum:
100weightedZones []object
WeightedZones configures weight-based traffic distribution across locality zones.
Traffic is distributed proportionally based on the sum of all zone weights.
weight
integer required
Weight defines the weight for this locality.
Higher values receive more traffic. The actual traffic distribution
is proportional to this value relative to other localities.
format:
int32
zone
string required
Zone specifies the topology zone this weight applies to.
The value should match the topology.kubernetes.io/zone label
of the nodes where endpoints are running.
Zones not listed in the configuration receive a default weight of 1.
proxyProtocol object
ProxyProtocol enables the Proxy Protocol when communicating with the backend.
version
string required
Version of ProxyProtocol
Valid ProxyProtocolVersion values are
"V1"
"V2"
enum:
V1, V2retry object
Retry provides more advanced usage, allowing users to customize the number of retries, retry fallback strategy, and retry triggering conditions.
If not set, retry will be disabled.
numAttemptsPerPriority
integer
NumAttemptsPerPriority defines the number of requests (initial attempt + retries)
that should be sent to the same priority before switching to a different one.
If not specified or set to 0, all requests are sent to the highest priority that is healthy.
format:
int32
numRetries
integer
NumRetries is the number of retries to be attempted. Defaults to 2.
format:
int32minimum:
0perRetry object
PerRetry is the retry policy to be applied per retry attempt.
backOff object
Backoff is the backoff policy to be applied per retry attempt. gateway uses a fully jittered exponential
back-off algorithm for retries. For additional details,
see https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#config-http-filters-router-x-envoy-max-retries
baseInterval
string
BaseInterval is the base interval between retries.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
maxInterval
string
MaxInterval is the maximum interval between retries. This parameter is optional, but must be greater than or equal to the base_interval if set.
The default is 10 times the base_interval
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
timeout
string
Timeout is the timeout per retry attempt.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$retryOn object
RetryOn specifies the retry trigger condition.
If not specified, the default is to retry on connect-failure,refused-stream,unavailable,cancelled,retriable-status-codes(503).
httpStatusCodes
[]integer
HttpStatusCodes specifies the http status codes to be retried.
The retriable-status-codes trigger must also be configured for these status codes to trigger a retry.
triggers
[]string
Triggers specifies the retry trigger condition(Http/Grpc).
tcpKeepalive object
TcpKeepalive settings associated with the upstream client connection.
Disabled by default.
idleTime
string
The duration a connection needs to be idle before keep-alive
probes start being sent.
The duration format is
Defaults to `7200s`.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
interval
string
The duration between keep-alive probes.
Defaults to `75s`.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
probes
integer
The total number of unacknowledged probes to send before deciding
the connection is dead.
Defaults to 9.
format:
int32timeout object
Timeout settings for the backend connections.
http object
Timeout settings for HTTP.
connectionIdleTimeout
string
The idle timeout for an HTTP connection. Idle time is defined as a period in which there are no active requests in the connection.
Default: 1 hour.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
maxConnectionDuration
string
The maximum duration of an HTTP connection.
Default: unlimited.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
maxStreamDuration
string
MaxStreamDuration is the maximum duration for a stream to complete. This timeout measures the time
from when the request is sent until the response stream is fully consumed and does not apply to
non-streaming requests.
When set to "0s", no max duration is applied and streams can run indefinitely.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
requestTimeout
string
RequestTimeout is the time until which entire response is received from the upstream.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
streamIdleTimeout
string
The stream idle timeout defines the amount of time a stream can exist without any upstream or downstream activity.
If not specified, StreamIdleTimeout is inherited from the listener-level setting, which can be configured via ClientTrafficPolicy.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$tcp object
Timeout settings for TCP.
connectTimeout
string
The timeout for network connection establishment, including TCP and TLS handshakes.
Default: 10 seconds.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
endSessionEndpoint
string
The OIDC Provider's [end session endpoint](https://openid.net/specs/openid-connect-core-1_0.html#RPLogout).
If the end session endpoint is provided, EG will use it to log out the user from the OIDC Provider when the user accesses the logout path.
EG will also try to discover the end session endpoint from the provider's [Well-Known Configuration Endpoint](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse) when authorizationEndpoint or tokenEndpoint is not provided.
issuer
string required
The OIDC Provider's [issuer identifier](https://openid.net/specs/openid-connect-discovery-1_0.html#IssuerDiscovery).
Issuer MUST be a URI RFC 3986 [RFC3986] with a scheme component that MUST
be https, a host component, and optionally, port and path components and
no query or fragment components.
minLength:
1
tokenEndpoint
string
The OIDC Provider's [token endpoint](https://openid.net/specs/openid-connect-core-1_0.html#TokenEndpoint).
If not provided, EG will try to discover it from the provider's [Well-Known Configuration Endpoint](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse).
redirectURL
string
The redirect URL to be used in the OIDC
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
If not specified, uses the default redirect URI "%REQ(x-forwarded-proto)%://%REQ(:authority)%/oauth2/callback"
refreshToken
boolean
RefreshToken indicates whether the Envoy should automatically refresh the
id token and access token when they expire.
When set to true, the Envoy will use the refresh token to get a new id token
and access token when they expire.
If not specified, defaults to true.
resources
[]string
The OIDC resources to be used in the
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
scopes
[]string
The OIDC scopes to be used in the
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
The "openid" scope is always added to the list of scopes if not already
specified.
region
string required
Region specifies the AWS region associated with the policy.
minLength:
1azureAPIKey object
AzureAPIKey is a mechanism to access Azure OpenAI backend(s). The API key will be injected into the api-key header.
secretRef object required
SecretRef is the reference to the secret containing the Azure API key.
ai-gateway must be given the permission to read this secret.
The key of the secret should be "apiKey".
group
string
Group is the group of the referent. For example, "gateway.networking.k8s.io".
When unspecified or empty string, core API group is inferred.
pattern:
^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$maxLength:
253
kind
string
Kind is kind of the referent. For example "Secret".
pattern:
^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$minLength:
1maxLength:
63
name
string required
Name is the name of the referent.
minLength:
1maxLength:
253
namespace
string
Namespace is the namespace of the referenced object. When unspecified, the local
namespace is inferred.
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
Support: Core
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?$minLength:
1maxLength:
63azureCredentials object
AzureCredentials is a mechanism to access a backend(s). Azure OpenAI specific logic will be applied.
clientID
string required
ClientID is a unique identifier for an application in Azure.
minLength:
1clientSecretRef object
ClientSecretRef is the reference to the secret containing the Azure client secret.
ai-gateway must be given the permission to read this secret.
The key of secret should be "client-secret".
group
string
Group is the group of the referent. For example, "gateway.networking.k8s.io".
When unspecified or empty string, core API group is inferred.
pattern:
^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$maxLength:
253
kind
string
Kind is kind of the referent. For example "Secret".
pattern:
^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$minLength:
1maxLength:
63
name
string required
Name is the name of the referent.
minLength:
1maxLength:
253
namespace
string
Namespace is the namespace of the referenced object. When unspecified, the local
namespace is inferred.
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
Support: Core
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?$minLength:
1maxLength:
63oidcExchangeToken object
OIDCExchangeToken specifies the oidc configurations used to obtain an oidc token. The oidc token will be
used to obtain temporary credentials to access Azure.
aud
string
Aud defines the audience that this ID Token is intended for.
grantType
string
GrantType is the method application gets access token.
oidc object required
OIDC is used to obtain oidc tokens via an SSO server which will be used to exchange for provider credentials.
clientID
string
The client ID to be used in the OIDC
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
Only one of clientID or clientIDRef must be set.
minLength:
1clientIDRef object
The Kubernetes secret which contains the client ID to be used in the
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
Exactly one of clientID or clientIDRef must be set.
This is an Opaque secret. The client ID should be stored in the key "client-id".
Only one of clientID or clientIDRef must be set.
group
string
Group is the group of the referent. For example, "gateway.networking.k8s.io".
When unspecified or empty string, core API group is inferred.
pattern:
^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$maxLength:
253
kind
string
Kind is kind of the referent. For example "Secret".
pattern:
^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$minLength:
1maxLength:
63
name
string required
Name is the name of the referent.
minLength:
1maxLength:
253
namespace
string
Namespace is the namespace of the referenced object. When unspecified, the local
namespace is inferred.
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
Support: Core
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?$minLength:
1maxLength:
63clientSecret object required
The Kubernetes secret which contains the OIDC client secret to be used in the
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
This is an Opaque secret. The client secret should be stored in the key
"client-secret".
group
string
Group is the group of the referent. For example, "gateway.networking.k8s.io".
When unspecified or empty string, core API group is inferred.
pattern:
^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$maxLength:
253
kind
string
Kind is kind of the referent. For example "Secret".
pattern:
^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$minLength:
1maxLength:
63
name
string required
Name is the name of the referent.
minLength:
1maxLength:
253
namespace
string
Namespace is the namespace of the referenced object. When unspecified, the local
namespace is inferred.
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
Support: Core
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?$minLength:
1maxLength:
63cookieConfig object
CookieConfigs allows setting the SameSite attribute for OIDC cookies.
By default, its unset.
sameSite
string
enum:
Lax, Strict, None
cookieDomain
string
The optional domain to set the access and ID token cookies on.
If not set, the cookies will default to the host of the request, not including the subdomains.
If set, the cookies will be set on the specified domain and all subdomains.
This means that requests to any subdomain will not require reauthentication after users log in to the parent domain.
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9]))*$cookieNames object
The optional cookie name overrides to be used for Bearer and IdToken cookies in the
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
If not specified, uses a randomly generated suffix
accessToken
string
The name of the cookie used to store the AccessToken in the
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
If not specified, defaults to "AccessToken-(randomly generated uid)"
idToken
string
The name of the cookie used to store the IdToken in the
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
If not specified, defaults to "IdToken-(randomly generated uid)"
csrfTokenTTL
string
CSRFTokenTTL defines how long the CSRF token generated during the OAuth2 authorization flow remains valid.
This duration determines the lifetime of the CSRF cookie, which is validated against the CSRF token
in the "state" parameter when the provider redirects back to the callback endpoint.
If omitted, Envoy Gateway defaults the token expiration to 10 minutes.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
defaultRefreshTokenTTL
string
DefaultRefreshTokenTTL is the default lifetime of the refresh token.
This field is only used when the exp (expiration time) claim is omitted in
the refresh token or the refresh token is not JWT.
If not specified, defaults to 604800s (one week).
Note: this field is only applicable when the "refreshToken" field is set to true.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
defaultTokenTTL
string
DefaultTokenTTL is the default lifetime of the id token and access token.
Please note that Envoy will always use the expiry time from the response
of the authorization server if it is provided. This field is only used when
the expiry time is not provided by the authorization.
If not specified, defaults to 0. In this case, the "expires_in" field in
the authorization response must be set by the authorization server, or the
OAuth flow will fail.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$denyRedirect object
Any request that matches any of the provided matchers (with either tokens that are expired or missing tokens) will not be redirected to the OIDC Provider.
This behavior can be useful for AJAX or machine requests.
headers []object required
Defines the headers to match against the request to deny redirect to the OIDC Provider.
minItems:
1maxItems:
16
name
string required
Specifies the name of the header in the request.
minLength:
1
type
string
Type specifies how to match against a string.
enum:
Exact, Prefix, Suffix, RegularExpression
value
string required
Value specifies the string value that the match must have.
minLength:
1maxLength:
1024
disableTokenEncryption
boolean
Disable token encryption. When set to true, both the access token and the ID token will be stored in plain text.
This option should only be used in secure environments where token encryption is not required.
Default is false (tokens are encrypted).
forwardAccessToken
boolean
ForwardAccessToken indicates whether the Envoy should forward the access token
via the Authorization header Bearer scheme to the upstream.
If not specified, defaults to false.
forwardIDToken object
ForwardIDToken configures forwarding of the OIDC ID token to the upstream.
If the configured header is "Authorization", EG forwards the ID token using
the "Bearer " prefix. For any other header, EG forwards the raw token value.
If not specified, the ID token will not be forwarded.
header
string required
Header is the upstream request header that will carry the ID token.
minLength:
1
logoutPath
string
The path to log a user out, clearing their credential cookies.
If not specified, uses a default logout path "/logout"
passThroughAuthHeader
boolean
Skips OIDC authentication when the request contains a header that will be extracted by the JWT filter. Unless
explicitly stated otherwise in the extractFrom field, this will be the "Authorization: Bearer ..." header.
The passThroughAuthHeader option is typically used for non-browser clients that may not be able to handle OIDC
redirects and wish to directly supply a token instead.
If not specified, defaults to false.
provider object required
The OIDC Provider configuration.
authorizationEndpoint
string
The OIDC Provider's [authorization endpoint](https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint).
If not provided, EG will try to discover it from the provider's [Well-Known Configuration Endpoint](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse).
backendRef object
BackendRef references a Kubernetes object that represents the
backend server to which the authorization request will be sent.
Deprecated: Use BackendRefs instead.
group
string
Group is the group of the referent. For example, "gateway.networking.k8s.io".
When unspecified or empty string, core API group is inferred.
pattern:
^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$maxLength:
253
kind
string
Kind is the Kubernetes resource kind of the referent. For example
"Service".
Defaults to "Service" when not specified.
ExternalName services can refer to CNAME DNS records that may live
outside of the cluster and as such are difficult to reason about in
terms of conformance. They also may not be safe to forward to (see
CVE-2021-25740 for more information). Implementations SHOULD NOT
support ExternalName Services.
Support: Core (Services with a type other than ExternalName)
Support: Implementation-specific (Services with type ExternalName)
pattern:
^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$minLength:
1maxLength:
63
name
string required
Name is the name of the referent.
minLength:
1maxLength:
253
namespace
string
Namespace is the namespace of the backend. When unspecified, the local
namespace is inferred.
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
Support: Core
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?$minLength:
1maxLength:
63
port
integer
Port specifies the destination port number to use for this resource.
Port is required when the referent is a Kubernetes Service. In this
case, the port number is the service port number, not the target port.
For other resources, destination port might be derived from the referent
resource or this field.
format:
int32minimum:
1maximum:
65535backendRefs []object
BackendRefs references a Kubernetes object that represents the
backend server to which the authorization request will be sent.
maxItems:
16
fallback
boolean
Fallback indicates whether the backend is designated as a fallback.
Multiple fallback backends can be configured.
It is highly recommended to configure active or passive health checks to ensure that failover can be detected
when the active backends become unhealthy and to automatically readjust once the primary backends are healthy again.
The overprovisioning factor is set to 1.4, meaning the fallback backends will only start receiving traffic when
the health of the active backends falls below 72%.
group
string
Group is the group of the referent. For example, "gateway.networking.k8s.io".
When unspecified or empty string, core API group is inferred.
pattern:
^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$maxLength:
253
kind
string
Kind is the Kubernetes resource kind of the referent. For example
"Service".
Defaults to "Service" when not specified.
ExternalName services can refer to CNAME DNS records that may live
outside of the cluster and as such are difficult to reason about in
terms of conformance. They also may not be safe to forward to (see
CVE-2021-25740 for more information). Implementations SHOULD NOT
support ExternalName Services.
Support: Core (Services with a type other than ExternalName)
Support: Implementation-specific (Services with type ExternalName)
pattern:
^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$minLength:
1maxLength:
63
name
string required
Name is the name of the referent.
minLength:
1maxLength:
253
namespace
string
Namespace is the namespace of the backend. When unspecified, the local
namespace is inferred.
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
Support: Core
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?$minLength:
1maxLength:
63
port
integer
Port specifies the destination port number to use for this resource.
Port is required when the referent is a Kubernetes Service. In this
case, the port number is the service port number, not the target port.
For other resources, destination port might be derived from the referent
resource or this field.
format:
int32minimum:
1maximum:
65535
weight
integer
Weight specifies the proportion of requests forwarded to the referenced
backend. This is computed as weight/(sum of all weights in this
BackendRefs list). For non-zero values, there may be some epsilon from
the exact proportion defined here depending on the precision an
implementation supports. Weight is not a percentage and the sum of
weights does not need to equal 100.
If only one backend is specified and it has a weight greater than 0, 100%
of the traffic is forwarded to that backend. If weight is set to 0, no
traffic should be forwarded for this entry. If unspecified, weight
defaults to 1.
Support for this field varies based on the context where used.
format:
int32minimum:
0maximum:
1e+06backendSettings object
BackendSettings holds configuration for managing the connection
to the backend.
circuitBreaker object
Circuit Breaker settings for the upstream connections and requests.
If not set, circuit breakers will be enabled with the default thresholds
maxConnections
integer
The maximum number of connections that Envoy will establish to the referenced backend defined within a xRoute rule.
format:
int64minimum:
0maximum:
4.294967295e+09
maxParallelRequests
integer
The maximum number of parallel requests that Envoy will make to the referenced backend defined within a xRoute rule.
format:
int64minimum:
0maximum:
4.294967295e+09
maxParallelRetries
integer
The maximum number of parallel retries that Envoy will make to the referenced backend defined within a xRoute rule.
format:
int64minimum:
0maximum:
4.294967295e+09
maxPendingRequests
integer
The maximum number of pending requests that Envoy will queue to the referenced backend defined within a xRoute rule.
format:
int64minimum:
0maximum:
4.294967295e+09
maxRequestsPerConnection
integer
The maximum number of requests that Envoy will make over a single connection to the referenced backend defined within a xRoute rule.
Default: unlimited.
format:
int64minimum:
0maximum:
4.294967295e+09perEndpoint object
PerEndpoint defines Circuit Breakers that will apply per-endpoint for an upstream cluster
maxConnections
integer
MaxConnections configures the maximum number of connections that Envoy will establish per-endpoint to the referenced backend defined within a xRoute rule.
format:
int64minimum:
0maximum:
4.294967295e+09retryBudget object
RetryBudget provides settings for retry budget, which limits the number of retries in a given percentage.
RetryBudget take precedence over maxParallelRetries.
minRetryConcurrency
integer
MinRetryConcurrency specifies the minimum retry concurrency allowed for the retry budget.
For example, a budget of 20% with a minimum retry concurrency of 3
will allow 5 active retries while there are 25 active requests.
If there are 2 active requests, there are still 3 active retries
allowed because of the minimum retry concurrency.
Defaults to 3.
format:
int32percent object required
Percent specifies the limit on concurrent retries as a percentage [0, 100] of
the sum of active requests and active pending requests.
denominator
integer
format:
int32minimum:
1
numerator
integer required
format:
int32minimum:
0connection object
Connection includes backend connection settings.
bufferLimit
string | integer
BufferLimit Soft limit on size of the cluster’s connections read and write buffers.
BufferLimit applies to connection streaming (maybe non-streaming) channel between processes, it's in user space.
If unspecified, an implementation defined default is applied (32768 bytes).
For example, 20Mi, 1Gi, 256Ki etc.
Note: that when the suffix is not provided, the value is interpreted as bytes.
preconnect object
Preconnect configures proactive upstream connections to reduce latency by establishing
connections before they’re needed and avoiding connection establishment overhead.
If unset, Envoy will fetch connections as needed to serve in-flight requests.
perEndpointPercent
integer
PerEndpointPercent configures how many additional connections to maintain per
upstream endpoint, useful for high-QPS or latency sensitive services. Expressed as a
percentage of the connections required by active streams
(e.g. 100 = preconnect disabled, 105 = 1.05x connections per-endpoint, 200 = 2.00×).
Allowed value range is between 100-300. When both PerEndpointPercent and
PredictivePercent are set, Envoy ensures both are satisfied (max of the two).
format:
int32minimum:
100maximum:
300
predictivePercent
integer
PredictivePercent configures how many additional connections to maintain
across the cluster by anticipating which upstream endpoint the load balancer
will select next, useful for low-QPS services. Relies on deterministic
loadbalancing and is only supported with Random or RoundRobin.
Expressed as a percentage of the connections required by active streams
(e.g. 100 = 1.0 (no preconnect), 105 = 1.05× connections across the cluster, 200 = 2.00×).
Minimum allowed value is 100. When both PerEndpointPercent and PredictivePercent are
set Envoy ensures both are satisfied per host (max of the two).
format:
int32minimum:
100
socketBufferLimit
string | integer
SocketBufferLimit provides configuration for the maximum buffer size in bytes for each socket
to backend.
SocketBufferLimit applies to socket streaming channel between TCP/IP stacks, it's in kernel space.
For example, 20Mi, 1Gi, 256Ki etc.
Note that when the suffix is not provided, the value is interpreted as bytes.
dns object
DNS includes dns resolution settings.
dnsRefreshRate
string
DNSRefreshRate specifies the rate at which DNS records should be refreshed.
Defaults to 30 seconds.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
lookupFamily
string
LookupFamily determines how Envoy would resolve DNS for Routes where the backend is specified as a fully qualified domain name (FQDN).
If set, this configuration overrides other defaults.
enum:
IPv4, IPv6, IPv4Preferred, IPv6Preferred, IPv4AndIPv6
respectDnsTtl
boolean
RespectDNSTTL indicates whether the DNS Time-To-Live (TTL) should be respected.
If the value is set to true, the DNS refresh rate will be set to the resource record’s TTL.
Defaults to true.
healthCheck object
HealthCheck allows gateway to perform active health checking on backends.
active object
Active health check configuration
grpc object
GRPC defines the configuration of the GRPC health checker.
It's optional, and can only be used if the specified type is GRPC.
service
string
Service to send in the health check request.
If this is not specified, then the health check request applies to the entire
server and not to a specific service.
healthyThreshold
integer
HealthyThreshold defines the number of healthy health checks required before a backend host is marked healthy.
format:
int32minimum:
1http object
HTTP defines the configuration of http health checker.
It's required while the health checker type is HTTP.
expectedResponse object
ExpectedResponse defines a list of HTTP expected responses to match.
binary
string
Binary payload base64 encoded.
format:
byte
text
string
Text payload in plain text.
type
string required
Type defines the type of the payload.
expectedStatuses
[]integer
ExpectedStatuses defines a list of HTTP response statuses considered healthy.
Defaults to 200 only
hostname
string
Hostname defines the HTTP Host header used for active HTTP health checks.
Host selection uses this order: this field, the associated Backend endpoint
hostname if available, then the effective Route hostname.
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$minLength:
1maxLength:
253
method
string
Method defines the HTTP method used for health checking.
Defaults to GET
path
string required
Path defines the HTTP path that will be requested during health checking.
minLength:
1maxLength:
1024
retriableStatuses
[]integer
RetriableStatuses defines a list of HTTP response statuses considered retriable.
Responses matching these statuses count towards the unhealthy threshold but
do not result in the host being considered immediately unhealthy.
The expected statuses take precedence for any range overlaps with this field.
initialJitter
string
InitialJitter defines the maximum time Envoy will wait before the first health check.
Envoy will randomly select a value between 0 and the initial jitter value.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
interval
string
Interval defines the time between active health checks.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$overrides object
Overrides defines the configuration of the overriding health check settings for all endpoints
in the backend cluster. This allows customization of port and other settings that may differ
from the main service configuration.
port
integer
Port overrides the health check port.
If not set, the endpoint's serving port is used for health checks.
This is useful when health checks are served on a different port than
the main service port (e.g., port 443 for service, port 9090 for health checks).
format:
int32minimum:
1maximum:
65535tcp object
TCP defines the configuration of tcp health checker.
It's required while the health checker type is TCP.
receive object
Receive defines the expected response payload.
binary
string
Binary payload base64 encoded.
format:
byte
text
string
Text payload in plain text.
type
string required
Type defines the type of the payload.
send object
Send defines the request payload.
binary
string
Binary payload base64 encoded.
format:
byte
text
string
Text payload in plain text.
type
string required
Type defines the type of the payload.
timeout
string
Timeout defines the time to wait for a health check response.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
type
string required
Type defines the type of health checker.
unhealthyThreshold
integer
UnhealthyThreshold defines the number of unhealthy health checks required before a backend host is marked unhealthy.
Without RetriableStatuses configured, any health check failure results in the host being immediately
considered unhealthy. When RetriableStatuses is set, health checks returning those statuses are retried
up to this threshold before the host is marked unhealthy.
format:
int32minimum:
1
panicThreshold
integer
When number of unhealthy endpoints for a backend reaches this threshold
Envoy will disregard health status and balance across all endpoints.
It's designed to prevent a situation in which host failures cascade throughout the cluster
as load increases. If not set, the default value is 50%. To disable panic mode, set value to `0`.
format:
int32minimum:
0maximum:
100passive object
Passive passive check configuration
alwaysEjectOneEndpoint
boolean
AlwaysEjectOneEndpoint defines whether at least one host should be ejected,
regardless of MaxEjectionPercent.
baseEjectionTime
string
BaseEjectionTime defines the base duration for which a host will be ejected on consecutive failures.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
consecutive5XxErrors
integer
Consecutive5xxErrors sets the number of consecutive 5xx errors triggering ejection.
format:
int32
consecutiveGatewayErrors
integer
ConsecutiveGatewayErrors sets the number of consecutive gateway errors triggering ejection.
format:
int32
consecutiveLocalOriginFailures
integer
ConsecutiveLocalOriginFailures sets the number of consecutive local origin failures triggering ejection.
Parameter takes effect only when split_external_local_origin_errors is set to true.
format:
int32
failurePercentageThreshold
integer
FailurePercentageThreshold sets the failure percentage threshold for outlier detection.
If the failure percentage of a given host is greater than or equal to this value, it will be ejected.
Defaults to 85.
format:
int32minimum:
0maximum:
100
interval
string
Interval defines the time between passive health checks.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
maxEjectionPercent
integer
MaxEjectionPercent sets the maximum percentage of hosts in a cluster that can be ejected.
format:
int32minimum:
0maximum:
100
splitExternalLocalOriginErrors
boolean
SplitExternalLocalOriginErrors enables splitting of errors between external and local origin.
http2 object
HTTP2 provides HTTP/2 configuration for backend connections.
connectionKeepalive object
ConnectionKeepalive configures HTTP/2 connection keepalive using PING frames.
idleInterval
string
IdleInterval specifies how long a connection must be idle before a PING is sent.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
interval
string
Interval specifies how often to send HTTP/2 PING frames to keep the connection alive.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
intervalJitter
integer
IntervalJitter specifies a random jitter percentage added to each interval.
Defaults to 15% if not specified.
format:
int32minimum:
0maximum:
100
timeout
string
Timeout specifies how long to wait for a PING response before considering the connection dead.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
initialConnectionWindowSize
string | integer
InitialConnectionWindowSize sets the initial window size for HTTP/2 connections.
If not set, the default value is 1 MiB.
initialStreamWindowSize
string | integer
InitialStreamWindowSize sets the initial window size for HTTP/2 streams.
If not set, the default value is 64 KiB(64*1024).
maxConcurrentStreams
integer
MaxConcurrentStreams sets the maximum number of concurrent streams allowed per connection.
If not set, the default value is 100.
format:
int32minimum:
1maximum:
2.147483647e+09
onInvalidMessage
string
OnInvalidMessage determines if Envoy will terminate the connection or just the offending stream in the event of HTTP messaging error
It's recommended for L2 Envoy deployments to set this value to TerminateStream.
https://www.envoyproxy.io/docs/envoy/latest/configuration/best_practices/level_two
Default: TerminateConnection
loadBalancer object
LoadBalancer policy to apply when routing traffic from the gateway to
the backend endpoints. Defaults to `LeastRequest`.
backendUtilization object
BackendUtilization defines the configuration when the load balancer type is
set to BackendUtilization.
blackoutPeriod
string
A given endpoint must report load metrics continuously for at least this long before the endpoint weight will be used.
Default is 10s.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
errorUtilizationPenaltyPercent
integer
ErrorUtilizationPenaltyPercent adjusts endpoint weights based on the error rate (eps/qps).
This is expressed as a percentage-based integer where 100 represents 1.0, 150 represents 1.5, etc.
For example:
- 100 => 1.0x
- 120 => 1.2x
- 200 => 2.0x
Must be non-negative.
format:
int32minimum:
0
keepResponseHeaders
boolean
KeepResponseHeaders keeps the ORCA load report headers/trailers before sending the response to the client.
Defaults to false.
metricNamesForComputingUtilization
[]string
Metric names used to compute utilization if application_utilization is not set.
For map fields in ORCA proto, use the form "<map_field>.<key>", e.g., "named_metrics.foo".
weightExpirationPeriod
string
If a given endpoint has not reported load metrics in this long, stop using the reported weight. Defaults to 3m.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
weightUpdatePeriod
string
How often endpoint weights are recalculated. Values less than 100ms are capped at 100ms. Default 1s.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$consistentHash object
ConsistentHash defines the configuration when the load balancer type is
set to ConsistentHash
cookie object
Cookie configures the cookie hash policy when the consistent hash type is set to Cookie.
attributes
object
Additional Attributes to set for the generated cookie.
name
string required
Name of the cookie to hash.
If this cookie does not exist in the request, Envoy will generate a cookie and set
the TTL on the response back to the client based on Layer 4
attributes of the backend endpoint, to ensure that these future requests
go to the same backend endpoint. Make sure to set the TTL field for this case.
ttl
string
TTL of the generated cookie if the cookie is not present. This value sets the
Max-Age attribute value.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$header object
Header configures the header hash policy when the consistent hash type is set to Header.
Deprecated: use Headers instead
name
string required
Name of the header to hash.
headers []object
Headers configures the header hash policy for each header, when the consistent hash type is set to Headers.
name
string required
Name of the header to hash.
queryParams []object
QueryParams configures the query parameter hash policy when the consistent hash type is set to QueryParams.
name
string required
Name of the query param to hash.
tableSize
integer
The table size for consistent hashing, must be prime number limited to 5000011.
format:
int64minimum:
2maximum:
5.000011e+06
type
string required
ConsistentHashType defines the type of input to hash on. Valid Type values are
"SourceIP",
"Header",
"Headers",
"Cookie".
"QueryParams".
enum:
SourceIP, Header, Headers, Cookie, QueryParamsdynamicModule object
DynamicModule defines the configuration when the load balancer type is
set to DynamicModule. The referenced module must be registered in the
EnvoyProxy resource's dynamicModules allowlist.
config
object
Config is optional configuration for the module's load balancer
implementation. This is serialized and passed to the module's
initialization function.
lbPolicyName
string required
LBPolicyName identifies a specific load balancer implementation within
the dynamic module. A single shared library can contain multiple LB
policy implementations. This value is passed to the module's
initialization function to select the appropriate implementation.
minLength:
1maxLength:
253
name
string required
Name references a dynamic module registered in the EnvoyProxy resource's
dynamicModules list. The referenced module must exist in the registry;
otherwise, the policy will be rejected.
pattern:
^[a-z0-9]([a-z0-9.-]*[a-z0-9])?$minLength:
1maxLength:
253endpointOverride object
EndpointOverride defines the configuration for endpoint override.
When specified, the load balancer will attempt to route requests to endpoints
based on the override information extracted from request headers or metadata.
If the override endpoints are not available, the configured load balancer policy will be used as fallback.
extractFrom []object required
ExtractFrom defines the sources to extract endpoint override information from.
minItems:
1maxItems:
10
header
string
Header defines the header to get the override endpoint addresses.
The header value must specify at least one endpoint in `IP:Port` format or multiple endpoints in `IP:Port,IP:Port,...` format.
For example `10.0.0.5:8080` or `[2600:4040:5204::1574:24ae]:80`.
The IPv6 address is enclosed in square brackets.
slowStart object
SlowStart defines the configuration related to the slow start load balancer policy.
If set, during slow start window, traffic sent to the newly added hosts will gradually increase.
Supported for RoundRobin, LeastRequest, and BackendUtilization load balancers.
window
string required
Window defines the duration of the warm up period for newly added host.
During slow start window, traffic sent to the newly added hosts will gradually increase.
Currently only supports linear growth of traffic. For additional details,
see https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/cluster/v3/cluster.proto#config-cluster-v3-cluster-slowstartconfig
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
type
string required
Type decides the type of Load Balancer policy.
Valid LoadBalancerType values are
"ConsistentHash",
"LeastRequest",
"Random",
"RoundRobin",
"BackendUtilization",
"DynamicModule".
enum:
ConsistentHash, LeastRequest, Random, RoundRobin, BackendUtilization, DynamicModulezoneAware object
ZoneAware defines the configuration related to the distribution of requests between locality zones.
preferLocal object
PreferLocalZone configures zone-aware routing to prefer sending traffic to the local locality zone.
force object
ForceLocalZone defines override configuration for forcing all traffic to stay within the local zone instead of the default behavior
which maintains equal distribution among upstream endpoints while sending as much traffic as possible locally.
minEndpointsInZoneThreshold
integer
MinEndpointsInZoneThreshold is the minimum number of upstream endpoints in the local zone required to honor the forceLocalZone
override. This is useful for protecting zones with fewer endpoints.
format:
int32
minEndpointsThreshold
integer
MinEndpointsThreshold is the minimum number of total upstream endpoints across all zones required to enable zone-aware routing.
format:
int64
percentageEnabled
integer
Configures percentage of requests that will be considered for zone aware routing if zone aware routing is configured. If not specified, Envoy defaults to 100%.
format:
int32minimum:
0maximum:
100weightedZones []object
WeightedZones configures weight-based traffic distribution across locality zones.
Traffic is distributed proportionally based on the sum of all zone weights.
weight
integer required
Weight defines the weight for this locality.
Higher values receive more traffic. The actual traffic distribution
is proportional to this value relative to other localities.
format:
int32
zone
string required
Zone specifies the topology zone this weight applies to.
The value should match the topology.kubernetes.io/zone label
of the nodes where endpoints are running.
Zones not listed in the configuration receive a default weight of 1.
proxyProtocol object
ProxyProtocol enables the Proxy Protocol when communicating with the backend.
version
string required
Version of ProxyProtocol
Valid ProxyProtocolVersion values are
"V1"
"V2"
enum:
V1, V2retry object
Retry provides more advanced usage, allowing users to customize the number of retries, retry fallback strategy, and retry triggering conditions.
If not set, retry will be disabled.
numAttemptsPerPriority
integer
NumAttemptsPerPriority defines the number of requests (initial attempt + retries)
that should be sent to the same priority before switching to a different one.
If not specified or set to 0, all requests are sent to the highest priority that is healthy.
format:
int32
numRetries
integer
NumRetries is the number of retries to be attempted. Defaults to 2.
format:
int32minimum:
0perRetry object
PerRetry is the retry policy to be applied per retry attempt.
backOff object
Backoff is the backoff policy to be applied per retry attempt. gateway uses a fully jittered exponential
back-off algorithm for retries. For additional details,
see https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#config-http-filters-router-x-envoy-max-retries
baseInterval
string
BaseInterval is the base interval between retries.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
maxInterval
string
MaxInterval is the maximum interval between retries. This parameter is optional, but must be greater than or equal to the base_interval if set.
The default is 10 times the base_interval
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
timeout
string
Timeout is the timeout per retry attempt.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$retryOn object
RetryOn specifies the retry trigger condition.
If not specified, the default is to retry on connect-failure,refused-stream,unavailable,cancelled,retriable-status-codes(503).
httpStatusCodes
[]integer
HttpStatusCodes specifies the http status codes to be retried.
The retriable-status-codes trigger must also be configured for these status codes to trigger a retry.
triggers
[]string
Triggers specifies the retry trigger condition(Http/Grpc).
tcpKeepalive object
TcpKeepalive settings associated with the upstream client connection.
Disabled by default.
idleTime
string
The duration a connection needs to be idle before keep-alive
probes start being sent.
The duration format is
Defaults to `7200s`.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
interval
string
The duration between keep-alive probes.
Defaults to `75s`.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
probes
integer
The total number of unacknowledged probes to send before deciding
the connection is dead.
Defaults to 9.
format:
int32timeout object
Timeout settings for the backend connections.
http object
Timeout settings for HTTP.
connectionIdleTimeout
string
The idle timeout for an HTTP connection. Idle time is defined as a period in which there are no active requests in the connection.
Default: 1 hour.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
maxConnectionDuration
string
The maximum duration of an HTTP connection.
Default: unlimited.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
maxStreamDuration
string
MaxStreamDuration is the maximum duration for a stream to complete. This timeout measures the time
from when the request is sent until the response stream is fully consumed and does not apply to
non-streaming requests.
When set to "0s", no max duration is applied and streams can run indefinitely.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
requestTimeout
string
RequestTimeout is the time until which entire response is received from the upstream.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
streamIdleTimeout
string
The stream idle timeout defines the amount of time a stream can exist without any upstream or downstream activity.
If not specified, StreamIdleTimeout is inherited from the listener-level setting, which can be configured via ClientTrafficPolicy.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$tcp object
Timeout settings for TCP.
connectTimeout
string
The timeout for network connection establishment, including TCP and TLS handshakes.
Default: 10 seconds.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
endSessionEndpoint
string
The OIDC Provider's [end session endpoint](https://openid.net/specs/openid-connect-core-1_0.html#RPLogout).
If the end session endpoint is provided, EG will use it to log out the user from the OIDC Provider when the user accesses the logout path.
EG will also try to discover the end session endpoint from the provider's [Well-Known Configuration Endpoint](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse) when authorizationEndpoint or tokenEndpoint is not provided.
issuer
string required
The OIDC Provider's [issuer identifier](https://openid.net/specs/openid-connect-discovery-1_0.html#IssuerDiscovery).
Issuer MUST be a URI RFC 3986 [RFC3986] with a scheme component that MUST
be https, a host component, and optionally, port and path components and
no query or fragment components.
minLength:
1
tokenEndpoint
string
The OIDC Provider's [token endpoint](https://openid.net/specs/openid-connect-core-1_0.html#TokenEndpoint).
If not provided, EG will try to discover it from the provider's [Well-Known Configuration Endpoint](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse).
redirectURL
string
The redirect URL to be used in the OIDC
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
If not specified, uses the default redirect URI "%REQ(x-forwarded-proto)%://%REQ(:authority)%/oauth2/callback"
refreshToken
boolean
RefreshToken indicates whether the Envoy should automatically refresh the
id token and access token when they expire.
When set to true, the Envoy will use the refresh token to get a new id token
and access token when they expire.
If not specified, defaults to true.
resources
[]string
The OIDC resources to be used in the
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
scopes
[]string
The OIDC scopes to be used in the
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
The "openid" scope is always added to the list of scopes if not already
specified.
tenantID
string required
TenantId is a unique identifier for an Azure Active Directory instance.
minLength:
1gcpCredentials object
GCPCredentials is a mechanism to access a backend(s). GCP specific logic will be applied.
credentialsFile object
CredentialsFile specifies the service account credentials file to use for the GCP provider.
secretRef object required
SecretRef is the reference to the credential file.
The secret should contain the GCP service account credentials file keyed on "service_account.json".
group
string
Group is the group of the referent. For example, "gateway.networking.k8s.io".
When unspecified or empty string, core API group is inferred.
pattern:
^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$maxLength:
253
kind
string
Kind is kind of the referent. For example "Secret".
pattern:
^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$minLength:
1maxLength:
63
name
string required
Name is the name of the referent.
minLength:
1maxLength:
253
namespace
string
Namespace is the namespace of the referenced object. When unspecified, the local
namespace is inferred.
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
Support: Core
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?$minLength:
1maxLength:
63
projectName
string required
ProjectName is the GCP project name.
minLength:
1
region
string required
Region is the GCP region associated with the policy.
minLength:
1workloadIdentityFederationConfig object
WorkloadIdentityFederationConfig is the configuration for the GCP Workload Identity Federation.
oidcExchangeToken object required
OIDCExchangeToken specifies the oidc configurations used to obtain an oidc token. The oidc token will be
used to obtain temporary credentials to access GCP.
aud
string
Aud defines the audience that this ID Token is intended for.
grantType
string
GrantType is the method application gets access token.
oidc object required
OIDC is used to obtain oidc tokens via an SSO server which will be used to exchange for provider credentials.
clientID
string
The client ID to be used in the OIDC
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
Only one of clientID or clientIDRef must be set.
minLength:
1clientIDRef object
The Kubernetes secret which contains the client ID to be used in the
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
Exactly one of clientID or clientIDRef must be set.
This is an Opaque secret. The client ID should be stored in the key "client-id".
Only one of clientID or clientIDRef must be set.
group
string
Group is the group of the referent. For example, "gateway.networking.k8s.io".
When unspecified or empty string, core API group is inferred.
pattern:
^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$maxLength:
253
kind
string
Kind is kind of the referent. For example "Secret".
pattern:
^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$minLength:
1maxLength:
63
name
string required
Name is the name of the referent.
minLength:
1maxLength:
253
namespace
string
Namespace is the namespace of the referenced object. When unspecified, the local
namespace is inferred.
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
Support: Core
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?$minLength:
1maxLength:
63clientSecret object required
The Kubernetes secret which contains the OIDC client secret to be used in the
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
This is an Opaque secret. The client secret should be stored in the key
"client-secret".
group
string
Group is the group of the referent. For example, "gateway.networking.k8s.io".
When unspecified or empty string, core API group is inferred.
pattern:
^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$maxLength:
253
kind
string
Kind is kind of the referent. For example "Secret".
pattern:
^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$minLength:
1maxLength:
63
name
string required
Name is the name of the referent.
minLength:
1maxLength:
253
namespace
string
Namespace is the namespace of the referenced object. When unspecified, the local
namespace is inferred.
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
Support: Core
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?$minLength:
1maxLength:
63cookieConfig object
CookieConfigs allows setting the SameSite attribute for OIDC cookies.
By default, its unset.
sameSite
string
enum:
Lax, Strict, None
cookieDomain
string
The optional domain to set the access and ID token cookies on.
If not set, the cookies will default to the host of the request, not including the subdomains.
If set, the cookies will be set on the specified domain and all subdomains.
This means that requests to any subdomain will not require reauthentication after users log in to the parent domain.
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9]))*$cookieNames object
The optional cookie name overrides to be used for Bearer and IdToken cookies in the
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
If not specified, uses a randomly generated suffix
accessToken
string
The name of the cookie used to store the AccessToken in the
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
If not specified, defaults to "AccessToken-(randomly generated uid)"
idToken
string
The name of the cookie used to store the IdToken in the
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
If not specified, defaults to "IdToken-(randomly generated uid)"
csrfTokenTTL
string
CSRFTokenTTL defines how long the CSRF token generated during the OAuth2 authorization flow remains valid.
This duration determines the lifetime of the CSRF cookie, which is validated against the CSRF token
in the "state" parameter when the provider redirects back to the callback endpoint.
If omitted, Envoy Gateway defaults the token expiration to 10 minutes.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
defaultRefreshTokenTTL
string
DefaultRefreshTokenTTL is the default lifetime of the refresh token.
This field is only used when the exp (expiration time) claim is omitted in
the refresh token or the refresh token is not JWT.
If not specified, defaults to 604800s (one week).
Note: this field is only applicable when the "refreshToken" field is set to true.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
defaultTokenTTL
string
DefaultTokenTTL is the default lifetime of the id token and access token.
Please note that Envoy will always use the expiry time from the response
of the authorization server if it is provided. This field is only used when
the expiry time is not provided by the authorization.
If not specified, defaults to 0. In this case, the "expires_in" field in
the authorization response must be set by the authorization server, or the
OAuth flow will fail.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$denyRedirect object
Any request that matches any of the provided matchers (with either tokens that are expired or missing tokens) will not be redirected to the OIDC Provider.
This behavior can be useful for AJAX or machine requests.
headers []object required
Defines the headers to match against the request to deny redirect to the OIDC Provider.
minItems:
1maxItems:
16
name
string required
Specifies the name of the header in the request.
minLength:
1
type
string
Type specifies how to match against a string.
enum:
Exact, Prefix, Suffix, RegularExpression
value
string required
Value specifies the string value that the match must have.
minLength:
1maxLength:
1024
disableTokenEncryption
boolean
Disable token encryption. When set to true, both the access token and the ID token will be stored in plain text.
This option should only be used in secure environments where token encryption is not required.
Default is false (tokens are encrypted).
forwardAccessToken
boolean
ForwardAccessToken indicates whether the Envoy should forward the access token
via the Authorization header Bearer scheme to the upstream.
If not specified, defaults to false.
forwardIDToken object
ForwardIDToken configures forwarding of the OIDC ID token to the upstream.
If the configured header is "Authorization", EG forwards the ID token using
the "Bearer " prefix. For any other header, EG forwards the raw token value.
If not specified, the ID token will not be forwarded.
header
string required
Header is the upstream request header that will carry the ID token.
minLength:
1
logoutPath
string
The path to log a user out, clearing their credential cookies.
If not specified, uses a default logout path "/logout"
passThroughAuthHeader
boolean
Skips OIDC authentication when the request contains a header that will be extracted by the JWT filter. Unless
explicitly stated otherwise in the extractFrom field, this will be the "Authorization: Bearer ..." header.
The passThroughAuthHeader option is typically used for non-browser clients that may not be able to handle OIDC
redirects and wish to directly supply a token instead.
If not specified, defaults to false.
provider object required
The OIDC Provider configuration.
authorizationEndpoint
string
The OIDC Provider's [authorization endpoint](https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint).
If not provided, EG will try to discover it from the provider's [Well-Known Configuration Endpoint](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse).
backendRef object
BackendRef references a Kubernetes object that represents the
backend server to which the authorization request will be sent.
Deprecated: Use BackendRefs instead.
group
string
Group is the group of the referent. For example, "gateway.networking.k8s.io".
When unspecified or empty string, core API group is inferred.
pattern:
^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$maxLength:
253
kind
string
Kind is the Kubernetes resource kind of the referent. For example
"Service".
Defaults to "Service" when not specified.
ExternalName services can refer to CNAME DNS records that may live
outside of the cluster and as such are difficult to reason about in
terms of conformance. They also may not be safe to forward to (see
CVE-2021-25740 for more information). Implementations SHOULD NOT
support ExternalName Services.
Support: Core (Services with a type other than ExternalName)
Support: Implementation-specific (Services with type ExternalName)
pattern:
^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$minLength:
1maxLength:
63
name
string required
Name is the name of the referent.
minLength:
1maxLength:
253
namespace
string
Namespace is the namespace of the backend. When unspecified, the local
namespace is inferred.
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
Support: Core
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?$minLength:
1maxLength:
63
port
integer
Port specifies the destination port number to use for this resource.
Port is required when the referent is a Kubernetes Service. In this
case, the port number is the service port number, not the target port.
For other resources, destination port might be derived from the referent
resource or this field.
format:
int32minimum:
1maximum:
65535backendRefs []object
BackendRefs references a Kubernetes object that represents the
backend server to which the authorization request will be sent.
maxItems:
16
fallback
boolean
Fallback indicates whether the backend is designated as a fallback.
Multiple fallback backends can be configured.
It is highly recommended to configure active or passive health checks to ensure that failover can be detected
when the active backends become unhealthy and to automatically readjust once the primary backends are healthy again.
The overprovisioning factor is set to 1.4, meaning the fallback backends will only start receiving traffic when
the health of the active backends falls below 72%.
group
string
Group is the group of the referent. For example, "gateway.networking.k8s.io".
When unspecified or empty string, core API group is inferred.
pattern:
^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$maxLength:
253
kind
string
Kind is the Kubernetes resource kind of the referent. For example
"Service".
Defaults to "Service" when not specified.
ExternalName services can refer to CNAME DNS records that may live
outside of the cluster and as such are difficult to reason about in
terms of conformance. They also may not be safe to forward to (see
CVE-2021-25740 for more information). Implementations SHOULD NOT
support ExternalName Services.
Support: Core (Services with a type other than ExternalName)
Support: Implementation-specific (Services with type ExternalName)
pattern:
^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$minLength:
1maxLength:
63
name
string required
Name is the name of the referent.
minLength:
1maxLength:
253
namespace
string
Namespace is the namespace of the backend. When unspecified, the local
namespace is inferred.
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
Support: Core
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?$minLength:
1maxLength:
63
port
integer
Port specifies the destination port number to use for this resource.
Port is required when the referent is a Kubernetes Service. In this
case, the port number is the service port number, not the target port.
For other resources, destination port might be derived from the referent
resource or this field.
format:
int32minimum:
1maximum:
65535
weight
integer
Weight specifies the proportion of requests forwarded to the referenced
backend. This is computed as weight/(sum of all weights in this
BackendRefs list). For non-zero values, there may be some epsilon from
the exact proportion defined here depending on the precision an
implementation supports. Weight is not a percentage and the sum of
weights does not need to equal 100.
If only one backend is specified and it has a weight greater than 0, 100%
of the traffic is forwarded to that backend. If weight is set to 0, no
traffic should be forwarded for this entry. If unspecified, weight
defaults to 1.
Support for this field varies based on the context where used.
format:
int32minimum:
0maximum:
1e+06backendSettings object
BackendSettings holds configuration for managing the connection
to the backend.
circuitBreaker object
Circuit Breaker settings for the upstream connections and requests.
If not set, circuit breakers will be enabled with the default thresholds
maxConnections
integer
The maximum number of connections that Envoy will establish to the referenced backend defined within a xRoute rule.
format:
int64minimum:
0maximum:
4.294967295e+09
maxParallelRequests
integer
The maximum number of parallel requests that Envoy will make to the referenced backend defined within a xRoute rule.
format:
int64minimum:
0maximum:
4.294967295e+09
maxParallelRetries
integer
The maximum number of parallel retries that Envoy will make to the referenced backend defined within a xRoute rule.
format:
int64minimum:
0maximum:
4.294967295e+09
maxPendingRequests
integer
The maximum number of pending requests that Envoy will queue to the referenced backend defined within a xRoute rule.
format:
int64minimum:
0maximum:
4.294967295e+09
maxRequestsPerConnection
integer
The maximum number of requests that Envoy will make over a single connection to the referenced backend defined within a xRoute rule.
Default: unlimited.
format:
int64minimum:
0maximum:
4.294967295e+09perEndpoint object
PerEndpoint defines Circuit Breakers that will apply per-endpoint for an upstream cluster
maxConnections
integer
MaxConnections configures the maximum number of connections that Envoy will establish per-endpoint to the referenced backend defined within a xRoute rule.
format:
int64minimum:
0maximum:
4.294967295e+09retryBudget object
RetryBudget provides settings for retry budget, which limits the number of retries in a given percentage.
RetryBudget take precedence over maxParallelRetries.
minRetryConcurrency
integer
MinRetryConcurrency specifies the minimum retry concurrency allowed for the retry budget.
For example, a budget of 20% with a minimum retry concurrency of 3
will allow 5 active retries while there are 25 active requests.
If there are 2 active requests, there are still 3 active retries
allowed because of the minimum retry concurrency.
Defaults to 3.
format:
int32percent object required
Percent specifies the limit on concurrent retries as a percentage [0, 100] of
the sum of active requests and active pending requests.
denominator
integer
format:
int32minimum:
1
numerator
integer required
format:
int32minimum:
0connection object
Connection includes backend connection settings.
bufferLimit
string | integer
BufferLimit Soft limit on size of the cluster’s connections read and write buffers.
BufferLimit applies to connection streaming (maybe non-streaming) channel between processes, it's in user space.
If unspecified, an implementation defined default is applied (32768 bytes).
For example, 20Mi, 1Gi, 256Ki etc.
Note: that when the suffix is not provided, the value is interpreted as bytes.
preconnect object
Preconnect configures proactive upstream connections to reduce latency by establishing
connections before they’re needed and avoiding connection establishment overhead.
If unset, Envoy will fetch connections as needed to serve in-flight requests.
perEndpointPercent
integer
PerEndpointPercent configures how many additional connections to maintain per
upstream endpoint, useful for high-QPS or latency sensitive services. Expressed as a
percentage of the connections required by active streams
(e.g. 100 = preconnect disabled, 105 = 1.05x connections per-endpoint, 200 = 2.00×).
Allowed value range is between 100-300. When both PerEndpointPercent and
PredictivePercent are set, Envoy ensures both are satisfied (max of the two).
format:
int32minimum:
100maximum:
300
predictivePercent
integer
PredictivePercent configures how many additional connections to maintain
across the cluster by anticipating which upstream endpoint the load balancer
will select next, useful for low-QPS services. Relies on deterministic
loadbalancing and is only supported with Random or RoundRobin.
Expressed as a percentage of the connections required by active streams
(e.g. 100 = 1.0 (no preconnect), 105 = 1.05× connections across the cluster, 200 = 2.00×).
Minimum allowed value is 100. When both PerEndpointPercent and PredictivePercent are
set Envoy ensures both are satisfied per host (max of the two).
format:
int32minimum:
100
socketBufferLimit
string | integer
SocketBufferLimit provides configuration for the maximum buffer size in bytes for each socket
to backend.
SocketBufferLimit applies to socket streaming channel between TCP/IP stacks, it's in kernel space.
For example, 20Mi, 1Gi, 256Ki etc.
Note that when the suffix is not provided, the value is interpreted as bytes.
dns object
DNS includes dns resolution settings.
dnsRefreshRate
string
DNSRefreshRate specifies the rate at which DNS records should be refreshed.
Defaults to 30 seconds.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
lookupFamily
string
LookupFamily determines how Envoy would resolve DNS for Routes where the backend is specified as a fully qualified domain name (FQDN).
If set, this configuration overrides other defaults.
enum:
IPv4, IPv6, IPv4Preferred, IPv6Preferred, IPv4AndIPv6
respectDnsTtl
boolean
RespectDNSTTL indicates whether the DNS Time-To-Live (TTL) should be respected.
If the value is set to true, the DNS refresh rate will be set to the resource record’s TTL.
Defaults to true.
healthCheck object
HealthCheck allows gateway to perform active health checking on backends.
active object
Active health check configuration
grpc object
GRPC defines the configuration of the GRPC health checker.
It's optional, and can only be used if the specified type is GRPC.
service
string
Service to send in the health check request.
If this is not specified, then the health check request applies to the entire
server and not to a specific service.
healthyThreshold
integer
HealthyThreshold defines the number of healthy health checks required before a backend host is marked healthy.
format:
int32minimum:
1http object
HTTP defines the configuration of http health checker.
It's required while the health checker type is HTTP.
expectedResponse object
ExpectedResponse defines a list of HTTP expected responses to match.
binary
string
Binary payload base64 encoded.
format:
byte
text
string
Text payload in plain text.
type
string required
Type defines the type of the payload.
expectedStatuses
[]integer
ExpectedStatuses defines a list of HTTP response statuses considered healthy.
Defaults to 200 only
hostname
string
Hostname defines the HTTP Host header used for active HTTP health checks.
Host selection uses this order: this field, the associated Backend endpoint
hostname if available, then the effective Route hostname.
pattern:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$minLength:
1maxLength:
253
method
string
Method defines the HTTP method used for health checking.
Defaults to GET
path
string required
Path defines the HTTP path that will be requested during health checking.
minLength:
1maxLength:
1024
retriableStatuses
[]integer
RetriableStatuses defines a list of HTTP response statuses considered retriable.
Responses matching these statuses count towards the unhealthy threshold but
do not result in the host being considered immediately unhealthy.
The expected statuses take precedence for any range overlaps with this field.
initialJitter
string
InitialJitter defines the maximum time Envoy will wait before the first health check.
Envoy will randomly select a value between 0 and the initial jitter value.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
interval
string
Interval defines the time between active health checks.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$overrides object
Overrides defines the configuration of the overriding health check settings for all endpoints
in the backend cluster. This allows customization of port and other settings that may differ
from the main service configuration.
port
integer
Port overrides the health check port.
If not set, the endpoint's serving port is used for health checks.
This is useful when health checks are served on a different port than
the main service port (e.g., port 443 for service, port 9090 for health checks).
format:
int32minimum:
1maximum:
65535tcp object
TCP defines the configuration of tcp health checker.
It's required while the health checker type is TCP.
receive object
Receive defines the expected response payload.
binary
string
Binary payload base64 encoded.
format:
byte
text
string
Text payload in plain text.
type
string required
Type defines the type of the payload.
send object
Send defines the request payload.
binary
string
Binary payload base64 encoded.
format:
byte
text
string
Text payload in plain text.
type
string required
Type defines the type of the payload.
timeout
string
Timeout defines the time to wait for a health check response.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
type
string required
Type defines the type of health checker.
unhealthyThreshold
integer
UnhealthyThreshold defines the number of unhealthy health checks required before a backend host is marked unhealthy.
Without RetriableStatuses configured, any health check failure results in the host being immediately
considered unhealthy. When RetriableStatuses is set, health checks returning those statuses are retried
up to this threshold before the host is marked unhealthy.
format:
int32minimum:
1
panicThreshold
integer
When number of unhealthy endpoints for a backend reaches this threshold
Envoy will disregard health status and balance across all endpoints.
It's designed to prevent a situation in which host failures cascade throughout the cluster
as load increases. If not set, the default value is 50%. To disable panic mode, set value to `0`.
format:
int32minimum:
0maximum:
100passive object
Passive passive check configuration
alwaysEjectOneEndpoint
boolean
AlwaysEjectOneEndpoint defines whether at least one host should be ejected,
regardless of MaxEjectionPercent.
baseEjectionTime
string
BaseEjectionTime defines the base duration for which a host will be ejected on consecutive failures.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
consecutive5XxErrors
integer
Consecutive5xxErrors sets the number of consecutive 5xx errors triggering ejection.
format:
int32
consecutiveGatewayErrors
integer
ConsecutiveGatewayErrors sets the number of consecutive gateway errors triggering ejection.
format:
int32
consecutiveLocalOriginFailures
integer
ConsecutiveLocalOriginFailures sets the number of consecutive local origin failures triggering ejection.
Parameter takes effect only when split_external_local_origin_errors is set to true.
format:
int32
failurePercentageThreshold
integer
FailurePercentageThreshold sets the failure percentage threshold for outlier detection.
If the failure percentage of a given host is greater than or equal to this value, it will be ejected.
Defaults to 85.
format:
int32minimum:
0maximum:
100
interval
string
Interval defines the time between passive health checks.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
maxEjectionPercent
integer
MaxEjectionPercent sets the maximum percentage of hosts in a cluster that can be ejected.
format:
int32minimum:
0maximum:
100
splitExternalLocalOriginErrors
boolean
SplitExternalLocalOriginErrors enables splitting of errors between external and local origin.
http2 object
HTTP2 provides HTTP/2 configuration for backend connections.
connectionKeepalive object
ConnectionKeepalive configures HTTP/2 connection keepalive using PING frames.
idleInterval
string
IdleInterval specifies how long a connection must be idle before a PING is sent.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
interval
string
Interval specifies how often to send HTTP/2 PING frames to keep the connection alive.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
intervalJitter
integer
IntervalJitter specifies a random jitter percentage added to each interval.
Defaults to 15% if not specified.
format:
int32minimum:
0maximum:
100
timeout
string
Timeout specifies how long to wait for a PING response before considering the connection dead.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
initialConnectionWindowSize
string | integer
InitialConnectionWindowSize sets the initial window size for HTTP/2 connections.
If not set, the default value is 1 MiB.
initialStreamWindowSize
string | integer
InitialStreamWindowSize sets the initial window size for HTTP/2 streams.
If not set, the default value is 64 KiB(64*1024).
maxConcurrentStreams
integer
MaxConcurrentStreams sets the maximum number of concurrent streams allowed per connection.
If not set, the default value is 100.
format:
int32minimum:
1maximum:
2.147483647e+09
onInvalidMessage
string
OnInvalidMessage determines if Envoy will terminate the connection or just the offending stream in the event of HTTP messaging error
It's recommended for L2 Envoy deployments to set this value to TerminateStream.
https://www.envoyproxy.io/docs/envoy/latest/configuration/best_practices/level_two
Default: TerminateConnection
loadBalancer object
LoadBalancer policy to apply when routing traffic from the gateway to
the backend endpoints. Defaults to `LeastRequest`.
backendUtilization object
BackendUtilization defines the configuration when the load balancer type is
set to BackendUtilization.
blackoutPeriod
string
A given endpoint must report load metrics continuously for at least this long before the endpoint weight will be used.
Default is 10s.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
errorUtilizationPenaltyPercent
integer
ErrorUtilizationPenaltyPercent adjusts endpoint weights based on the error rate (eps/qps).
This is expressed as a percentage-based integer where 100 represents 1.0, 150 represents 1.5, etc.
For example:
- 100 => 1.0x
- 120 => 1.2x
- 200 => 2.0x
Must be non-negative.
format:
int32minimum:
0
keepResponseHeaders
boolean
KeepResponseHeaders keeps the ORCA load report headers/trailers before sending the response to the client.
Defaults to false.
metricNamesForComputingUtilization
[]string
Metric names used to compute utilization if application_utilization is not set.
For map fields in ORCA proto, use the form "<map_field>.<key>", e.g., "named_metrics.foo".
weightExpirationPeriod
string
If a given endpoint has not reported load metrics in this long, stop using the reported weight. Defaults to 3m.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
weightUpdatePeriod
string
How often endpoint weights are recalculated. Values less than 100ms are capped at 100ms. Default 1s.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$consistentHash object
ConsistentHash defines the configuration when the load balancer type is
set to ConsistentHash
cookie object
Cookie configures the cookie hash policy when the consistent hash type is set to Cookie.
attributes
object
Additional Attributes to set for the generated cookie.
name
string required
Name of the cookie to hash.
If this cookie does not exist in the request, Envoy will generate a cookie and set
the TTL on the response back to the client based on Layer 4
attributes of the backend endpoint, to ensure that these future requests
go to the same backend endpoint. Make sure to set the TTL field for this case.
ttl
string
TTL of the generated cookie if the cookie is not present. This value sets the
Max-Age attribute value.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$header object
Header configures the header hash policy when the consistent hash type is set to Header.
Deprecated: use Headers instead
name
string required
Name of the header to hash.
headers []object
Headers configures the header hash policy for each header, when the consistent hash type is set to Headers.
name
string required
Name of the header to hash.
queryParams []object
QueryParams configures the query parameter hash policy when the consistent hash type is set to QueryParams.
name
string required
Name of the query param to hash.
tableSize
integer
The table size for consistent hashing, must be prime number limited to 5000011.
format:
int64minimum:
2maximum:
5.000011e+06
type
string required
ConsistentHashType defines the type of input to hash on. Valid Type values are
"SourceIP",
"Header",
"Headers",
"Cookie".
"QueryParams".
enum:
SourceIP, Header, Headers, Cookie, QueryParamsdynamicModule object
DynamicModule defines the configuration when the load balancer type is
set to DynamicModule. The referenced module must be registered in the
EnvoyProxy resource's dynamicModules allowlist.
config
object
Config is optional configuration for the module's load balancer
implementation. This is serialized and passed to the module's
initialization function.
lbPolicyName
string required
LBPolicyName identifies a specific load balancer implementation within
the dynamic module. A single shared library can contain multiple LB
policy implementations. This value is passed to the module's
initialization function to select the appropriate implementation.
minLength:
1maxLength:
253
name
string required
Name references a dynamic module registered in the EnvoyProxy resource's
dynamicModules list. The referenced module must exist in the registry;
otherwise, the policy will be rejected.
pattern:
^[a-z0-9]([a-z0-9.-]*[a-z0-9])?$minLength:
1maxLength:
253endpointOverride object
EndpointOverride defines the configuration for endpoint override.
When specified, the load balancer will attempt to route requests to endpoints
based on the override information extracted from request headers or metadata.
If the override endpoints are not available, the configured load balancer policy will be used as fallback.
extractFrom []object required
ExtractFrom defines the sources to extract endpoint override information from.
minItems:
1maxItems:
10
header
string
Header defines the header to get the override endpoint addresses.
The header value must specify at least one endpoint in `IP:Port` format or multiple endpoints in `IP:Port,IP:Port,...` format.
For example `10.0.0.5:8080` or `[2600:4040:5204::1574:24ae]:80`.
The IPv6 address is enclosed in square brackets.
slowStart object
SlowStart defines the configuration related to the slow start load balancer policy.
If set, during slow start window, traffic sent to the newly added hosts will gradually increase.
Supported for RoundRobin, LeastRequest, and BackendUtilization load balancers.
window
string required
Window defines the duration of the warm up period for newly added host.
During slow start window, traffic sent to the newly added hosts will gradually increase.
Currently only supports linear growth of traffic. For additional details,
see https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/cluster/v3/cluster.proto#config-cluster-v3-cluster-slowstartconfig
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
type
string required
Type decides the type of Load Balancer policy.
Valid LoadBalancerType values are
"ConsistentHash",
"LeastRequest",
"Random",
"RoundRobin",
"BackendUtilization",
"DynamicModule".
enum:
ConsistentHash, LeastRequest, Random, RoundRobin, BackendUtilization, DynamicModulezoneAware object
ZoneAware defines the configuration related to the distribution of requests between locality zones.
preferLocal object
PreferLocalZone configures zone-aware routing to prefer sending traffic to the local locality zone.
force object
ForceLocalZone defines override configuration for forcing all traffic to stay within the local zone instead of the default behavior
which maintains equal distribution among upstream endpoints while sending as much traffic as possible locally.
minEndpointsInZoneThreshold
integer
MinEndpointsInZoneThreshold is the minimum number of upstream endpoints in the local zone required to honor the forceLocalZone
override. This is useful for protecting zones with fewer endpoints.
format:
int32
minEndpointsThreshold
integer
MinEndpointsThreshold is the minimum number of total upstream endpoints across all zones required to enable zone-aware routing.
format:
int64
percentageEnabled
integer
Configures percentage of requests that will be considered for zone aware routing if zone aware routing is configured. If not specified, Envoy defaults to 100%.
format:
int32minimum:
0maximum:
100weightedZones []object
WeightedZones configures weight-based traffic distribution across locality zones.
Traffic is distributed proportionally based on the sum of all zone weights.
weight
integer required
Weight defines the weight for this locality.
Higher values receive more traffic. The actual traffic distribution
is proportional to this value relative to other localities.
format:
int32
zone
string required
Zone specifies the topology zone this weight applies to.
The value should match the topology.kubernetes.io/zone label
of the nodes where endpoints are running.
Zones not listed in the configuration receive a default weight of 1.
proxyProtocol object
ProxyProtocol enables the Proxy Protocol when communicating with the backend.
version
string required
Version of ProxyProtocol
Valid ProxyProtocolVersion values are
"V1"
"V2"
enum:
V1, V2retry object
Retry provides more advanced usage, allowing users to customize the number of retries, retry fallback strategy, and retry triggering conditions.
If not set, retry will be disabled.
numAttemptsPerPriority
integer
NumAttemptsPerPriority defines the number of requests (initial attempt + retries)
that should be sent to the same priority before switching to a different one.
If not specified or set to 0, all requests are sent to the highest priority that is healthy.
format:
int32
numRetries
integer
NumRetries is the number of retries to be attempted. Defaults to 2.
format:
int32minimum:
0perRetry object
PerRetry is the retry policy to be applied per retry attempt.
backOff object
Backoff is the backoff policy to be applied per retry attempt. gateway uses a fully jittered exponential
back-off algorithm for retries. For additional details,
see https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/router_filter#config-http-filters-router-x-envoy-max-retries
baseInterval
string
BaseInterval is the base interval between retries.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
maxInterval
string
MaxInterval is the maximum interval between retries. This parameter is optional, but must be greater than or equal to the base_interval if set.
The default is 10 times the base_interval
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
timeout
string
Timeout is the timeout per retry attempt.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$retryOn object
RetryOn specifies the retry trigger condition.
If not specified, the default is to retry on connect-failure,refused-stream,unavailable,cancelled,retriable-status-codes(503).
httpStatusCodes
[]integer
HttpStatusCodes specifies the http status codes to be retried.
The retriable-status-codes trigger must also be configured for these status codes to trigger a retry.
triggers
[]string
Triggers specifies the retry trigger condition(Http/Grpc).
tcpKeepalive object
TcpKeepalive settings associated with the upstream client connection.
Disabled by default.
idleTime
string
The duration a connection needs to be idle before keep-alive
probes start being sent.
The duration format is
Defaults to `7200s`.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
interval
string
The duration between keep-alive probes.
Defaults to `75s`.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
probes
integer
The total number of unacknowledged probes to send before deciding
the connection is dead.
Defaults to 9.
format:
int32timeout object
Timeout settings for the backend connections.
http object
Timeout settings for HTTP.
connectionIdleTimeout
string
The idle timeout for an HTTP connection. Idle time is defined as a period in which there are no active requests in the connection.
Default: 1 hour.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
maxConnectionDuration
string
The maximum duration of an HTTP connection.
Default: unlimited.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
maxStreamDuration
string
MaxStreamDuration is the maximum duration for a stream to complete. This timeout measures the time
from when the request is sent until the response stream is fully consumed and does not apply to
non-streaming requests.
When set to "0s", no max duration is applied and streams can run indefinitely.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
requestTimeout
string
RequestTimeout is the time until which entire response is received from the upstream.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
streamIdleTimeout
string
The stream idle timeout defines the amount of time a stream can exist without any upstream or downstream activity.
If not specified, StreamIdleTimeout is inherited from the listener-level setting, which can be configured via ClientTrafficPolicy.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$tcp object
Timeout settings for TCP.
connectTimeout
string
The timeout for network connection establishment, including TCP and TLS handshakes.
Default: 10 seconds.
pattern:
^([0-9]{1,5}(h|m|s|ms)){1,4}$
endSessionEndpoint
string
The OIDC Provider's [end session endpoint](https://openid.net/specs/openid-connect-core-1_0.html#RPLogout).
If the end session endpoint is provided, EG will use it to log out the user from the OIDC Provider when the user accesses the logout path.
EG will also try to discover the end session endpoint from the provider's [Well-Known Configuration Endpoint](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse) when authorizationEndpoint or tokenEndpoint is not provided.
issuer
string required
The OIDC Provider's [issuer identifier](https://openid.net/specs/openid-connect-discovery-1_0.html#IssuerDiscovery).
Issuer MUST be a URI RFC 3986 [RFC3986] with a scheme component that MUST
be https, a host component, and optionally, port and path components and
no query or fragment components.
minLength:
1
tokenEndpoint
string
The OIDC Provider's [token endpoint](https://openid.net/specs/openid-connect-core-1_0.html#TokenEndpoint).
If not provided, EG will try to discover it from the provider's [Well-Known Configuration Endpoint](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse).
redirectURL
string
The redirect URL to be used in the OIDC
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
If not specified, uses the default redirect URI "%REQ(x-forwarded-proto)%://%REQ(:authority)%/oauth2/callback"
refreshToken
boolean
RefreshToken indicates whether the Envoy should automatically refresh the
id token and access token when they expire.
When set to true, the Envoy will use the refresh token to get a new id token
and access token when they expire.
If not specified, defaults to true.
resources
[]string
The OIDC resources to be used in the
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
scopes
[]string
The OIDC scopes to be used in the
[Authentication Request](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest).
The "openid" scope is always added to the list of scopes if not already
specified.
projectID
string required
ProjectID is the GCP project ID.
minLength:
1serviceAccountImpersonation object
ServiceAccountImpersonation is the service account impersonation configuration.
This is used to impersonate a service account when getting access token.
serviceAccountName
string required
ServiceAccountName is the name of the service account to impersonate.
minLength:
1
workloadIdentityPoolName
string required
WorkloadIdentityPoolName is the name of the workload identity pool defined in GCP.
https://cloud.google.com/iam/docs/workload-identity-federation?hl=en
minLength:
1
workloadIdentityProviderName
string required
WorkloadIdentityProviderName is the name of the external identity provider as registered on Google Cloud Platform.
minLength:
1targetRefs []object
TargetRefs are the names of the AIServiceBackend or InferencePool resources this BackendSecurityPolicy is being attached to.
Attaching multiple BackendSecurityPolicies to the same resource is invalid and will result in an error
during the reconciliation of the resource.
maxItems:
16
group
string required
Group is the group of the target resource.
pattern:
^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$maxLength:
253
kind
string required
Kind is kind of the target resource.
pattern:
^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$minLength:
1maxLength:
63
name
string required
Name is the name of the target resource.
minLength:
1maxLength:
253
type
string required
Type specifies the type of the backend security policy.
enum:
APIKey, AWSCredentials, AzureAPIKey, AzureCredentials, GCPCredentials, AnthropicAPIKeystatus object
Status defines the status details of the BackendSecurityPolicy.
conditions []object
Conditions is the list of conditions by the reconciliation result.
Currently, at most one condition is set.
Known .status.conditions.type are: "Accepted", "NotAccepted".
lastTransitionTime
string required
lastTransitionTime is the last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
format:
date-time
message
string required
message is a human readable message indicating details about the transition.
This may be an empty string.
maxLength:
32768
observedGeneration
integer
observedGeneration represents the .metadata.generation that the condition was set based upon.
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
with respect to the current state of the instance.
format:
int64minimum:
0
reason
string required
reason contains a programmatic identifier indicating the reason for the condition's last transition.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
The value should be a CamelCase string.
This field may not be empty.
pattern:
^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$minLength:
1maxLength:
1024
status
string required
status of the condition, one of True, False, Unknown.
enum:
True, False, Unknown
type
string required
type of condition in CamelCase or in foo.example.com/CamelCase.
pattern:
^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$maxLength:
316No matches. Try .spec.anthropicAPIKey for an exact path