Matcher Based Cluster Specifier (proto)
This extension has the qualified name envoy.router.cluster_specifier_plugin.matcher
Note
This extension is functional but has not had substantial production burn time, use only with this caveat.
This extension is intended to be robust against both untrusted downstream and upstream traffic.
Tip
This extension extends and can be used with the following extension category:
This extension must be configured with one of the following type URLs:
extensions.router.cluster_specifiers.matcher.v3.ClusterAction
[extensions.router.cluster_specifiers.matcher.v3.ClusterAction proto]
{
"cluster": ...
}
- cluster
(string, REQUIRED) Indicates the upstream cluster to which the request should be routed to.
extensions.router.cluster_specifiers.matcher.v3.MatcherClusterSpecifier
[extensions.router.cluster_specifiers.matcher.v3.MatcherClusterSpecifier proto]
{
"cluster_matcher": {...}
}
- cluster_matcher
(.xds.type.matcher.v3.Matcher, REQUIRED) The matcher for cluster selection after the route has been selected. This is used when the route has multiple clusters (like multiple clusters for different users) and the matcher is used to select the cluster to use for the request.
The match tree to use for grouping incoming requests into buckets.
Example:
matcher_list: matchers: - predicate: single_predicate: input: typed_config: '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput header_name: env value_match: exact: staging on_match: action: typed_config: '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction cluster: "staging-cluster" - predicate: single_predicate: input: typed_config: '@type': type.googleapis.com/envoy.type.matcher.v3.HttpRequestHeaderMatchInput header_name: env value_match: exact: prod on_match: action: typed_config: '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction cluster: "prod-cluster" # Catch-all with a default cluster. on_no_match: action: typed_config: '@type': type.googleapis.com/envoy.extensions.router.cluster_specifiers.matcher.v3.ClusterAction cluster: "default-cluster"