subset: allow matching metadata criteria with any element in list (#7047)

This makes it possible to configure the subset LB to match metadata
match criterias with any of the values specified in a list value on an
endpoint. This allows endpoints to have multiple values for a given
metadata key.

To accomplish this the invariants of the subset trie construction
changed: a host can now be associated with multiple subsets for a set of
subset selectors. To support this the trie construction had to change to
traverse all possible paths for each host.

Fixes #6921

Signed-off-by: Snow Pettersen <snowp@squareup.com>

Mirrored from https://github.com/envoyproxy/envoy @ 41ecbb3e4bd48b425483e7c3aae17509f2ef3a80
pull/620/head
data-plane-api(CircleCI) 6 years ago
parent 7c09e8d002
commit f3e87b6267
  1. 5
      envoy/api/v2/cds.proto

@ -428,6 +428,11 @@ message Cluster {
// subset might become empty. With this option enabled, if that happens the LB will attempt // subset might become empty. With this option enabled, if that happens the LB will attempt
// to select a host from the entire cluster. // to select a host from the entire cluster.
bool panic_mode_any = 6; bool panic_mode_any = 6;
// If true, metadata specified for a metadata key will be matched against the corresponding
// endpoint metadata if the endpoint metadata matches the value exactly OR it is a list value
// and any of the elements in the list matches the criteria.
bool list_as_any = 7;
} }
// Configuration for load balancing subsetting. // Configuration for load balancing subsetting.

Loading…
Cancel
Save