[envoy/router] Move MetadataMatchCriteriaImpl implementation to its own source file (#4406)

Making this change so others can depend on metadatamatchcriteria_impl without needing
config_impl. Also update comments on metadata_match to specify that these fields only apply for the subset load balancer.

Context: https://github.com/envoyproxy/envoy/pull/4402/files#r216856765

Risk Level: low
Testing: tests, new and old, pass
Doc Changes: clarified docs
Release Notes: n/a

Signed-off-by: Brian Ramos <brirams@users.noreply.github.com>

Mirrored from https://github.com/envoyproxy/envoy @ 3b3c28a1dd6be6e1dd11e543227b23891c234fe8
pull/620/head
data-plane-api(CircleCI) 6 years ago
parent b475401668
commit 4bb50d524f
  1. 49
      WORKSPACE
  2. 16
      envoy/api/v2/route/route.proto

@ -1,49 +0,0 @@
workspace(name = "envoy_api")
load("//bazel:repositories.bzl", "api_dependencies")
api_dependencies()
http_archive(
name = "com_google_protobuf",
sha256 = "0cc6607e2daa675101e9b7398a436f09167dffb8ca0489b0307ff7260498c13c",
strip_prefix = "protobuf-3.5.0",
urls = ["https://github.com/google/protobuf/archive/v3.5.0.tar.gz"],
)
http_archive(
name = "com_google_protobuf_cc",
sha256 = "0cc6607e2daa675101e9b7398a436f09167dffb8ca0489b0307ff7260498c13c",
strip_prefix = "protobuf-3.5.0",
urls = ["https://github.com/google/protobuf/archive/v3.5.0.tar.gz"],
)
# Needed for ``bazel fetch`` to work with @com_google_protobuf
# https://github.com/google/protobuf/blob/v3.5.0/util/python/BUILD#L6-L9
bind(
name = "python_headers",
actual = "@com_google_protobuf//util/python:python_headers",
)
bind(
name = "six",
actual = "@six_archive//:six",
)
new_http_archive(
name = "six_archive",
build_file = "@com_google_protobuf//:six.BUILD",
sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a",
url = "https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz#md5=34eed507548117b2ab523ab14b2f8b55",
)
http_archive(
name = "io_bazel_rules_go",
url = "https://github.com/bazelbuild/rules_go/releases/download/0.8.1/rules_go-0.8.1.tar.gz",
sha256 = "90bb270d0a92ed5c83558b2797346917c46547f6f7103e648941ecdb6b9d0e72",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
load("@com_lyft_protoc_gen_validate//bazel:go_proto_library.bzl", "go_proto_repositories")
go_proto_repositories(shared=0)
go_rules_dependencies()
go_register_toolchains()

@ -188,9 +188,11 @@ message WeightedCluster {
// entries in the clusters array must add up to the total_weight, which defaults to 100.
google.protobuf.UInt32Value weight = 2;
// Optional endpoint metadata match criteria. Only endpoints in the upstream
// cluster with metadata matching that set in metadata_match will be
// considered. The filter name should be specified as *envoy.lb*.
// 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 for
// load balancing. Note that this will be merged with what's provided in :ref:
// `RouteAction.MetadataMatch <envoy_api_field_route.RouteAction.metadata_match>`, with values
// here taking precedence. The filter name should be specified as *envoy.lb*.
core.Metadata metadata_match = 3;
// Specifies a list of headers to be added to requests when this cluster is selected
@ -372,9 +374,11 @@ message RouteAction {
ClusterNotFoundResponseCode cluster_not_found_response_code = 20
[(validate.rules).enum.defined_only = true];
// Optional endpoint metadata match criteria. Only endpoints in the upstream
// cluster with metadata matching that set in metadata_match will be
// considered. The filter name should be specified as *envoy.lb*.
// Optional endpoint metadata match criteria used by the subset load balancer. Only endpoints
// in the upstream cluster with metadata matching what's set in this field will be considered
// for load balancing. If using :ref:`weighted_clusters
// <envoy_api_field_route.RouteAction.weighted_clusters>`, metadata will be merged, with values
// provided there taking precedence. The filter name should be specified as *envoy.lb*.
core.Metadata metadata_match = 4;
// Indicates that during forwarding, the matched prefix (or path) should be

Loading…
Cancel
Save