RouteOptions
Package: gloo.solo.io
Types:
Source File: github.com/solo-io/gloo/projects/gloo/api/v1/route_options.proto
RouteOptions
Optional, feature-specific configuration that lives on routes. Each RouteOptions object contains configuration for a specific feature. Note to developers: new Route plugins must be added to this struct to be usable by K8sGateway.
"transformations": .transformation.options.gloo.solo.io.Transformations
"faults": .fault.options.gloo.solo.io.RouteFaults
"prefixRewrite": .google.protobuf.StringValue
"timeout": .google.protobuf.Duration
"retries": .retries.options.gloo.solo.io.RetryPolicy
"extensions": .gloo.solo.io.Extensions
"tracing": .tracing.options.gloo.solo.io.RouteTracingSettings
"shadowing": .shadowing.options.gloo.solo.io.RouteShadowing
"headerManipulation": .headers.options.gloo.solo.io.HeaderManipulation
"hostRewrite": string
"autoHostRewrite": .google.protobuf.BoolValue
"hostRewritePathRegex": .solo.io.envoy.type.matcher.v3.RegexMatchAndSubstitute
"hostRewriteHeader": .google.protobuf.StringValue
"appendXForwardedHost": .google.protobuf.BoolValue
"cors": .cors.options.gloo.solo.io.CorsPolicy
"lbHash": .lbhash.options.gloo.solo.io.RouteActionHashConfig
"upgrades": []protocol_upgrade.options.gloo.solo.io.ProtocolUpgradeConfig
"bufferPerRoute": .solo.io.envoy.extensions.filters.http.buffer.v3.BufferPerRoute
"csrf": .solo.io.envoy.extensions.filters.http.csrf.v3.CsrfPolicy
"stagedTransformations": .transformation.options.gloo.solo.io.TransformationStages
"envoyMetadata": map<string, .google.protobuf.Struct>
"regexRewrite": .solo.io.envoy.type.matcher.v3.RegexMatchAndSubstitute
"maxStreamDuration": .gloo.solo.io.RouteOptions.MaxStreamDuration
"idleTimeout": .google.protobuf.Duration
Field | Type | Description |
---|---|---|
transformations |
.transformation.options.gloo.solo.io.Transformations | Transformations to apply. Note: this field is superseded by staged_transformations . If staged_transformations.regular is set, this field will be ignored. |
faults |
.fault.options.gloo.solo.io.RouteFaults | |
prefixRewrite |
.google.protobuf.StringValue | For requests matched on this route, rewrite the HTTP request path to the provided value before forwarding upstream. |
timeout |
.google.protobuf.Duration | Specifies the upstream timeout for the route. If not specified, the default is 15s. This spans between the point at which the entire downstream request (i.e. end-of-stream) has been processed and when the upstream response has been completely processed. A value of 0 will disable the route’s timeout. |
retries |
.retries.options.gloo.solo.io.RetryPolicy | |
extensions |
.gloo.solo.io.Extensions | Extensions will be passed along from Listeners, Gateways, VirtualServices, Routes, and Route tables to the underlying Proxy, making them useful for controllers, validation tools, etc. which interact with kubernetes yaml. Some sample use cases: * controllers, deployment pipelines, helm charts, etc. which wish to use extensions as a kind of opaque metadata. |
tracing |
.tracing.options.gloo.solo.io.RouteTracingSettings | Defines route-specific tracing configuration. See here for additional information on Envoy’s tracing capabilities: https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/observability/tracing.html |
shadowing |
.shadowing.options.gloo.solo.io.RouteShadowing | Specifies traffic shadowing configuration for the route. See here for additional information on Envoy’s shadowing capabilities: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route.proto#envoy-api-msg-route-routeaction-requestmirrorpolicy. |
headerManipulation |
.headers.options.gloo.solo.io.HeaderManipulation | Append/Remove headers on Requests or Responses on this Route. |
hostRewrite |
string |
Indicates that during forwarding, the host header will be swapped with this value. Only one of hostRewrite , autoHostRewrite , hostRewritePathRegex , or hostRewriteHeader can be set. |
autoHostRewrite |
.google.protobuf.BoolValue | Enable/Disable auto host re-write. Indicates that the host header will be swapped with the hostname of the upstream host. This setting is only honored for upstreams that use DNS resolution (i.e., their generated Envoy cluster is of type STRICT_DNS or LOGICAL_DNS – think aws, azure, or static upstreams with hostnames). Only one of autoHostRewrite , hostRewrite , hostRewritePathRegex , or hostRewriteHeader can be set. |
hostRewritePathRegex |
.solo.io.envoy.type.matcher.v3.RegexMatchAndSubstitute | Indicates that during forwarding, the host header will be swapped with the result of the regex substitution executed on path value with query and fragment removed. Only one of hostRewritePathRegex , hostRewrite , autoHostRewrite , or hostRewriteHeader can be set. |
hostRewriteHeader |
.google.protobuf.StringValue | Indicates that during forwarding, the host header will be swapped with the content of given downstream or custom header. If header value is empty, host header is left intact. Using this option will append the x-forwarded-host header if append_x_forwarded_host is set. Only one of hostRewriteHeader , hostRewrite , autoHostRewrite , or hostRewritePathRegex can be set. |
appendXForwardedHost |
.google.protobuf.BoolValue | If true and there is a host rewrite, appends the x-forwarded-host header to requests. |
cors |
.cors.options.gloo.solo.io.CorsPolicy | Defines a CORS policy for the route. If a CORS policy is defined on both the route and the virtual host, the merge behavior for these policies is determined by the CorsPolicyMergeSettings defined on the VirtualHost. |
lbHash |
.lbhash.options.gloo.solo.io.RouteActionHashConfig | For routes served by a hashing load balancer, this defines the input to the hash key that configures Envoy with the first available RouteActionHashConfig among the following ordered list of providers: - route, upstream, virtual service. |
upgrades |
[]protocol_upgrade.options.gloo.solo.io.ProtocolUpgradeConfig | Route configuration for protocol upgrade requests. |
bufferPerRoute |
.solo.io.envoy.extensions.filters.http.buffer.v3.BufferPerRoute | BufferPerRoute can be used to set the maximum request size that the filter will buffer before the connection manager will stop buffering and return a 413 response. Note: If you have not set a global config (at the gateway level), this override will not do anything by itself. |
csrf |
.solo.io.envoy.extensions.filters.http.csrf.v3.CsrfPolicy | Csrf can be used to set percent of requests for which the CSRF filter is enabled, enable shadow-only mode where policies will be evaluated and tracked, but not enforced and add additional source origins that will be allowed in addition to the destination origin. For more, see https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/http/csrf/v3/csrf.proto#envoy-v3-api-msg-extensions-filters-http-csrf-v3-csrfpolicy. |
stagedTransformations |
.transformation.options.gloo.solo.io.TransformationStages | Early transformations stage. These transformations run before most other options are processed. If the regular field is set in here, the transformations field is ignored. |
envoyMetadata |
map<string, .google.protobuf.Struct> |
This field can be used to provide additional information about the route. This metadata can be consumed by the Envoy filters that process requests that match the route. For more info about metadata, see here. The value of this field will be propagated to the metadata attribute of the corresponding Envoy route. Please refer to the Envoy documentation for more details about the metadata attribute. |
regexRewrite |
.solo.io.envoy.type.matcher.v3.RegexMatchAndSubstitute | For requests matched on this route, rewrite the HTTP request path according to the provided regex pattern before forwarding upstream Please refer to the Envoy documentation for more details about the regex_rewrite attribute. |
maxStreamDuration |
.gloo.solo.io.RouteOptions.MaxStreamDuration | Settings for maximum durations and timeouts for streams on the route. Please refer to the Envoy documentation. |
idleTimeout |
.google.protobuf.Duration | Specifies the idle timeout for the route. If not specified, there is no per-route idle timeout, although the Gateway’s stream_idle_timeout will still apply. A value of 0 will completely disable the route’s idle timeout, even if a connection manager stream idle timeout is configured. Please refer to the Envoy documentation. |
MaxStreamDuration
This is a 1:1 translation to the Envoy API described here
"maxStreamDuration": .google.protobuf.Duration
"grpcTimeoutHeaderMax": .google.protobuf.Duration
"grpcTimeoutHeaderOffset": .google.protobuf.Duration
Field | Type | Description |
---|---|---|
maxStreamDuration |
.google.protobuf.Duration | Specifies the maximum duration allowed for streams on the route. If not specified, the value from the max_stream_duration field in HttpConnectionManager.common_http_protocol_options is used. If this field is set explicitly to zero, any HttpConnectionManager max_stream_duration timeout will be disabled for this route. |
grpcTimeoutHeaderMax |
.google.protobuf.Duration | If present, and the request contains a grpc-timeout header, use that value as the max_stream_duration , but limit the applied timeout to the maximum value specified here. If set to 0, the grpc-timeout header is used without modification. |
grpcTimeoutHeaderOffset |
.google.protobuf.Duration | If present, Envoy will adjust the timeout provided by the grpc-timeout header by subtracting the provided duration from the header. This is useful for allowing Envoy to set its global timeout to be less than that of the deadline imposed by the calling client, which makes it more likely that Envoy will handle the timeout instead of having the call canceled by the client. If, after applying the offset, the resulting timeout is zero or negative, the stream will timeout immediately. |