Add dynamic metadata support for ORIGINAL_DST cluster to pick a host (#28054)

One can specify a MetadataKey with a path selector to pick up a host
from the dynamic metadata of the request or downstream. Selected
value can either be a string or a list with at least a single
element of string type. Request metadata is considered first.

Signed-off-by: Andrii Chabykin <chabster@google.com>

Mirrored from https://github.com/envoyproxy/envoy @ 10468b320421cb14d7911b4e6d139cc18780fb1a
main
update-envoy[bot] 1 year ago
parent 0bceb80dd2
commit 9ed9f3a3a5
  1. 1
      envoy/config/cluster/v3/BUILD
  2. 5
      envoy/config/cluster/v3/cluster.proto

@ -9,6 +9,7 @@ api_proto_package(
"//envoy/annotations:pkg",
"//envoy/config/core/v3:pkg",
"//envoy/config/endpoint/v3:pkg",
"//envoy/type/metadata/v3:pkg",
"//envoy/type/v3:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
"@com_github_cncf_udpa//xds/core/v3:pkg",

@ -13,6 +13,7 @@ import "envoy/config/core/v3/health_check.proto";
import "envoy/config/core/v3/protocol.proto";
import "envoy/config/core/v3/resolver.proto";
import "envoy/config/endpoint/v3/endpoint.proto";
import "envoy/type/metadata/v3/metadata.proto";
import "envoy/type/v3/percent.proto";
import "google/protobuf/any.proto";
@ -551,6 +552,10 @@ message Cluster {
// The port to override for the original dst address. This port
// will take precedence over filter state and header override ports
google.protobuf.UInt32Value upstream_port_override = 3 [(validate.rules).uint32 = {lte: 65535}];
// The dynamic metadata key to override destination address.
// First the request metadata is considered, then the connection one.
type.metadata.v3.MetadataKey metadata_key = 4;
}
// Common configuration for all load balancer implementations.

Loading…
Cancel
Save