|
|
@ -20,12 +20,10 @@ import "validate/validate.proto"; |
|
|
|
// configurations. Each listener will bind its HTTP connection manager filter to |
|
|
|
// configurations. Each listener will bind its HTTP connection manager filter to |
|
|
|
// a route table via this identifier. |
|
|
|
// a route table via this identifier. |
|
|
|
service RouteDiscoveryService { |
|
|
|
service RouteDiscoveryService { |
|
|
|
rpc StreamRoutes(stream DiscoveryRequest) |
|
|
|
rpc StreamRoutes(stream DiscoveryRequest) returns (stream DiscoveryResponse) { |
|
|
|
returns (stream DiscoveryResponse) { |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
rpc FetchRoutes(DiscoveryRequest) |
|
|
|
rpc FetchRoutes(DiscoveryRequest) returns (DiscoveryResponse) { |
|
|
|
returns (DiscoveryResponse) { |
|
|
|
|
|
|
|
option (google.api.http) = { |
|
|
|
option (google.api.http) = { |
|
|
|
post: "/v2/discovery:routes" |
|
|
|
post: "/v2/discovery:routes" |
|
|
|
body: "*" |
|
|
|
body: "*" |
|
|
@ -57,7 +55,7 @@ message WeightedCluster { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Specifies one or more upstream clusters associated with the route. |
|
|
|
// Specifies one or more upstream clusters associated with the route. |
|
|
|
repeated ClusterWeight clusters = 1 [(validate.rules).repeated.min_items = 1]; |
|
|
|
repeated ClusterWeight clusters = 1 [(validate.rules).repeated .min_items = 1]; |
|
|
|
|
|
|
|
|
|
|
|
// Specifies the runtime key prefix that should be used to construct the |
|
|
|
// Specifies the runtime key prefix that should be used to construct the |
|
|
|
// runtime keys associated with each cluster. When the *runtime_key_prefix* is |
|
|
|
// runtime keys associated with each cluster. When the *runtime_key_prefix* is |
|
|
@ -510,7 +508,8 @@ message RateLimit { |
|
|
|
// ("source_cluster", "<local service cluster>") |
|
|
|
// ("source_cluster", "<local service cluster>") |
|
|
|
// |
|
|
|
// |
|
|
|
// <local service cluster> is derived from the :option:`--service-cluster` option. |
|
|
|
// <local service cluster> is derived from the :option:`--service-cluster` option. |
|
|
|
message SourceCluster {} |
|
|
|
message SourceCluster { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// The following descriptor entry is appended to the descriptor: |
|
|
|
// The following descriptor entry is appended to the descriptor: |
|
|
|
// |
|
|
|
// |
|
|
@ -528,7 +527,8 @@ message RateLimit { |
|
|
|
// chooses a cluster randomly from a set of clusters with attributed weight. |
|
|
|
// chooses a cluster randomly from a set of clusters with attributed weight. |
|
|
|
// * :ref:`cluster_header <envoy_api_field_RouteAction.cluster_header>` indicates which |
|
|
|
// * :ref:`cluster_header <envoy_api_field_RouteAction.cluster_header>` indicates which |
|
|
|
// header in the request contains the target cluster. |
|
|
|
// header in the request contains the target cluster. |
|
|
|
message DestinationCluster {} |
|
|
|
message DestinationCluster { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// The following descriptor entry is appended when a header contains a key that matches the |
|
|
|
// The following descriptor entry is appended when a header contains a key that matches the |
|
|
|
// *header_name*: |
|
|
|
// *header_name*: |
|
|
@ -552,7 +552,8 @@ message RateLimit { |
|
|
|
// .. code-block:: cpp |
|
|
|
// .. code-block:: cpp |
|
|
|
// |
|
|
|
// |
|
|
|
// ("remote_address", "<trusted address from x-forwarded-for>") |
|
|
|
// ("remote_address", "<trusted address from x-forwarded-for>") |
|
|
|
message RemoteAddress {} |
|
|
|
message RemoteAddress { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// The following descriptor entry is appended to the descriptor: |
|
|
|
// The following descriptor entry is appended to the descriptor: |
|
|
|
// |
|
|
|
// |
|
|
@ -584,7 +585,7 @@ message RateLimit { |
|
|
|
// specified headers in the config. A match will happen if all the |
|
|
|
// specified headers in the config. A match will happen if all the |
|
|
|
// headers in the config are present in the request with the same values |
|
|
|
// headers in the config are present in the request with the same values |
|
|
|
// (or based on presence if the value field is not in the config). |
|
|
|
// (or based on presence if the value field is not in the config). |
|
|
|
repeated HeaderMatcher headers = 3 [(validate.rules).repeated.min_items = 1]; |
|
|
|
repeated HeaderMatcher headers = 3 [(validate.rules).repeated .min_items = 1]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
oneof action_specifier { |
|
|
|
oneof action_specifier { |
|
|
@ -616,7 +617,7 @@ message RateLimit { |
|
|
|
// cannot append a descriptor entry, no descriptor is generated for the |
|
|
|
// cannot append a descriptor entry, no descriptor is generated for the |
|
|
|
// configuration. See :ref:`composing actions |
|
|
|
// configuration. See :ref:`composing actions |
|
|
|
// <config_http_filters_rate_limit_composing_actions>` for additional documentation. |
|
|
|
// <config_http_filters_rate_limit_composing_actions>` for additional documentation. |
|
|
|
repeated Action actions = 3 [(validate.rules).repeated.min_items = 1]; |
|
|
|
repeated Action actions = 3 [(validate.rules).repeated .min_items = 1]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// .. attention:: |
|
|
|
// .. attention:: |
|
|
@ -659,8 +660,8 @@ message HeaderMatcher { |
|
|
|
|
|
|
|
|
|
|
|
// The top level element in the routing configuration is a virtual host. Each virtual host has |
|
|
|
// The top level element in the routing configuration is a virtual host. Each virtual host has |
|
|
|
// a logical name as well as a set of domains that get routed to it based on the incoming request's |
|
|
|
// a logical name as well as a set of domains that get routed to it based on the incoming request's |
|
|
|
// host header. This allows a single listener to service multiple top level domain path trees. Once a |
|
|
|
// host header. This allows a single listener to service multiple top level domain path trees. Once |
|
|
|
// virtual host is selected based on the domain, the routes are processed in order to see which |
|
|
|
// a virtual host is selected based on the domain, the routes are processed in order to see which |
|
|
|
// upstream cluster to route to or whether to perform a redirect. |
|
|
|
// upstream cluster to route to or whether to perform a redirect. |
|
|
|
message VirtualHost { |
|
|
|
message VirtualHost { |
|
|
|
// The logical name of the virtual host. This is used when emitting certain |
|
|
|
// The logical name of the virtual host. This is used when emitting certain |
|
|
@ -679,7 +680,7 @@ message VirtualHost { |
|
|
|
// host/authority header. Only a single virtual host in the entire route |
|
|
|
// host/authority header. Only a single virtual host in the entire route |
|
|
|
// configuration can match on “*”. A domain must be unique across all virtual |
|
|
|
// configuration can match on “*”. A domain must be unique across all virtual |
|
|
|
// hosts or the config will fail to load. |
|
|
|
// hosts or the config will fail to load. |
|
|
|
repeated string domains = 2 [(validate.rules).repeated.min_items = 1]; |
|
|
|
repeated string domains = 2 [(validate.rules).repeated .min_items = 1]; |
|
|
|
|
|
|
|
|
|
|
|
// The list of routes that will be matched, in order, for incoming requests. |
|
|
|
// The list of routes that will be matched, in order, for incoming requests. |
|
|
|
// The first route that matches will be used. |
|
|
|
// The first route that matches will be used. |
|
|
|