@ -17,6 +17,8 @@ import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto" ;
import "google/protobuf/wrappers.proto" ;
import "udpa/api/annotations/versioning.proto" ;
import "validate/validate.proto" ;
/ / [ # protodoc - title : HTTP route ]
@ -30,6 +32,8 @@ import "validate/validate.proto";
/ / upstream cluster to route to or whether to perform a redirect.
/ / [ # next - free - field : 19 ]
message VirtualHost {
option ( udpa.api.annotations.versioning ) . previous_message_type = "envoy.api.v2.route.VirtualHost" ;
enum TlsRequirementType {
/ / No TLS requirement for the virtual host.
NONE = 0 ;
@ -149,6 +153,9 @@ message VirtualHost {
/ / A filter - defined action type.
message FilterAction {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.FilterAction" ;
google.protobuf.Any action = 1 ;
}
@ -161,6 +168,8 @@ message FilterAction {
/ / < envoy_api_msg_api.v3alpha.route.HeaderMatcher > ` .
/ / [ # next - free - field : 18 ]
message Route {
option ( udpa.api.annotations.versioning ) . previous_message_type = "envoy.api.v2.route.Route" ;
reserved 6 , 8 ;
reserved "per_filter_config" ;
@ -249,8 +258,14 @@ message Route {
/ / traffic to be forwarded to each cluster. The router selects an upstream cluster based on the
/ / weights.
message WeightedCluster {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.WeightedCluster" ;
/ / [ # next - free - field : 11 ]
message ClusterWeight {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.WeightedCluster.ClusterWeight" ;
reserved 7 , 8 ;
reserved "per_filter_config" ;
@ -330,10 +345,17 @@ message WeightedCluster {
/ / [ # next - free - field : 12 ]
message RouteMatch {
option ( udpa.api.annotations.versioning ) . previous_message_type = "envoy.api.v2.route.RouteMatch" ;
message GrpcRouteMatchOptions {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions" ;
}
message TlsContextMatchOptions {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.RouteMatch.TlsContextMatchOptions" ;
/ / If specified , the route will match against whether or not a certificate is presented.
google.protobuf.BoolValue presented = 1 ;
}
@ -418,6 +440,8 @@ message RouteMatch {
/ / [ # next - free - field : 12 ]
message CorsPolicy {
option ( udpa.api.annotations.versioning ) . previous_message_type = "envoy.api.v2.route.CorsPolicy" ;
reserved 1 , 8 , 7 ;
reserved "allow_origin" , "allow_origin_regex" , "enabled" ;
@ -466,6 +490,8 @@ message CorsPolicy {
/ / [ # next - free - field : 30 ]
message RouteAction {
option ( udpa.api.annotations.versioning ) . previous_message_type = "envoy.api.v2.route.RouteAction" ;
enum ClusterNotFoundResponseCode {
/ / HTTP status code - 503 Service Unavailable.
SERVICE_UNAVAILABLE = 0 ;
@ -488,6 +514,9 @@ message RouteAction {
/ / During shadowing , the host / authority header is altered such that * - shadow * is appended. This is
/ / useful for logging. For example , * cluster1 * becomes * cluster1 - shadow * .
message RequestMirrorPolicy {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.RouteAction.RequestMirrorPolicy" ;
reserved 2 ;
reserved "runtime_key" ;
@ -512,7 +541,13 @@ message RouteAction {
/ / Specifies the route ' s hashing policy if the upstream cluster uses a hashing : ref : ` load balancer
/ / < arch_overview_load_balancing_types > ` .
message HashPolicy {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.RouteAction.HashPolicy" ;
message Header {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.RouteAction.HashPolicy.Header" ;
/ / The name of the request header that will be used to obtain the hash
/ / key. If the request header is not present , no hash will be produced.
string header_name = 1 [ ( validate.rules ) . string = { min_bytes : 1 } ] ;
@ -533,6 +568,9 @@ message RouteAction {
/ / streams on the same connection will independently receive the same
/ / cookie , even if they arrive at the Envoy simultaneously.
message Cookie {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.RouteAction.HashPolicy.Cookie" ;
/ / The name of the cookie that will be used to obtain the hash key. If the
/ / cookie is not present and ttl below is not set , no hash will be
/ / produced.
@ -549,6 +587,9 @@ message RouteAction {
}
message ConnectionProperties {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties" ;
/ / Hash on source IP address.
bool source_ip = 1 ;
}
@ -595,6 +636,9 @@ message RouteAction {
/ / < envoy_api_field_config.filter.network.http_connection_manager.v3alpha.HttpConnectionManager.upgrade_configs > `
/ / but does not affect any custom filter chain specified there.
message UpgradeConfig {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.RouteAction.UpgradeConfig" ;
/ / The case - insensitive name of this upgrade , e.g. "websocket" .
/ / For each upgrade type present in upgrade_configs , requests with
/ / Upgrade : [ upgrade_type ] will be proxied upstream.
@ -806,7 +850,12 @@ message RouteAction {
/ / HTTP retry : ref : ` architecture overview < arch_overview_http_routing_retry > ` .
/ / [ # next - free - field : 11 ]
message RetryPolicy {
option ( udpa.api.annotations.versioning ) . previous_message_type = "envoy.api.v2.route.RetryPolicy" ;
message RetryPriority {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.RetryPolicy.RetryPriority" ;
reserved 2 ;
reserved "config" ;
@ -819,6 +868,9 @@ message RetryPolicy {
}
message RetryHostPredicate {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.RetryPolicy.RetryHostPredicate" ;
reserved 2 ;
reserved "config" ;
@ -831,6 +883,9 @@ message RetryPolicy {
}
message RetryBackOff {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.RetryPolicy.RetryBackOff" ;
/ / Specifies the base interval between retries. This parameter is required and must be greater
/ / than zero. Values less than 1 ms are rounded up to 1 ms.
/ / See : ref : ` config_http_filters_router_x - envoy - max - retries ` for a discussion of Envoy ' s
@ -907,6 +962,8 @@ message RetryPolicy {
/ / HTTP request hedging : ref : ` architecture overview < arch_overview_http_routing_hedging > ` .
message HedgePolicy {
option ( udpa.api.annotations.versioning ) . previous_message_type = "envoy.api.v2.route.HedgePolicy" ;
/ / Specifies the number of initial requests that should be sent upstream.
/ / Must be at least 1.
/ / Defaults to 1.
@ -932,6 +989,9 @@ message HedgePolicy {
/ / [ # next - free - field : 9 ]
message RedirectAction {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.RedirectAction" ;
enum RedirectResponseCode {
/ / Moved Permanently HTTP Status Code - 301.
MOVED_PERMANENTLY = 0 ;
@ -994,6 +1054,9 @@ message RedirectAction {
}
message DirectResponseAction {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.DirectResponseAction" ;
/ / Specifies the HTTP response status to be returned.
uint32 status = 1 [ ( validate.rules ) . uint32 = { lt : 600 gte : 100 } ] ;
@ -1009,6 +1072,8 @@ message DirectResponseAction {
}
message Decorator {
option ( udpa.api.annotations.versioning ) . previous_message_type = "envoy.api.v2.route.Decorator" ;
/ / The operation name associated with the request matched to this route. If tracing is
/ / enabled , this information will be used as the span name reported for this request.
/ /
@ -1021,6 +1086,8 @@ message Decorator {
}
message Tracing {
option ( udpa.api.annotations.versioning ) . previous_message_type = "envoy.api.v2.route.Tracing" ;
/ / Target percentage of requests managed by this HTTP connection manager that will be force
/ / traced if the : ref : ` x - client - trace - id < config_http_conn_man_headers_x - client - trace - id > `
/ / header is set. This field is a direct analog for the runtime variable
@ -1065,6 +1132,9 @@ message Tracing {
/ / every application endpoint. This is both not easily maintainable and as well the matching and
/ / statistics output are not free.
message VirtualCluster {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.VirtualCluster" ;
reserved 1 , 3 ;
reserved "pattern" , "method" ;
@ -1082,8 +1152,13 @@ message VirtualCluster {
/ / Global rate limiting : ref : ` architecture overview < arch_overview_rate_limit > ` .
message RateLimit {
option ( udpa.api.annotations.versioning ) . previous_message_type = "envoy.api.v2.route.RateLimit" ;
/ / [ # next - free - field : 7 ]
message Action {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.RateLimit.Action" ;
/ / The following descriptor entry is appended to the descriptor :
/ /
/ / . . code - block : : cpp
@ -1092,6 +1167,8 @@ message RateLimit {
/ /
/ / < local service cluster > is derived from the : option : ` - - service - cluster ` option .
message SourceCluster {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.RateLimit.Action.SourceCluster" ;
}
/ / The following descriptor entry is appended to the descriptor :
@ -1113,6 +1190,8 @@ message RateLimit {
/ / indicates which
/ / header in the request contains the target cluster.
message DestinationCluster {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.RateLimit.Action.DestinationCluster" ;
}
/ / The following descriptor entry is appended when a header contains a key that matches the
@ -1122,6 +1201,9 @@ message RateLimit {
/ /
/ / ( "<descriptor_key>" , "<header_value_queried_from_header>" )
message RequestHeaders {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.RateLimit.Action.RequestHeaders" ;
/ / The header name to be queried from the request headers. The header ’ s
/ / value is used to populate the value of the descriptor entry for the
/ / descriptor_key.
@ -1138,6 +1220,8 @@ message RateLimit {
/ /
/ / ( "remote_address" , "<trusted address from x-forwarded-for>" )
message RemoteAddress {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.RateLimit.Action.RemoteAddress" ;
}
/ / The following descriptor entry is appended to the descriptor :
@ -1146,6 +1230,9 @@ message RateLimit {
/ /
/ / ( "generic_key" , "<descriptor_value>" )
message GenericKey {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.RateLimit.Action.GenericKey" ;
/ / The value to use in the descriptor entry.
string descriptor_value = 1 [ ( validate.rules ) . string = { min_bytes : 1 } ] ;
}
@ -1156,6 +1243,9 @@ message RateLimit {
/ /
/ / ( "header_match" , "<descriptor_value>" )
message HeaderValueMatch {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.RateLimit.Action.HeaderValueMatch" ;
/ / The value to use in the descriptor entry.
string descriptor_value = 1 [ ( validate.rules ) . string = { min_bytes : 1 } ] ;
@ -1243,6 +1333,9 @@ message RateLimit {
/ / [ # next - major - version : HeaderMatcher should be refactored to use StringMatcher. ]
/ / [ # next - free - field : 12 ]
message HeaderMatcher {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.HeaderMatcher" ;
reserved 2 , 3 , 5 ;
reserved "regex_match" ;
@ -1307,6 +1400,9 @@ message HeaderMatcher {
/ / as an ampersand - separated list of keys and / or key = value elements.
/ / [ # next - free - field : 7 ]
message QueryParameterMatcher {
option ( udpa.api.annotations.versioning ) . previous_message_type =
"envoy.api.v2.route.QueryParameterMatcher" ;
reserved 3 , 4 ;
reserved "value" , "regex" ;