.. _envoy_api_file_envoy/config/filter/network/thrift_proxy/v2alpha1/route.proto: Thrift Proxy Route Configuration ================================ Thrift Proxy :ref:`configuration overview `. .. _envoy_api_msg_config.filter.network.thrift_proxy.v2alpha1.RouteConfiguration: config.filter.network.thrift_proxy.v2alpha1.RouteConfiguration -------------------------------------------------------------- `[config.filter.network.thrift_proxy.v2alpha1.RouteConfiguration proto] `_ .. code-block:: json { "name": "...", "routes": [] } .. _envoy_api_field_config.filter.network.thrift_proxy.v2alpha1.RouteConfiguration.name: name (`string `_) The name of the route configuration. Reserved for future use in asynchronous route discovery. .. _envoy_api_field_config.filter.network.thrift_proxy.v2alpha1.RouteConfiguration.routes: routes (:ref:`config.filter.network.thrift_proxy.v2alpha1.Route `) The list of routes that will be matched, in order, against incoming requests. The first route that matches will be used. .. _envoy_api_msg_config.filter.network.thrift_proxy.v2alpha1.Route: config.filter.network.thrift_proxy.v2alpha1.Route ------------------------------------------------- `[config.filter.network.thrift_proxy.v2alpha1.Route proto] `_ .. code-block:: json { "match": "{...}", "route": "{...}" } .. _envoy_api_field_config.filter.network.thrift_proxy.v2alpha1.Route.match: match (:ref:`config.filter.network.thrift_proxy.v2alpha1.RouteMatch `, *REQUIRED*) Route matching parameters. .. _envoy_api_field_config.filter.network.thrift_proxy.v2alpha1.Route.route: route (:ref:`config.filter.network.thrift_proxy.v2alpha1.RouteAction `, *REQUIRED*) Route request to some upstream cluster. .. _envoy_api_msg_config.filter.network.thrift_proxy.v2alpha1.RouteMatch: config.filter.network.thrift_proxy.v2alpha1.RouteMatch ------------------------------------------------------ `[config.filter.network.thrift_proxy.v2alpha1.RouteMatch proto] `_ .. code-block:: json { "method_name": "...", "service_name": "...", "invert": "...", "headers": [] } .. _envoy_api_field_config.filter.network.thrift_proxy.v2alpha1.RouteMatch.method_name: method_name (`string `_) If specified, the route must exactly match the request method name. As a special case, an empty string matches any request method name. Precisely one of :ref:`method_name `, :ref:`service_name ` must be set. .. _envoy_api_field_config.filter.network.thrift_proxy.v2alpha1.RouteMatch.service_name: service_name (`string `_) If specified, the route must have the service name as the request method name prefix. As a special case, an empty string matches any service name. Only relevant when service multiplexing. Precisely one of :ref:`method_name `, :ref:`service_name ` must be set. .. _envoy_api_field_config.filter.network.thrift_proxy.v2alpha1.RouteMatch.invert: invert (`bool `_) Inverts whatever matching is done in the :ref:`method_name ` or :ref:`service_name ` fields. Cannot be combined with wildcard matching as that would result in routes never being matched. .. note:: This does not invert matching done as part of the :ref:`headers field ` field. To invert header matching, see :ref:`invert_match `. .. _envoy_api_field_config.filter.network.thrift_proxy.v2alpha1.RouteMatch.headers: headers (:ref:`route.HeaderMatcher `) Specifies a set of headers that the route should match on. The router will check the request’s headers against all the specified headers in the route config. A match will happen if all the headers in the route are present in the request with the same values (or based on presence if the value field is not in the config). Note that this only applies for Thrift transports and/or protocols that support headers. .. _envoy_api_msg_config.filter.network.thrift_proxy.v2alpha1.RouteAction: config.filter.network.thrift_proxy.v2alpha1.RouteAction ------------------------------------------------------- `[config.filter.network.thrift_proxy.v2alpha1.RouteAction proto] `_ .. code-block:: json { "cluster": "...", "weighted_clusters": "{...}", "metadata_match": "{...}", "rate_limits": [], "strip_service_name": "..." } .. _envoy_api_field_config.filter.network.thrift_proxy.v2alpha1.RouteAction.cluster: cluster (`string `_) Indicates a single upstream cluster to which the request should be routed to. Precisely one of :ref:`cluster `, :ref:`weighted_clusters ` must be set. .. _envoy_api_field_config.filter.network.thrift_proxy.v2alpha1.RouteAction.weighted_clusters: weighted_clusters (:ref:`config.filter.network.thrift_proxy.v2alpha1.WeightedCluster `) Multiple upstream clusters can be specified for a given route. The request is routed to one of the upstream clusters based on weights assigned to each cluster. Precisely one of :ref:`cluster `, :ref:`weighted_clusters ` must be set. .. _envoy_api_field_config.filter.network.thrift_proxy.v2alpha1.RouteAction.metadata_match: metadata_match (:ref:`core.Metadata `) Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in the upstream cluster with metadata matching what is set in this field will be considered. Note that this will be merged with what's provided in :ref: `WeightedCluster.MetadataMatch `, with values there taking precedence. Keys and values should be provided under the "envoy.lb" metadata key. .. _envoy_api_field_config.filter.network.thrift_proxy.v2alpha1.RouteAction.rate_limits: rate_limits (:ref:`route.RateLimit `) Specifies a set of rate limit configurations that could be applied to the route. N.B. Thrift service or method name matching can be achieved by specifying a RequestHeaders action with the header name ":method-name". .. _envoy_api_field_config.filter.network.thrift_proxy.v2alpha1.RouteAction.strip_service_name: strip_service_name (`bool `_) Strip the service prefix from the method name, if there's a prefix. For example, the method call Service:method would end up being just method. .. _envoy_api_msg_config.filter.network.thrift_proxy.v2alpha1.WeightedCluster: config.filter.network.thrift_proxy.v2alpha1.WeightedCluster ----------------------------------------------------------- `[config.filter.network.thrift_proxy.v2alpha1.WeightedCluster proto] `_ Allows for specification of multiple upstream clusters along with weights that indicate the percentage of traffic to be forwarded to each cluster. The router selects an upstream cluster based on these weights. .. code-block:: json { "clusters": [] } .. _envoy_api_field_config.filter.network.thrift_proxy.v2alpha1.WeightedCluster.clusters: clusters (:ref:`config.filter.network.thrift_proxy.v2alpha1.WeightedCluster.ClusterWeight `, *REQUIRED*) Specifies one or more upstream clusters associated with the route. .. _envoy_api_msg_config.filter.network.thrift_proxy.v2alpha1.WeightedCluster.ClusterWeight: config.filter.network.thrift_proxy.v2alpha1.WeightedCluster.ClusterWeight ------------------------------------------------------------------------- `[config.filter.network.thrift_proxy.v2alpha1.WeightedCluster.ClusterWeight proto] `_ .. code-block:: json { "name": "...", "weight": "{...}", "metadata_match": "{...}" } .. _envoy_api_field_config.filter.network.thrift_proxy.v2alpha1.WeightedCluster.ClusterWeight.name: name (`string `_, *REQUIRED*) Name of the upstream cluster. .. _envoy_api_field_config.filter.network.thrift_proxy.v2alpha1.WeightedCluster.ClusterWeight.weight: weight (`UInt32Value `_) When a request matches the route, the choice of an upstream cluster is determined by its weight. The sum of weights across all entries in the clusters array determines the total weight. .. _envoy_api_field_config.filter.network.thrift_proxy.v2alpha1.WeightedCluster.ClusterWeight.metadata_match: metadata_match (:ref:`core.Metadata `) Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints in the upstream cluster with metadata matching what is set in this field, combined with what's provided in :ref: `RouteAction's metadata_match `, will be considered. Values here will take precedence. Keys and values should be provided under the "envoy.lb" metadata key.