api: split config from service defs for CDS/RDS/EDS/SRDS/TDS. (#9555)

This allows for a clean separation of config/service in v3. This is a
continuation of #9548.

Risk level: Low
Testing: bazel test //test/...

Signed-off-by: Harvey Tuch <htuch@google.com>

Mirrored from https://github.com/envoyproxy/envoy @ c3bddaee1912fcd1fedc4786aee830b2e4a7c599
master-ci-test
data-plane-api(CircleCI) 5 years ago
parent b9acb9ce1f
commit ad23693093
  1. 1
      BUILD
  2. 6
      envoy/admin/v2alpha/config_dump.proto
  3. 6
      envoy/admin/v3alpha/BUILD
  4. 18
      envoy/admin/v3alpha/config_dump.proto
  5. 4
      envoy/admin/v3alpha/tap.proto
  6. 828
      envoy/api/v2/cds.proto
  7. 837
      envoy/api/v2/cluster.proto
  8. 101
      envoy/api/v2/eds.proto
  9. 117
      envoy/api/v2/endpoint.proto
  10. 124
      envoy/api/v2/endpoint/endpoint.proto
  11. 131
      envoy/api/v2/endpoint/endpoint_components.proto
  12. 94
      envoy/api/v2/rds.proto
  13. 105
      envoy/api/v2/route.proto
  14. 1442
      envoy/api/v2/route/route.proto
  15. 1449
      envoy/api/v2/route/route_components.proto
  16. 107
      envoy/api/v2/scoped_route.proto
  17. 99
      envoy/api/v2/srds.proto
  18. 2
      envoy/config/bootstrap/v2/bootstrap.proto
  19. 2
      envoy/config/bootstrap/v3alpha/BUILD
  20. 12
      envoy/config/bootstrap/v3alpha/bootstrap.proto
  21. 3
      envoy/config/cluster/v3alpha/BUILD
  22. 883
      envoy/config/cluster/v3alpha/cluster.proto
  23. 2
      envoy/config/common/dynamic_forward_proxy/v2alpha/dns_cache.proto
  24. 11
      envoy/config/core/v3alpha/address.proto
  25. 2
      envoy/config/core/v3alpha/base.proto
  26. 2
      envoy/config/core/v3alpha/config_source.proto
  27. 4
      envoy/config/core/v3alpha/grpc_service.proto
  28. 2
      envoy/config/endpoint/v3alpha/BUILD
  29. 210
      envoy/config/endpoint/v3alpha/endpoint.proto
  30. 141
      envoy/config/endpoint/v3alpha/endpoint_components.proto
  31. 2
      envoy/config/filter/accesslog/v2/accesslog.proto
  32. 2
      envoy/config/filter/accesslog/v3alpha/accesslog.proto
  33. 2
      envoy/config/filter/http/fault/v2/fault.proto
  34. 2
      envoy/config/filter/http/health_check/v2/health_check.proto
  35. 2
      envoy/config/filter/http/jwt_authn/v2alpha/config.proto
  36. 2
      envoy/config/filter/network/dubbo_proxy/v2alpha1/route.proto
  37. 4
      envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto
  38. 2
      envoy/config/filter/network/thrift_proxy/v2alpha1/route.proto
  39. 2
      envoy/config/rbac/v2/rbac.proto
  40. 2
      envoy/config/rbac/v3alpha/rbac.proto
  41. 1
      envoy/config/route/v3alpha/BUILD
  42. 1489
      envoy/config/route/v3alpha/route.proto
  43. 1440
      envoy/config/route/v3alpha/route_components.proto
  44. 116
      envoy/config/route/v3alpha/scoped_route.proto
  45. 14
      envoy/config/tap/v3alpha/BUILD
  46. 12
      envoy/config/tap/v3alpha/common.proto
  47. 6
      envoy/data/tap/v3alpha/common.proto
  48. 4
      envoy/data/tap/v3alpha/transport.proto
  49. 2
      envoy/extensions/common/dynamic_forward_proxy/v3alpha/BUILD
  50. 4
      envoy/extensions/common/dynamic_forward_proxy/v3alpha/dns_cache.proto
  51. 2
      envoy/extensions/common/tap/v3alpha/BUILD
  52. 4
      envoy/extensions/common/tap/v3alpha/common.proto
  53. 2
      envoy/extensions/filters/http/fault/v3alpha/fault.proto
  54. 2
      envoy/extensions/filters/http/health_check/v3alpha/health_check.proto
  55. 2
      envoy/extensions/filters/http/jwt_authn/v3alpha/config.proto
  56. 2
      envoy/extensions/filters/network/dubbo_proxy/v3alpha/route.proto
  57. 2
      envoy/extensions/filters/network/http_connection_manager/v3alpha/BUILD
  58. 14
      envoy/extensions/filters/network/http_connection_manager/v3alpha/http_connection_manager.proto
  59. 2
      envoy/extensions/filters/network/redis_proxy/v3alpha/redis_proxy.proto
  60. 2
      envoy/extensions/filters/network/thrift_proxy/v3alpha/route.proto
  61. 2
      envoy/extensions/filters/network/thrift_proxy/v3alpha/thrift_proxy.proto
  62. 4
      envoy/service/cluster/v3alpha/BUILD
  63. 874
      envoy/service/cluster/v3alpha/cds.proto
  64. 2
      envoy/service/discovery/v2/hds.proto
  65. 2
      envoy/service/endpoint/v3alpha/BUILD
  66. 108
      envoy/service/endpoint/v3alpha/eds.proto
  67. 2
      envoy/service/health/v3alpha/hds.proto
  68. 2
      envoy/service/route/v3alpha/BUILD
  69. 97
      envoy/service/route/v3alpha/rds.proto
  70. 112
      envoy/service/route/v3alpha/srds.proto
  71. 1
      envoy/service/tap/v2alpha/BUILD
  72. 4
      envoy/service/tap/v2alpha/common.proto
  73. 2
      envoy/service/tap/v3alpha/BUILD
  74. 2
      envoy/service/tap/v3alpha/tap.proto
  75. 4
      envoy/service/tap/v3alpha/tapds.proto
  76. 8
      test/validate/pgv_test.cc

@ -90,6 +90,7 @@ proto_library(
"//envoy/config/resource_monitor/injected_resource/v2alpha:pkg",
"//envoy/config/retry/previous_priorities:pkg",
"//envoy/config/route/v3alpha:pkg",
"//envoy/config/tap/v3alpha:pkg",
"//envoy/config/trace/v2:pkg",
"//envoy/config/trace/v2alpha:pkg",
"//envoy/config/trace/v3alpha:pkg",

@ -3,10 +3,10 @@ syntax = "proto3";
package envoy.admin.v2alpha;
import "envoy/api/v2/auth/cert.proto";
import "envoy/api/v2/cds.proto";
import "envoy/api/v2/cluster.proto";
import "envoy/api/v2/listener.proto";
import "envoy/api/v2/rds.proto";
import "envoy/api/v2/srds.proto";
import "envoy/api/v2/route.proto";
import "envoy/api/v2/scoped_route.proto";
import "envoy/config/bootstrap/v2/bootstrap.proto";
import "google/protobuf/any.proto";

@ -8,12 +8,12 @@ api_proto_package(
deps = [
"//envoy/admin/v2alpha:pkg",
"//envoy/config/bootstrap/v3alpha:pkg",
"//envoy/config/cluster/v3alpha:pkg",
"//envoy/config/core/v3alpha:pkg",
"//envoy/config/listener/v3alpha:pkg",
"//envoy/config/route/v3alpha:pkg",
"//envoy/config/tap/v3alpha:pkg",
"//envoy/extensions/transport_sockets/tls/v3alpha:pkg",
"//envoy/service/cluster/v3alpha:pkg",
"//envoy/service/route/v3alpha:pkg",
"//envoy/service/tap/v3alpha:pkg",
"//envoy/type/v3alpha:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],

@ -3,11 +3,11 @@ syntax = "proto3";
package envoy.admin.v3alpha;
import "envoy/config/bootstrap/v3alpha/bootstrap.proto";
import "envoy/config/cluster/v3alpha/cluster.proto";
import "envoy/config/listener/v3alpha/listener.proto";
import "envoy/config/route/v3alpha/route.proto";
import "envoy/config/route/v3alpha/scoped_route.proto";
import "envoy/extensions/transport_sockets/tls/v3alpha/cert.proto";
import "envoy/service/cluster/v3alpha/cds.proto";
import "envoy/service/route/v3alpha/rds.proto";
import "envoy/service/route/v3alpha/srds.proto";
import "google/protobuf/any.proto";
import "google/protobuf/timestamp.proto";
@ -164,7 +164,7 @@ message ClustersConfigDump {
"envoy.admin.v2alpha.ClustersConfigDump.StaticCluster";
// The cluster config.
service.cluster.v3alpha.Cluster cluster = 1;
config.cluster.v3alpha.Cluster cluster = 1;
// The timestamp when the Cluster was last updated.
google.protobuf.Timestamp last_updated = 2;
@ -183,7 +183,7 @@ message ClustersConfigDump {
string version_info = 1;
// The cluster config.
service.cluster.v3alpha.Cluster cluster = 2;
config.cluster.v3alpha.Cluster cluster = 2;
// The timestamp when the Cluster was last updated.
google.protobuf.Timestamp last_updated = 3;
@ -223,7 +223,7 @@ message RoutesConfigDump {
"envoy.admin.v2alpha.RoutesConfigDump.StaticRouteConfig";
// The route config.
service.route.v3alpha.RouteConfiguration route_config = 1;
config.route.v3alpha.RouteConfiguration route_config = 1;
// The timestamp when the Route was last updated.
google.protobuf.Timestamp last_updated = 2;
@ -240,7 +240,7 @@ message RoutesConfigDump {
string version_info = 1;
// The route config.
service.route.v3alpha.RouteConfiguration route_config = 2;
config.route.v3alpha.RouteConfiguration route_config = 2;
// The timestamp when the Route was last updated.
google.protobuf.Timestamp last_updated = 3;
@ -269,7 +269,7 @@ message ScopedRoutesConfigDump {
string name = 1;
// The scoped route configurations.
repeated service.route.v3alpha.ScopedRouteConfiguration scoped_route_configs = 2;
repeated config.route.v3alpha.ScopedRouteConfiguration scoped_route_configs = 2;
// The timestamp when the scoped route config set was last updated.
google.protobuf.Timestamp last_updated = 3;
@ -289,7 +289,7 @@ message ScopedRoutesConfigDump {
string version_info = 2;
// The scoped route configurations.
repeated service.route.v3alpha.ScopedRouteConfiguration scoped_route_configs = 3;
repeated config.route.v3alpha.ScopedRouteConfiguration scoped_route_configs = 3;
// The timestamp when the scoped route config set was last updated.
google.protobuf.Timestamp last_updated = 4;

@ -2,7 +2,7 @@ syntax = "proto3";
package envoy.admin.v3alpha;
import "envoy/service/tap/v3alpha/common.proto";
import "envoy/config/tap/v3alpha/common.proto";
import "udpa/annotations/versioning.proto";
@ -21,5 +21,5 @@ message TapRequest {
string config_id = 1 [(validate.rules).string = {min_bytes: 1}];
// The tap configuration to load.
service.tap.v3alpha.TapConfig tap_config = 2 [(validate.rules).message = {required: true}];
config.tap.v3alpha.TapConfig tap_config = 2 [(validate.rules).message = {required: true}];
}

@ -2,27 +2,13 @@ syntax = "proto3";
package envoy.api.v2;
import "envoy/api/v2/auth/cert.proto";
import "envoy/api/v2/cluster/circuit_breaker.proto";
import "envoy/api/v2/cluster/filter.proto";
import "envoy/api/v2/cluster/outlier_detection.proto";
import "envoy/api/v2/core/address.proto";
import "envoy/api/v2/core/base.proto";
import "envoy/api/v2/core/config_source.proto";
import "envoy/api/v2/core/health_check.proto";
import "envoy/api/v2/core/protocol.proto";
import "envoy/api/v2/discovery.proto";
import "envoy/api/v2/eds.proto";
import "envoy/type/percent.proto";
import "google/api/annotations.proto";
import "google/protobuf/any.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto";
import "udpa/annotations/migrate.proto";
import "validate/validate.proto";
import public "envoy/api/v2/cluster.proto";
option java_package = "io.envoyproxy.envoy.api.v2";
option java_outer_classname = "CdsProto";
@ -30,7 +16,7 @@ option java_multiple_files = true;
option java_generic_services = true;
option (udpa.annotations.file_migrate).move_to_package = "envoy.service.cluster.v3alpha";
// [#protodoc-title: Clusters]
// [#protodoc-title: CDS]
// Return list of all clusters this proxy will load balance to.
service ClusterDiscoveryService {
@ -46,809 +32,7 @@ service ClusterDiscoveryService {
}
}
// Configuration for a single upstream cluster.
// [#next-free-field: 46]
message Cluster {
// Refer to :ref:`service discovery type <arch_overview_service_discovery_types>`
// for an explanation on each type.
enum DiscoveryType {
// Refer to the :ref:`static discovery type<arch_overview_service_discovery_types_static>`
// for an explanation.
STATIC = 0;
// Refer to the :ref:`strict DNS discovery
// type<arch_overview_service_discovery_types_strict_dns>`
// for an explanation.
STRICT_DNS = 1;
// Refer to the :ref:`logical DNS discovery
// type<arch_overview_service_discovery_types_logical_dns>`
// for an explanation.
LOGICAL_DNS = 2;
// Refer to the :ref:`service discovery type<arch_overview_service_discovery_types_eds>`
// for an explanation.
EDS = 3;
// Refer to the :ref:`original destination discovery
// type<arch_overview_service_discovery_types_original_destination>`
// for an explanation.
ORIGINAL_DST = 4;
}
// Refer to :ref:`load balancer type <arch_overview_load_balancing_types>` architecture
// overview section for information on each type.
enum LbPolicy {
// Refer to the :ref:`round robin load balancing
// policy<arch_overview_load_balancing_types_round_robin>`
// for an explanation.
ROUND_ROBIN = 0;
// Refer to the :ref:`least request load balancing
// policy<arch_overview_load_balancing_types_least_request>`
// for an explanation.
LEAST_REQUEST = 1;
// Refer to the :ref:`ring hash load balancing
// policy<arch_overview_load_balancing_types_ring_hash>`
// for an explanation.
RING_HASH = 2;
// Refer to the :ref:`random load balancing
// policy<arch_overview_load_balancing_types_random>`
// for an explanation.
RANDOM = 3;
// Refer to the :ref:`original destination load balancing
// policy<arch_overview_load_balancing_types_original_destination>`
// for an explanation.
//
// .. attention::
//
// **This load balancing policy is deprecated**. Use CLUSTER_PROVIDED instead.
//
ORIGINAL_DST_LB = 4 [deprecated = true];
// Refer to the :ref:`Maglev load balancing policy<arch_overview_load_balancing_types_maglev>`
// for an explanation.
MAGLEV = 5;
// This load balancer type must be specified if the configured cluster provides a cluster
// specific load balancer. Consult the configured cluster's documentation for whether to set
// this option or not.
CLUSTER_PROVIDED = 6;
// [#not-implemented-hide:] Use the new :ref:`load_balancing_policy
// <envoy_api_field_Cluster.load_balancing_policy>` field to determine the LB policy.
// [#next-major-version: In the v3 API, we should consider deprecating the lb_policy field
// and instead using the new load_balancing_policy field as the one and only mechanism for
// configuring this.]
LOAD_BALANCING_POLICY_CONFIG = 7;
}
// When V4_ONLY is selected, the DNS resolver will only perform a lookup for
// addresses in the IPv4 family. If V6_ONLY is selected, the DNS resolver will
// only perform a lookup for addresses in the IPv6 family. If AUTO is
// specified, the DNS resolver will first perform a lookup for addresses in
// the IPv6 family and fallback to a lookup for addresses in the IPv4 family.
// For cluster types other than
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>` and
// :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`,
// this setting is
// ignored.
enum DnsLookupFamily {
AUTO = 0;
V4_ONLY = 1;
V6_ONLY = 2;
}
enum ClusterProtocolSelection {
// Cluster can only operate on one of the possible upstream protocols (HTTP1.1, HTTP2).
// If :ref:`http2_protocol_options <envoy_api_field_Cluster.http2_protocol_options>` are
// present, HTTP2 will be used, otherwise HTTP1.1 will be used.
USE_CONFIGURED_PROTOCOL = 0;
// Use HTTP1.1 or HTTP2, depending on which one is used on the downstream connection.
USE_DOWNSTREAM_PROTOCOL = 1;
}
// TransportSocketMatch specifies what transport socket config will be used
// when the match conditions are satisfied.
message TransportSocketMatch {
// The name of the match, used in stats generation.
string name = 1 [(validate.rules).string = {min_len: 1}];
// Optional endpoint metadata match criteria.
// The connection to the endpoint with metadata matching what is set in this field
// will use the transport socket configuration specified here.
// The endpoint's metadata entry in *envoy.transport_socket_match* is used to match
// against the values specified in this field.
google.protobuf.Struct match = 2;
// The configuration of the transport socket.
core.TransportSocket transport_socket = 3;
}
// Extended cluster type.
message CustomClusterType {
// The type of the cluster to instantiate. The name must match a supported cluster type.
string name = 1 [(validate.rules).string = {min_bytes: 1}];
// Cluster specific configuration which depends on the cluster being instantiated.
// See the supported cluster for further documentation.
google.protobuf.Any typed_config = 2;
}
// Only valid when discovery type is EDS.
message EdsClusterConfig {
// Configuration for the source of EDS updates for this Cluster.
core.ConfigSource eds_config = 1;
// Optional alternative to cluster name to present to EDS. This does not
// have the same restrictions as cluster name, i.e. it may be arbitrary
// length.
string service_name = 2;
}
// Optionally divide the endpoints in this cluster into subsets defined by
// endpoint metadata and selected by route and weighted cluster metadata.
// [#next-free-field: 8]
message LbSubsetConfig {
// If NO_FALLBACK is selected, a result
// equivalent to no healthy hosts is reported. If ANY_ENDPOINT is selected,
// any cluster endpoint may be returned (subject to policy, health checks,
// etc). If DEFAULT_SUBSET is selected, load balancing is performed over the
// endpoints matching the values from the default_subset field.
enum LbSubsetFallbackPolicy {
NO_FALLBACK = 0;
ANY_ENDPOINT = 1;
DEFAULT_SUBSET = 2;
}
// Specifications for subsets.
message LbSubsetSelector {
// Allows to override top level fallback policy per selector.
enum LbSubsetSelectorFallbackPolicy {
// If NOT_DEFINED top level config fallback policy is used instead.
NOT_DEFINED = 0;
// If NO_FALLBACK is selected, a result equivalent to no healthy hosts is reported.
NO_FALLBACK = 1;
// If ANY_ENDPOINT is selected, any cluster endpoint may be returned
// (subject to policy, health checks, etc).
ANY_ENDPOINT = 2;
// If DEFAULT_SUBSET is selected, load balancing is performed over the
// endpoints matching the values from the default_subset field.
DEFAULT_SUBSET = 3;
// If KEYS_SUBSET is selected, subset selector matching is performed again with metadata
// keys reduced to
// :ref:`fallback_keys_subset<envoy_api_field_Cluster.LbSubsetConfig.LbSubsetSelector.fallback_keys_subset>`.
// It allows for a fallback to a different, less specific selector if some of the keys of
// the selector are considered optional.
KEYS_SUBSET = 4;
}
// List of keys to match with the weighted cluster metadata.
repeated string keys = 1;
// The behavior used when no endpoint subset matches the selected route's
// metadata.
LbSubsetSelectorFallbackPolicy fallback_policy = 2
[(validate.rules).enum = {defined_only: true}];
// Subset of
// :ref:`keys<envoy_api_field_Cluster.LbSubsetConfig.LbSubsetSelector.keys>` used by
// :ref:`KEYS_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetSelector.LbSubsetSelectorFallbackPolicy.KEYS_SUBSET>`
// fallback policy.
// It has to be a non empty list if KEYS_SUBSET fallback policy is selected.
// For any other fallback policy the parameter is not used and should not be set.
// Only values also present in
// :ref:`keys<envoy_api_field_Cluster.LbSubsetConfig.LbSubsetSelector.keys>` are allowed, but
// `fallback_keys_subset` cannot be equal to `keys`.
repeated string fallback_keys_subset = 3;
}
// The behavior used when no endpoint subset matches the selected route's
// metadata. The value defaults to
// :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
LbSubsetFallbackPolicy fallback_policy = 1 [(validate.rules).enum = {defined_only: true}];
// Specifies the default subset of endpoints used during fallback if
// fallback_policy is
// :ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.
// Each field in default_subset is
// compared to the matching LbEndpoint.Metadata under the *envoy.lb*
// namespace. It is valid for no hosts to match, in which case the behavior
// is the same as a fallback_policy of
// :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
google.protobuf.Struct default_subset = 2;
// For each entry, LbEndpoint.Metadata's
// *envoy.lb* namespace is traversed and a subset is created for each unique
// combination of key and value. For example:
//
// .. code-block:: json
//
// { "subset_selectors": [
// { "keys": [ "version" ] },
// { "keys": [ "stage", "hardware_type" ] }
// ]}
//
// A subset is matched when the metadata from the selected route and
// weighted cluster contains the same keys and values as the subset's
// metadata. The same host may appear in multiple subsets.
repeated LbSubsetSelector subset_selectors = 3;
// If true, routing to subsets will take into account the localities and locality weights of the
// endpoints when making the routing decision.
//
// There are some potential pitfalls associated with enabling this feature, as the resulting
// traffic split after applying both a subset match and locality weights might be undesirable.
//
// Consider for example a situation in which you have 50/50 split across two localities X/Y
// which have 100 hosts each without subsetting. If the subset LB results in X having only 1
// host selected but Y having 100, then a lot more load is being dumped on the single host in X
// than originally anticipated in the load balancing assignment delivered via EDS.
bool locality_weight_aware = 4;
// When used with locality_weight_aware, scales the weight of each locality by the ratio
// of hosts in the subset vs hosts in the original subset. This aims to even out the load
// going to an individual locality if said locality is disproportionately affected by the
// subset predicate.
bool scale_locality_weight = 5;
// If true, when a fallback policy is configured and its corresponding subset fails to find
// a host this will cause any host to be selected instead.
//
// This is useful when using the default subset as the fallback policy, given the default
// subset might become empty. With this option enabled, if that happens the LB will attempt
// to select a host from the entire cluster.
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;
}
// Specific configuration for the LeastRequest load balancing policy.
message LeastRequestLbConfig {
// The number of random healthy hosts from which the host with the fewest active requests will
// be chosen. Defaults to 2 so that we perform two-choice selection if the field is not set.
google.protobuf.UInt32Value choice_count = 1 [(validate.rules).uint32 = {gte: 2}];
}
// Specific configuration for the :ref:`RingHash<arch_overview_load_balancing_types_ring_hash>`
// load balancing policy.
message RingHashLbConfig {
// The hash function used to hash hosts onto the ketama ring.
enum HashFunction {
// Use `xxHash <https://github.com/Cyan4973/xxHash>`_, this is the default hash function.
XX_HASH = 0;
// Use `MurmurHash2 <https://sites.google.com/site/murmurhash/>`_, this is compatible with
// std:hash<string> in GNU libstdc++ 3.4.20 or above. This is typically the case when compiled
// on Linux and not macOS.
MURMUR_HASH_2 = 1;
}
reserved 2;
// Minimum hash ring size. The larger the ring is (that is, the more hashes there are for each
// provided host) the better the request distribution will reflect the desired weights. Defaults
// to 1024 entries, and limited to 8M entries. See also
// :ref:`maximum_ring_size<envoy_api_field_Cluster.RingHashLbConfig.maximum_ring_size>`.
google.protobuf.UInt64Value minimum_ring_size = 1 [(validate.rules).uint64 = {lte: 8388608}];
// The hash function used to hash hosts onto the ketama ring. The value defaults to
// :ref:`XX_HASH<envoy_api_enum_value_Cluster.RingHashLbConfig.HashFunction.XX_HASH>`.
HashFunction hash_function = 3 [(validate.rules).enum = {defined_only: true}];
// Maximum hash ring size. Defaults to 8M entries, and limited to 8M entries, but can be lowered
// to further constrain resource use. See also
// :ref:`minimum_ring_size<envoy_api_field_Cluster.RingHashLbConfig.minimum_ring_size>`.
google.protobuf.UInt64Value maximum_ring_size = 4 [(validate.rules).uint64 = {lte: 8388608}];
}
// Specific configuration for the
// :ref:`Original Destination <arch_overview_load_balancing_types_original_destination>`
// load balancing policy.
message OriginalDstLbConfig {
// When true, :ref:`x-envoy-original-dst-host
// <config_http_conn_man_headers_x-envoy-original-dst-host>` can be used to override destination
// address.
//
// .. attention::
//
// This header isn't sanitized by default, so enabling this feature allows HTTP clients to
// route traffic to arbitrary hosts and/or ports, which may have serious security
// consequences.
bool use_http_header = 1;
}
// Common configuration for all load balancer implementations.
// [#next-free-field: 7]
message CommonLbConfig {
// Configuration for :ref:`zone aware routing
// <arch_overview_load_balancing_zone_aware_routing>`.
message ZoneAwareLbConfig {
// Configures percentage of requests that will be considered for zone aware routing
// if zone aware routing is configured. If not specified, the default is 100%.
// * :ref:`runtime values <config_cluster_manager_cluster_runtime_zone_routing>`.
// * :ref:`Zone aware routing support <arch_overview_load_balancing_zone_aware_routing>`.
type.Percent routing_enabled = 1;
// Configures minimum upstream cluster size required for zone aware routing
// If upstream cluster size is less than specified, zone aware routing is not performed
// even if zone aware routing is configured. If not specified, the default is 6.
// * :ref:`runtime values <config_cluster_manager_cluster_runtime_zone_routing>`.
// * :ref:`Zone aware routing support <arch_overview_load_balancing_zone_aware_routing>`.
google.protobuf.UInt64Value min_cluster_size = 2;
// If set to true, Envoy will not consider any hosts when the cluster is in :ref:`panic
// mode<arch_overview_load_balancing_panic_threshold>`. Instead, the cluster will fail all
// requests as if all hosts are unhealthy. This can help avoid potentially overwhelming a
// failing service.
bool fail_traffic_on_panic = 3;
}
// Configuration for :ref:`locality weighted load balancing
// <arch_overview_load_balancing_locality_weighted_lb>`
message LocalityWeightedLbConfig {
}
// Configures the :ref:`healthy panic threshold <arch_overview_load_balancing_panic_threshold>`.
// If not specified, the default is 50%.
// To disable panic mode, set to 0%.
//
// .. note::
// The specified percent will be truncated to the nearest 1%.
type.Percent healthy_panic_threshold = 1;
oneof locality_config_specifier {
ZoneAwareLbConfig zone_aware_lb_config = 2;
LocalityWeightedLbConfig locality_weighted_lb_config = 3;
}
// If set, all health check/weight/metadata updates that happen within this duration will be
// merged and delivered in one shot when the duration expires. The start of the duration is when
// the first update happens. This is useful for big clusters, with potentially noisy deploys
// that might trigger excessive CPU usage due to a constant stream of healthcheck state changes
// or metadata updates. The first set of updates to be seen apply immediately (e.g.: a new
// cluster). Please always keep in mind that the use of sandbox technologies may change this
// behavior.
//
// If this is not set, we default to a merge window of 1000ms. To disable it, set the merge
// window to 0.
//
// Note: merging does not apply to cluster membership changes (e.g.: adds/removes); this is
// because merging those updates isn't currently safe. See
// https://github.com/envoyproxy/envoy/pull/3941.
google.protobuf.Duration update_merge_window = 4;
// If set to true, Envoy will not consider new hosts when computing load balancing weights until
// they have been health checked for the first time. This will have no effect unless
// active health checking is also configured.
//
// Ignoring a host means that for any load balancing calculations that adjust weights based
// on the ratio of eligible hosts and total hosts (priority spillover, locality weighting and
// panic mode) Envoy will exclude these hosts in the denominator.
//
// For example, with hosts in two priorities P0 and P1, where P0 looks like
// {healthy, unhealthy (new), unhealthy (new)}
// and where P1 looks like
// {healthy, healthy}
// all traffic will still hit P0, as 1 / (3 - 2) = 1.
//
// Enabling this will allow scaling up the number of hosts for a given cluster without entering
// panic mode or triggering priority spillover, assuming the hosts pass the first health check.
//
// If panic mode is triggered, new hosts are still eligible for traffic; they simply do not
// contribute to the calculation when deciding whether panic mode is enabled or not.
bool ignore_new_hosts_until_first_hc = 5;
// If set to `true`, the cluster manager will drain all existing
// connections to upstream hosts whenever hosts are added or removed from the cluster.
bool close_connections_on_host_set_change = 6;
}
message RefreshRate {
// Specifies the base interval between refreshes. This parameter is required and must be greater
// than zero and less than
// :ref:`max_interval <envoy_api_field_Cluster.RefreshRate.max_interval>`.
google.protobuf.Duration base_interval = 1 [(validate.rules).duration = {
required: true
gt {nanos: 1000000}
}];
// Specifies the maximum interval between refreshes. This parameter is optional, but must be
// greater than or equal to the
// :ref:`base_interval <envoy_api_field_Cluster.RefreshRate.base_interval>` if set. The default
// is 10 times the :ref:`base_interval <envoy_api_field_Cluster.RefreshRate.base_interval>`.
google.protobuf.Duration max_interval = 2 [(validate.rules).duration = {gt {nanos: 1000000}}];
}
reserved 12, 15;
// Configuration to use different transport sockets for different endpoints.
// The entry of *envoy.transport_socket* in the
// :ref:`LbEndpoint.Metadata <envoy_api_field_endpoint.LbEndpoint.metadata>`
// is used to match against the transport sockets as they appear in the list. The first
// :ref:`match <envoy_api_msg_Cluster.TransportSocketMatch>` is used.
// For example, with the following match
//
// .. code-block:: yaml
//
// transport_socket_matches:
// - name: "enableMTLS"
// match:
// acceptMTLS: true
// transport_socket:
// name: envoy.transport_sockets.tls
// config: { ... } # tls socket configuration
// - name: "defaultToPlaintext"
// match: {}
// transport_socket:
// name: envoy.transport_sockets.raw_buffer
//
// Connections to the endpoints whose metadata value under *envoy.transport_socket*
// having "acceptMTLS"/"true" key/value pair use the "enableMTLS" socket configuration.
//
// If a :ref:`socket match <envoy_api_msg_Cluster.TransportSocketMatch>` with empty match
// criteria is provided, that always match any endpoint. For example, the "defaultToPlaintext"
// socket match in case above.
//
// If an endpoint metadata's value under *envoy.transport_socket* does not match any
// *TransportSocketMatch*, socket configuration fallbacks to use the *tls_context* or
// *transport_socket* specified in this cluster.
//
// This field allows gradual and flexible transport socket configuration changes.
//
// The metadata of endpoints in EDS can indicate transport socket capabilities. For example,
// an endpoint's metadata can have two key value pairs as "acceptMTLS": "true",
// "acceptPlaintext": "true". While some other endpoints, only accepting plaintext traffic
// has "acceptPlaintext": "true" metadata information.
//
// Then the xDS server can configure the CDS to a client, Envoy A, to send mutual TLS
// traffic for endpoints with "acceptMTLS": "true", by adding a corresponding
// *TransportSocketMatch* in this field. Other client Envoys receive CDS without
// *transport_socket_match* set, and still send plain text traffic to the same cluster.
//
// [#comment:TODO(incfly): add a detailed architecture doc on intended usage.]
repeated TransportSocketMatch transport_socket_matches = 43;
// Supplies the name of the cluster which must be unique across all clusters.
// The cluster name is used when emitting
// :ref:`statistics <config_cluster_manager_cluster_stats>` if :ref:`alt_stat_name
// <envoy_api_field_Cluster.alt_stat_name>` is not provided.
// Any ``:`` in the cluster name will be converted to ``_`` when emitting statistics.
string name = 1 [(validate.rules).string = {min_bytes: 1}];
// An optional alternative to the cluster name to be used while emitting stats.
// Any ``:`` in the name will be converted to ``_`` when emitting statistics. This should not be
// confused with :ref:`Router Filter Header
// <config_http_filters_router_x-envoy-upstream-alt-stat-name>`.
string alt_stat_name = 28;
oneof cluster_discovery_type {
// The :ref:`service discovery type <arch_overview_service_discovery_types>`
// to use for resolving the cluster.
DiscoveryType type = 2 [(validate.rules).enum = {defined_only: true}];
// The custom cluster type.
CustomClusterType cluster_type = 38;
}
// Configuration to use for EDS updates for the Cluster.
EdsClusterConfig eds_cluster_config = 3;
// The timeout for new network connections to hosts in the cluster.
google.protobuf.Duration connect_timeout = 4 [(validate.rules).duration = {gt {}}];
// Soft limit on size of the clusters connections read and write buffers. If
// unspecified, an implementation defined default is applied (1MiB).
google.protobuf.UInt32Value per_connection_buffer_limit_bytes = 5;
// The :ref:`load balancer type <arch_overview_load_balancing_types>` to use
// when picking a host in the cluster.
LbPolicy lb_policy = 6 [(validate.rules).enum = {defined_only: true}];
// If the service discovery type is
// :ref:`STATIC<envoy_api_enum_value_Cluster.DiscoveryType.STATIC>`,
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`
// or :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`,
// then hosts is required.
//
// .. attention::
//
// **This field is deprecated**. Set the
// :ref:`load_assignment<envoy_api_field_Cluster.load_assignment>` field instead.
//
repeated core.Address hosts = 7;
// Setting this is required for specifying members of
// :ref:`STATIC<envoy_api_enum_value_Cluster.DiscoveryType.STATIC>`,
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`
// or :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>` clusters.
// This field supersedes :ref:`hosts<envoy_api_field_Cluster.hosts>` field.
// [#comment:TODO(dio): Deprecate the hosts field and add it to :ref:`deprecated log<deprecated>`
// once load_assignment is implemented.]
//
// .. attention::
//
// Setting this allows non-EDS cluster types to contain embedded EDS equivalent
// :ref:`endpoint assignments<envoy_api_msg_ClusterLoadAssignment>`.
// Setting this overrides :ref:`hosts<envoy_api_field_Cluster.hosts>` values.
//
ClusterLoadAssignment load_assignment = 33;
// Optional :ref:`active health checking <arch_overview_health_checking>`
// configuration for the cluster. If no
// configuration is specified no health checking will be done and all cluster
// members will be considered healthy at all times.
repeated core.HealthCheck health_checks = 8;
// Optional maximum requests for a single upstream connection. This parameter
// is respected by both the HTTP/1.1 and HTTP/2 connection pool
// implementations. If not specified, there is no limit. Setting this
// parameter to 1 will effectively disable keep alive.
google.protobuf.UInt32Value max_requests_per_connection = 9;
// Optional :ref:`circuit breaking <arch_overview_circuit_break>` for the cluster.
cluster.CircuitBreakers circuit_breakers = 10;
// The TLS configuration for connections to the upstream cluster.
//
// .. attention::
//
// **This field is deprecated**. Use `transport_socket` with name `tls` instead. If both are
// set, `transport_socket` takes priority.
auth.UpstreamTlsContext tls_context = 11 [deprecated = true];
// Additional options when handling HTTP requests upstream. These options will be applicable to
// both HTTP1 and HTTP2 requests.
core.HttpProtocolOptions common_http_protocol_options = 29;
// Additional options when handling HTTP1 requests.
core.Http1ProtocolOptions http_protocol_options = 13;
// Even if default HTTP2 protocol options are desired, this field must be
// set so that Envoy will assume that the upstream supports HTTP/2 when
// making new HTTP connection pool connections. Currently, Envoy only
// supports prior knowledge for upstream connections. Even if TLS is used
// with ALPN, `http2_protocol_options` must be specified. As an aside this allows HTTP/2
// connections to happen over plain text.
core.Http2ProtocolOptions http2_protocol_options = 14;
// The extension_protocol_options field is used to provide extension-specific protocol options
// for upstream connections. The key should match the extension filter name, such as
// "envoy.filters.network.thrift_proxy". See the extension's documentation for details on
// specific options.
map<string, google.protobuf.Struct> extension_protocol_options = 35 [deprecated = true];
// The extension_protocol_options field is used to provide extension-specific protocol options
// for upstream connections. The key should match the extension filter name, such as
// "envoy.filters.network.thrift_proxy". See the extension's documentation for details on
// specific options.
map<string, google.protobuf.Any> typed_extension_protocol_options = 36;
// If the DNS refresh rate is specified and the cluster type is either
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`,
// or :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`,
// this value is used as the clusters DNS refresh
// rate. The value configured must be at least 1ms. If this setting is not specified, the
// value defaults to 5000ms. For cluster types other than
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`
// and :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`
// this setting is ignored.
google.protobuf.Duration dns_refresh_rate = 16
[(validate.rules).duration = {gt {nanos: 1000000}}];
// If the DNS failure refresh rate is specified and the cluster type is either
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`,
// or :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`,
// this is used as the clusters DNS refresh rate when requests are failing. If this setting is
// not specified, the failure refresh rate defaults to the DNS refresh rate. For cluster types
// other than :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>` and
// :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>` this setting is
// ignored.
//
// Note: Currently, DNS failures and empty DNS responses are not treated differently and this
// configuration is applied in both situations.
RefreshRate dns_failure_refresh_rate = 44;
// Optional configuration for setting cluster's DNS refresh rate. If the value is set to true,
// cluster's DNS refresh rate will be set to resource record's TTL which comes from DNS
// resolution.
bool respect_dns_ttl = 39;
// The DNS IP address resolution policy. If this setting is not specified, the
// value defaults to
// :ref:`AUTO<envoy_api_enum_value_Cluster.DnsLookupFamily.AUTO>`.
DnsLookupFamily dns_lookup_family = 17 [(validate.rules).enum = {defined_only: true}];
// If DNS resolvers are specified and the cluster type is either
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`,
// or :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`,
// this value is used to specify the clusters dns resolvers.
// If this setting is not specified, the value defaults to the default
// resolver, which uses /etc/resolv.conf for configuration. For cluster types
// other than
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`
// and :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`
// this setting is ignored.
repeated core.Address dns_resolvers = 18;
// [#next-major-version: Reconcile DNS options in a single message.]
// Always use TCP queries instead of UDP queries for DNS lookups.
bool use_tcp_for_dns_lookups = 45;
// If specified, outlier detection will be enabled for this upstream cluster.
// Each of the configuration values can be overridden via
// :ref:`runtime values <config_cluster_manager_cluster_runtime_outlier_detection>`.
cluster.OutlierDetection outlier_detection = 19;
// The interval for removing stale hosts from a cluster type
// :ref:`ORIGINAL_DST<envoy_api_enum_value_Cluster.DiscoveryType.ORIGINAL_DST>`.
// Hosts are considered stale if they have not been used
// as upstream destinations during this interval. New hosts are added
// to original destination clusters on demand as new connections are
// redirected to Envoy, causing the number of hosts in the cluster to
// grow over time. Hosts that are not stale (they are actively used as
// destinations) are kept in the cluster, which allows connections to
// them remain open, saving the latency that would otherwise be spent
// on opening new connections. If this setting is not specified, the
// value defaults to 5000ms. For cluster types other than
// :ref:`ORIGINAL_DST<envoy_api_enum_value_Cluster.DiscoveryType.ORIGINAL_DST>`
// this setting is ignored.
google.protobuf.Duration cleanup_interval = 20 [(validate.rules).duration = {gt {}}];
// Optional configuration used to bind newly established upstream connections.
// This overrides any bind_config specified in the bootstrap proto.
// If the address and port are empty, no bind will be performed.
core.BindConfig upstream_bind_config = 21;
// Configuration for load balancing subsetting.
LbSubsetConfig lb_subset_config = 22;
// Optional configuration for the load balancing algorithm selected by
// LbPolicy. Currently only
// :ref:`RING_HASH<envoy_api_enum_value_Cluster.LbPolicy.RING_HASH>` and
// :ref:`LEAST_REQUEST<envoy_api_enum_value_Cluster.LbPolicy.LEAST_REQUEST>`
// has additional configuration options.
// Specifying ring_hash_lb_config or least_request_lb_config without setting the corresponding
// LbPolicy will generate an error at runtime.
oneof lb_config {
// Optional configuration for the Ring Hash load balancing policy.
RingHashLbConfig ring_hash_lb_config = 23;
// Optional configuration for the Original Destination load balancing policy.
OriginalDstLbConfig original_dst_lb_config = 34;
// Optional configuration for the LeastRequest load balancing policy.
LeastRequestLbConfig least_request_lb_config = 37;
}
// Common configuration for all load balancer implementations.
CommonLbConfig common_lb_config = 27;
// Optional custom transport socket implementation to use for upstream connections.
// To setup TLS, set a transport socket with name `tls` and
// :ref:`UpstreamTlsContexts <envoy_api_msg_auth.UpstreamTlsContext>` in the `typed_config`.
// If no transport socket configuration is specified, new connections
// will be set up with plaintext.
core.TransportSocket transport_socket = 24;
// The Metadata field can be used to provide additional information about the
// cluster. It can be used for stats, logging, and varying filter behavior.
// Fields should use reverse DNS notation to denote which entity within Envoy
// will need the information. For instance, if the metadata is intended for
// the Router filter, the filter name should be specified as *envoy.router*.
core.Metadata metadata = 25;
// Determines how Envoy selects the protocol used to speak to upstream hosts.
ClusterProtocolSelection protocol_selection = 26;
// Optional options for upstream connections.
UpstreamConnectionOptions upstream_connection_options = 30;
// If an upstream host becomes unhealthy (as determined by the configured health checks
// or outlier detection), immediately close all connections to the failed host.
//
// .. note::
//
// This is currently only supported for connections created by tcp_proxy.
//
// .. note::
//
// The current implementation of this feature closes all connections immediately when
// the unhealthy status is detected. If there are a large number of connections open
// to an upstream host that becomes unhealthy, Envoy may spend a substantial amount of
// time exclusively closing these connections, and not processing any other traffic.
bool close_connections_on_host_health_failure = 31;
// If set to true, Envoy will ignore the health value of a host when processing its removal
// from service discovery. This means that if active health checking is used, Envoy will *not*
// wait for the endpoint to go unhealthy before removing it.
bool drain_connections_on_host_removal = 32
[(udpa.annotations.field_migrate).rename = "ignore_health_on_host_removal"];
// An (optional) network filter chain, listed in the order the filters should be applied.
// The chain will be applied to all outgoing connections that Envoy makes to the upstream
// servers of this cluster.
repeated cluster.Filter filters = 40;
// [#not-implemented-hide:] New mechanism for LB policy configuration. Used only if the
// :ref:`lb_policy<envoy_api_field_Cluster.lb_policy>` field has the value
// :ref:`LOAD_BALANCING_POLICY_CONFIG<envoy_api_enum_value_Cluster.LbPolicy.LOAD_BALANCING_POLICY_CONFIG>`.
LoadBalancingPolicy load_balancing_policy = 41;
// [#not-implemented-hide:]
// If present, tells the client where to send load reports via LRS. If not present, the
// client will fall back to a client-side default, which may be either (a) don't send any
// load reports or (b) send load reports for all clusters to a single default server
// (which may be configured in the bootstrap file).
//
// Note that if multiple clusters point to the same LRS server, the client may choose to
// create a separate stream for each cluster or it may choose to coalesce the data for
// multiple clusters onto a single stream. Either way, the client must make sure to send
// the data for any given cluster on no more than one stream.
//
// [#next-major-version: In the v3 API, we should consider restructuring this somehow,
// maybe by allowing LRS to go on the ADS stream, or maybe by moving some of the negotiation
// from the LRS stream here.]
core.ConfigSource lrs_server = 42;
}
// [#not-implemented-hide:] Extensible load balancing policy configuration.
//
// Every LB policy defined via this mechanism will be identified via a unique name using reverse
// DNS notation. If the policy needs configuration parameters, it must define a message for its
// own configuration, which will be stored in the config field. The name of the policy will tell
// clients which type of message they should expect to see in the config field.
//
// Note that there are cases where it is useful to be able to independently select LB policies
// for choosing a locality and for choosing an endpoint within that locality. For example, a
// given deployment may always use the same policy to choose the locality, but for choosing the
// endpoint within the locality, some clusters may use weighted-round-robin, while others may
// use some sort of session-based balancing.
//
// This can be accomplished via hierarchical LB policies, where the parent LB policy creates a
// child LB policy for each locality. For each request, the parent chooses the locality and then
// delegates to the child policy for that locality to choose the endpoint within the locality.
//
// To facilitate this, the config message for the top-level LB policy may include a field of
// type LoadBalancingPolicy that specifies the child policy.
message LoadBalancingPolicy {
message Policy {
// Required. The name of the LB policy.
string name = 1;
// Optional config for the LB policy.
// No more than one of these two fields may be populated.
google.protobuf.Struct config = 2 [deprecated = true];
google.protobuf.Any typed_config = 3;
}
// Each client will iterate over the list in order and stop at the first policy that it
// supports. This provides a mechanism for starting to use new LB policies that are not yet
// supported by all clients.
repeated Policy policies = 1;
}
// An extensible structure containing the address Envoy should bind to when
// establishing upstream connections.
message UpstreamBindConfig {
// The address Envoy should bind to when establishing upstream connections.
core.Address source_address = 1;
}
message UpstreamConnectionOptions {
// If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
core.TcpKeepalive tcp_keepalive = 1;
// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing
// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file.
message CdsDummy {
}

@ -0,0 +1,837 @@
syntax = "proto3";
package envoy.api.v2;
import "envoy/api/v2/auth/cert.proto";
import "envoy/api/v2/cluster/circuit_breaker.proto";
import "envoy/api/v2/cluster/filter.proto";
import "envoy/api/v2/cluster/outlier_detection.proto";
import "envoy/api/v2/core/address.proto";
import "envoy/api/v2/core/base.proto";
import "envoy/api/v2/core/config_source.proto";
import "envoy/api/v2/core/health_check.proto";
import "envoy/api/v2/core/protocol.proto";
import "envoy/api/v2/endpoint.proto";
import "envoy/type/percent.proto";
import "google/protobuf/any.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto";
import "udpa/annotations/migrate.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.api.v2";
option java_outer_classname = "ClusterProto";
option java_multiple_files = true;
option (udpa.annotations.file_migrate).move_to_package = "envoy.config.cluster.v3alpha";
// [#protodoc-title: Cluster configuration]
// Configuration for a single upstream cluster.
// [#next-free-field: 46]
message Cluster {
// Refer to :ref:`service discovery type <arch_overview_service_discovery_types>`
// for an explanation on each type.
enum DiscoveryType {
// Refer to the :ref:`static discovery type<arch_overview_service_discovery_types_static>`
// for an explanation.
STATIC = 0;
// Refer to the :ref:`strict DNS discovery
// type<arch_overview_service_discovery_types_strict_dns>`
// for an explanation.
STRICT_DNS = 1;
// Refer to the :ref:`logical DNS discovery
// type<arch_overview_service_discovery_types_logical_dns>`
// for an explanation.
LOGICAL_DNS = 2;
// Refer to the :ref:`service discovery type<arch_overview_service_discovery_types_eds>`
// for an explanation.
EDS = 3;
// Refer to the :ref:`original destination discovery
// type<arch_overview_service_discovery_types_original_destination>`
// for an explanation.
ORIGINAL_DST = 4;
}
// Refer to :ref:`load balancer type <arch_overview_load_balancing_types>` architecture
// overview section for information on each type.
enum LbPolicy {
// Refer to the :ref:`round robin load balancing
// policy<arch_overview_load_balancing_types_round_robin>`
// for an explanation.
ROUND_ROBIN = 0;
// Refer to the :ref:`least request load balancing
// policy<arch_overview_load_balancing_types_least_request>`
// for an explanation.
LEAST_REQUEST = 1;
// Refer to the :ref:`ring hash load balancing
// policy<arch_overview_load_balancing_types_ring_hash>`
// for an explanation.
RING_HASH = 2;
// Refer to the :ref:`random load balancing
// policy<arch_overview_load_balancing_types_random>`
// for an explanation.
RANDOM = 3;
// Refer to the :ref:`original destination load balancing
// policy<arch_overview_load_balancing_types_original_destination>`
// for an explanation.
//
// .. attention::
//
// **This load balancing policy is deprecated**. Use CLUSTER_PROVIDED instead.
//
ORIGINAL_DST_LB = 4 [deprecated = true];
// Refer to the :ref:`Maglev load balancing policy<arch_overview_load_balancing_types_maglev>`
// for an explanation.
MAGLEV = 5;
// This load balancer type must be specified if the configured cluster provides a cluster
// specific load balancer. Consult the configured cluster's documentation for whether to set
// this option or not.
CLUSTER_PROVIDED = 6;
// [#not-implemented-hide:] Use the new :ref:`load_balancing_policy
// <envoy_api_field_Cluster.load_balancing_policy>` field to determine the LB policy.
// [#next-major-version: In the v3 API, we should consider deprecating the lb_policy field
// and instead using the new load_balancing_policy field as the one and only mechanism for
// configuring this.]
LOAD_BALANCING_POLICY_CONFIG = 7;
}
// When V4_ONLY is selected, the DNS resolver will only perform a lookup for
// addresses in the IPv4 family. If V6_ONLY is selected, the DNS resolver will
// only perform a lookup for addresses in the IPv6 family. If AUTO is
// specified, the DNS resolver will first perform a lookup for addresses in
// the IPv6 family and fallback to a lookup for addresses in the IPv4 family.
// For cluster types other than
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>` and
// :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`,
// this setting is
// ignored.
enum DnsLookupFamily {
AUTO = 0;
V4_ONLY = 1;
V6_ONLY = 2;
}
enum ClusterProtocolSelection {
// Cluster can only operate on one of the possible upstream protocols (HTTP1.1, HTTP2).
// If :ref:`http2_protocol_options <envoy_api_field_Cluster.http2_protocol_options>` are
// present, HTTP2 will be used, otherwise HTTP1.1 will be used.
USE_CONFIGURED_PROTOCOL = 0;
// Use HTTP1.1 or HTTP2, depending on which one is used on the downstream connection.
USE_DOWNSTREAM_PROTOCOL = 1;
}
// TransportSocketMatch specifies what transport socket config will be used
// when the match conditions are satisfied.
message TransportSocketMatch {
// The name of the match, used in stats generation.
string name = 1 [(validate.rules).string = {min_len: 1}];
// Optional endpoint metadata match criteria.
// The connection to the endpoint with metadata matching what is set in this field
// will use the transport socket configuration specified here.
// The endpoint's metadata entry in *envoy.transport_socket_match* is used to match
// against the values specified in this field.
google.protobuf.Struct match = 2;
// The configuration of the transport socket.
core.TransportSocket transport_socket = 3;
}
// Extended cluster type.
message CustomClusterType {
// The type of the cluster to instantiate. The name must match a supported cluster type.
string name = 1 [(validate.rules).string = {min_bytes: 1}];
// Cluster specific configuration which depends on the cluster being instantiated.
// See the supported cluster for further documentation.
google.protobuf.Any typed_config = 2;
}
// Only valid when discovery type is EDS.
message EdsClusterConfig {
// Configuration for the source of EDS updates for this Cluster.
core.ConfigSource eds_config = 1;
// Optional alternative to cluster name to present to EDS. This does not
// have the same restrictions as cluster name, i.e. it may be arbitrary
// length.
string service_name = 2;
}
// Optionally divide the endpoints in this cluster into subsets defined by
// endpoint metadata and selected by route and weighted cluster metadata.
// [#next-free-field: 8]
message LbSubsetConfig {
// If NO_FALLBACK is selected, a result
// equivalent to no healthy hosts is reported. If ANY_ENDPOINT is selected,
// any cluster endpoint may be returned (subject to policy, health checks,
// etc). If DEFAULT_SUBSET is selected, load balancing is performed over the
// endpoints matching the values from the default_subset field.
enum LbSubsetFallbackPolicy {
NO_FALLBACK = 0;
ANY_ENDPOINT = 1;
DEFAULT_SUBSET = 2;
}
// Specifications for subsets.
message LbSubsetSelector {
// Allows to override top level fallback policy per selector.
enum LbSubsetSelectorFallbackPolicy {
// If NOT_DEFINED top level config fallback policy is used instead.
NOT_DEFINED = 0;
// If NO_FALLBACK is selected, a result equivalent to no healthy hosts is reported.
NO_FALLBACK = 1;
// If ANY_ENDPOINT is selected, any cluster endpoint may be returned
// (subject to policy, health checks, etc).
ANY_ENDPOINT = 2;
// If DEFAULT_SUBSET is selected, load balancing is performed over the
// endpoints matching the values from the default_subset field.
DEFAULT_SUBSET = 3;
// If KEYS_SUBSET is selected, subset selector matching is performed again with metadata
// keys reduced to
// :ref:`fallback_keys_subset<envoy_api_field_Cluster.LbSubsetConfig.LbSubsetSelector.fallback_keys_subset>`.
// It allows for a fallback to a different, less specific selector if some of the keys of
// the selector are considered optional.
KEYS_SUBSET = 4;
}
// List of keys to match with the weighted cluster metadata.
repeated string keys = 1;
// The behavior used when no endpoint subset matches the selected route's
// metadata.
LbSubsetSelectorFallbackPolicy fallback_policy = 2
[(validate.rules).enum = {defined_only: true}];
// Subset of
// :ref:`keys<envoy_api_field_Cluster.LbSubsetConfig.LbSubsetSelector.keys>` used by
// :ref:`KEYS_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetSelector.LbSubsetSelectorFallbackPolicy.KEYS_SUBSET>`
// fallback policy.
// It has to be a non empty list if KEYS_SUBSET fallback policy is selected.
// For any other fallback policy the parameter is not used and should not be set.
// Only values also present in
// :ref:`keys<envoy_api_field_Cluster.LbSubsetConfig.LbSubsetSelector.keys>` are allowed, but
// `fallback_keys_subset` cannot be equal to `keys`.
repeated string fallback_keys_subset = 3;
}
// The behavior used when no endpoint subset matches the selected route's
// metadata. The value defaults to
// :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
LbSubsetFallbackPolicy fallback_policy = 1 [(validate.rules).enum = {defined_only: true}];
// Specifies the default subset of endpoints used during fallback if
// fallback_policy is
// :ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.
// Each field in default_subset is
// compared to the matching LbEndpoint.Metadata under the *envoy.lb*
// namespace. It is valid for no hosts to match, in which case the behavior
// is the same as a fallback_policy of
// :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
google.protobuf.Struct default_subset = 2;
// For each entry, LbEndpoint.Metadata's
// *envoy.lb* namespace is traversed and a subset is created for each unique
// combination of key and value. For example:
//
// .. code-block:: json
//
// { "subset_selectors": [
// { "keys": [ "version" ] },
// { "keys": [ "stage", "hardware_type" ] }
// ]}
//
// A subset is matched when the metadata from the selected route and
// weighted cluster contains the same keys and values as the subset's
// metadata. The same host may appear in multiple subsets.
repeated LbSubsetSelector subset_selectors = 3;
// If true, routing to subsets will take into account the localities and locality weights of the
// endpoints when making the routing decision.
//
// There are some potential pitfalls associated with enabling this feature, as the resulting
// traffic split after applying both a subset match and locality weights might be undesirable.
//
// Consider for example a situation in which you have 50/50 split across two localities X/Y
// which have 100 hosts each without subsetting. If the subset LB results in X having only 1
// host selected but Y having 100, then a lot more load is being dumped on the single host in X
// than originally anticipated in the load balancing assignment delivered via EDS.
bool locality_weight_aware = 4;
// When used with locality_weight_aware, scales the weight of each locality by the ratio
// of hosts in the subset vs hosts in the original subset. This aims to even out the load
// going to an individual locality if said locality is disproportionately affected by the
// subset predicate.
bool scale_locality_weight = 5;
// If true, when a fallback policy is configured and its corresponding subset fails to find
// a host this will cause any host to be selected instead.
//
// This is useful when using the default subset as the fallback policy, given the default
// subset might become empty. With this option enabled, if that happens the LB will attempt
// to select a host from the entire cluster.
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;
}
// Specific configuration for the LeastRequest load balancing policy.
message LeastRequestLbConfig {
// The number of random healthy hosts from which the host with the fewest active requests will
// be chosen. Defaults to 2 so that we perform two-choice selection if the field is not set.
google.protobuf.UInt32Value choice_count = 1 [(validate.rules).uint32 = {gte: 2}];
}
// Specific configuration for the :ref:`RingHash<arch_overview_load_balancing_types_ring_hash>`
// load balancing policy.
message RingHashLbConfig {
// The hash function used to hash hosts onto the ketama ring.
enum HashFunction {
// Use `xxHash <https://github.com/Cyan4973/xxHash>`_, this is the default hash function.
XX_HASH = 0;
// Use `MurmurHash2 <https://sites.google.com/site/murmurhash/>`_, this is compatible with
// std:hash<string> in GNU libstdc++ 3.4.20 or above. This is typically the case when compiled
// on Linux and not macOS.
MURMUR_HASH_2 = 1;
}
reserved 2;
// Minimum hash ring size. The larger the ring is (that is, the more hashes there are for each
// provided host) the better the request distribution will reflect the desired weights. Defaults
// to 1024 entries, and limited to 8M entries. See also
// :ref:`maximum_ring_size<envoy_api_field_Cluster.RingHashLbConfig.maximum_ring_size>`.
google.protobuf.UInt64Value minimum_ring_size = 1 [(validate.rules).uint64 = {lte: 8388608}];
// The hash function used to hash hosts onto the ketama ring. The value defaults to
// :ref:`XX_HASH<envoy_api_enum_value_Cluster.RingHashLbConfig.HashFunction.XX_HASH>`.
HashFunction hash_function = 3 [(validate.rules).enum = {defined_only: true}];
// Maximum hash ring size. Defaults to 8M entries, and limited to 8M entries, but can be lowered
// to further constrain resource use. See also
// :ref:`minimum_ring_size<envoy_api_field_Cluster.RingHashLbConfig.minimum_ring_size>`.
google.protobuf.UInt64Value maximum_ring_size = 4 [(validate.rules).uint64 = {lte: 8388608}];
}
// Specific configuration for the
// :ref:`Original Destination <arch_overview_load_balancing_types_original_destination>`
// load balancing policy.
message OriginalDstLbConfig {
// When true, :ref:`x-envoy-original-dst-host
// <config_http_conn_man_headers_x-envoy-original-dst-host>` can be used to override destination
// address.
//
// .. attention::
//
// This header isn't sanitized by default, so enabling this feature allows HTTP clients to
// route traffic to arbitrary hosts and/or ports, which may have serious security
// consequences.
bool use_http_header = 1;
}
// Common configuration for all load balancer implementations.
// [#next-free-field: 7]
message CommonLbConfig {
// Configuration for :ref:`zone aware routing
// <arch_overview_load_balancing_zone_aware_routing>`.
message ZoneAwareLbConfig {
// Configures percentage of requests that will be considered for zone aware routing
// if zone aware routing is configured. If not specified, the default is 100%.
// * :ref:`runtime values <config_cluster_manager_cluster_runtime_zone_routing>`.
// * :ref:`Zone aware routing support <arch_overview_load_balancing_zone_aware_routing>`.
type.Percent routing_enabled = 1;
// Configures minimum upstream cluster size required for zone aware routing
// If upstream cluster size is less than specified, zone aware routing is not performed
// even if zone aware routing is configured. If not specified, the default is 6.
// * :ref:`runtime values <config_cluster_manager_cluster_runtime_zone_routing>`.
// * :ref:`Zone aware routing support <arch_overview_load_balancing_zone_aware_routing>`.
google.protobuf.UInt64Value min_cluster_size = 2;
// If set to true, Envoy will not consider any hosts when the cluster is in :ref:`panic
// mode<arch_overview_load_balancing_panic_threshold>`. Instead, the cluster will fail all
// requests as if all hosts are unhealthy. This can help avoid potentially overwhelming a
// failing service.
bool fail_traffic_on_panic = 3;
}
// Configuration for :ref:`locality weighted load balancing
// <arch_overview_load_balancing_locality_weighted_lb>`
message LocalityWeightedLbConfig {
}
// Configures the :ref:`healthy panic threshold <arch_overview_load_balancing_panic_threshold>`.
// If not specified, the default is 50%.
// To disable panic mode, set to 0%.
//
// .. note::
// The specified percent will be truncated to the nearest 1%.
type.Percent healthy_panic_threshold = 1;
oneof locality_config_specifier {
ZoneAwareLbConfig zone_aware_lb_config = 2;
LocalityWeightedLbConfig locality_weighted_lb_config = 3;
}
// If set, all health check/weight/metadata updates that happen within this duration will be
// merged and delivered in one shot when the duration expires. The start of the duration is when
// the first update happens. This is useful for big clusters, with potentially noisy deploys
// that might trigger excessive CPU usage due to a constant stream of healthcheck state changes
// or metadata updates. The first set of updates to be seen apply immediately (e.g.: a new
// cluster). Please always keep in mind that the use of sandbox technologies may change this
// behavior.
//
// If this is not set, we default to a merge window of 1000ms. To disable it, set the merge
// window to 0.
//
// Note: merging does not apply to cluster membership changes (e.g.: adds/removes); this is
// because merging those updates isn't currently safe. See
// https://github.com/envoyproxy/envoy/pull/3941.
google.protobuf.Duration update_merge_window = 4;
// If set to true, Envoy will not consider new hosts when computing load balancing weights until
// they have been health checked for the first time. This will have no effect unless
// active health checking is also configured.
//
// Ignoring a host means that for any load balancing calculations that adjust weights based
// on the ratio of eligible hosts and total hosts (priority spillover, locality weighting and
// panic mode) Envoy will exclude these hosts in the denominator.
//
// For example, with hosts in two priorities P0 and P1, where P0 looks like
// {healthy, unhealthy (new), unhealthy (new)}
// and where P1 looks like
// {healthy, healthy}
// all traffic will still hit P0, as 1 / (3 - 2) = 1.
//
// Enabling this will allow scaling up the number of hosts for a given cluster without entering
// panic mode or triggering priority spillover, assuming the hosts pass the first health check.
//
// If panic mode is triggered, new hosts are still eligible for traffic; they simply do not
// contribute to the calculation when deciding whether panic mode is enabled or not.
bool ignore_new_hosts_until_first_hc = 5;
// If set to `true`, the cluster manager will drain all existing
// connections to upstream hosts whenever hosts are added or removed from the cluster.
bool close_connections_on_host_set_change = 6;
}
message RefreshRate {
// Specifies the base interval between refreshes. This parameter is required and must be greater
// than zero and less than
// :ref:`max_interval <envoy_api_field_Cluster.RefreshRate.max_interval>`.
google.protobuf.Duration base_interval = 1 [(validate.rules).duration = {
required: true
gt {nanos: 1000000}
}];
// Specifies the maximum interval between refreshes. This parameter is optional, but must be
// greater than or equal to the
// :ref:`base_interval <envoy_api_field_Cluster.RefreshRate.base_interval>` if set. The default
// is 10 times the :ref:`base_interval <envoy_api_field_Cluster.RefreshRate.base_interval>`.
google.protobuf.Duration max_interval = 2 [(validate.rules).duration = {gt {nanos: 1000000}}];
}
reserved 12, 15;
// Configuration to use different transport sockets for different endpoints.
// The entry of *envoy.transport_socket* in the
// :ref:`LbEndpoint.Metadata <envoy_api_field_endpoint.LbEndpoint.metadata>`
// is used to match against the transport sockets as they appear in the list. The first
// :ref:`match <envoy_api_msg_Cluster.TransportSocketMatch>` is used.
// For example, with the following match
//
// .. code-block:: yaml
//
// transport_socket_matches:
// - name: "enableMTLS"
// match:
// acceptMTLS: true
// transport_socket:
// name: envoy.transport_sockets.tls
// config: { ... } # tls socket configuration
// - name: "defaultToPlaintext"
// match: {}
// transport_socket:
// name: envoy.transport_sockets.raw_buffer
//
// Connections to the endpoints whose metadata value under *envoy.transport_socket*
// having "acceptMTLS"/"true" key/value pair use the "enableMTLS" socket configuration.
//
// If a :ref:`socket match <envoy_api_msg_Cluster.TransportSocketMatch>` with empty match
// criteria is provided, that always match any endpoint. For example, the "defaultToPlaintext"
// socket match in case above.
//
// If an endpoint metadata's value under *envoy.transport_socket* does not match any
// *TransportSocketMatch*, socket configuration fallbacks to use the *tls_context* or
// *transport_socket* specified in this cluster.
//
// This field allows gradual and flexible transport socket configuration changes.
//
// The metadata of endpoints in EDS can indicate transport socket capabilities. For example,
// an endpoint's metadata can have two key value pairs as "acceptMTLS": "true",
// "acceptPlaintext": "true". While some other endpoints, only accepting plaintext traffic
// has "acceptPlaintext": "true" metadata information.
//
// Then the xDS server can configure the CDS to a client, Envoy A, to send mutual TLS
// traffic for endpoints with "acceptMTLS": "true", by adding a corresponding
// *TransportSocketMatch* in this field. Other client Envoys receive CDS without
// *transport_socket_match* set, and still send plain text traffic to the same cluster.
//
// [#comment:TODO(incfly): add a detailed architecture doc on intended usage.]
repeated TransportSocketMatch transport_socket_matches = 43;
// Supplies the name of the cluster which must be unique across all clusters.
// The cluster name is used when emitting
// :ref:`statistics <config_cluster_manager_cluster_stats>` if :ref:`alt_stat_name
// <envoy_api_field_Cluster.alt_stat_name>` is not provided.
// Any ``:`` in the cluster name will be converted to ``_`` when emitting statistics.
string name = 1 [(validate.rules).string = {min_bytes: 1}];
// An optional alternative to the cluster name to be used while emitting stats.
// Any ``:`` in the name will be converted to ``_`` when emitting statistics. This should not be
// confused with :ref:`Router Filter Header
// <config_http_filters_router_x-envoy-upstream-alt-stat-name>`.
string alt_stat_name = 28;
oneof cluster_discovery_type {
// The :ref:`service discovery type <arch_overview_service_discovery_types>`
// to use for resolving the cluster.
DiscoveryType type = 2 [(validate.rules).enum = {defined_only: true}];
// The custom cluster type.
CustomClusterType cluster_type = 38;
}
// Configuration to use for EDS updates for the Cluster.
EdsClusterConfig eds_cluster_config = 3;
// The timeout for new network connections to hosts in the cluster.
google.protobuf.Duration connect_timeout = 4 [(validate.rules).duration = {gt {}}];
// Soft limit on size of the clusters connections read and write buffers. If
// unspecified, an implementation defined default is applied (1MiB).
google.protobuf.UInt32Value per_connection_buffer_limit_bytes = 5;
// The :ref:`load balancer type <arch_overview_load_balancing_types>` to use
// when picking a host in the cluster.
LbPolicy lb_policy = 6 [(validate.rules).enum = {defined_only: true}];
// If the service discovery type is
// :ref:`STATIC<envoy_api_enum_value_Cluster.DiscoveryType.STATIC>`,
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`
// or :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`,
// then hosts is required.
//
// .. attention::
//
// **This field is deprecated**. Set the
// :ref:`load_assignment<envoy_api_field_Cluster.load_assignment>` field instead.
//
repeated core.Address hosts = 7;
// Setting this is required for specifying members of
// :ref:`STATIC<envoy_api_enum_value_Cluster.DiscoveryType.STATIC>`,
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`
// or :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>` clusters.
// This field supersedes :ref:`hosts<envoy_api_field_Cluster.hosts>` field.
// [#comment:TODO(dio): Deprecate the hosts field and add it to :ref:`deprecated log<deprecated>`
// once load_assignment is implemented.]
//
// .. attention::
//
// Setting this allows non-EDS cluster types to contain embedded EDS equivalent
// :ref:`endpoint assignments<envoy_api_msg_ClusterLoadAssignment>`.
// Setting this overrides :ref:`hosts<envoy_api_field_Cluster.hosts>` values.
//
ClusterLoadAssignment load_assignment = 33;
// Optional :ref:`active health checking <arch_overview_health_checking>`
// configuration for the cluster. If no
// configuration is specified no health checking will be done and all cluster
// members will be considered healthy at all times.
repeated core.HealthCheck health_checks = 8;
// Optional maximum requests for a single upstream connection. This parameter
// is respected by both the HTTP/1.1 and HTTP/2 connection pool
// implementations. If not specified, there is no limit. Setting this
// parameter to 1 will effectively disable keep alive.
google.protobuf.UInt32Value max_requests_per_connection = 9;
// Optional :ref:`circuit breaking <arch_overview_circuit_break>` for the cluster.
cluster.CircuitBreakers circuit_breakers = 10;
// The TLS configuration for connections to the upstream cluster.
//
// .. attention::
//
// **This field is deprecated**. Use `transport_socket` with name `tls` instead. If both are
// set, `transport_socket` takes priority.
auth.UpstreamTlsContext tls_context = 11 [deprecated = true];
// Additional options when handling HTTP requests upstream. These options will be applicable to
// both HTTP1 and HTTP2 requests.
core.HttpProtocolOptions common_http_protocol_options = 29;
// Additional options when handling HTTP1 requests.
core.Http1ProtocolOptions http_protocol_options = 13;
// Even if default HTTP2 protocol options are desired, this field must be
// set so that Envoy will assume that the upstream supports HTTP/2 when
// making new HTTP connection pool connections. Currently, Envoy only
// supports prior knowledge for upstream connections. Even if TLS is used
// with ALPN, `http2_protocol_options` must be specified. As an aside this allows HTTP/2
// connections to happen over plain text.
core.Http2ProtocolOptions http2_protocol_options = 14;
// The extension_protocol_options field is used to provide extension-specific protocol options
// for upstream connections. The key should match the extension filter name, such as
// "envoy.filters.network.thrift_proxy". See the extension's documentation for details on
// specific options.
map<string, google.protobuf.Struct> extension_protocol_options = 35 [deprecated = true];
// The extension_protocol_options field is used to provide extension-specific protocol options
// for upstream connections. The key should match the extension filter name, such as
// "envoy.filters.network.thrift_proxy". See the extension's documentation for details on
// specific options.
map<string, google.protobuf.Any> typed_extension_protocol_options = 36;
// If the DNS refresh rate is specified and the cluster type is either
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`,
// or :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`,
// this value is used as the clusters DNS refresh
// rate. The value configured must be at least 1ms. If this setting is not specified, the
// value defaults to 5000ms. For cluster types other than
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`
// and :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`
// this setting is ignored.
google.protobuf.Duration dns_refresh_rate = 16
[(validate.rules).duration = {gt {nanos: 1000000}}];
// If the DNS failure refresh rate is specified and the cluster type is either
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`,
// or :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`,
// this is used as the clusters DNS refresh rate when requests are failing. If this setting is
// not specified, the failure refresh rate defaults to the DNS refresh rate. For cluster types
// other than :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>` and
// :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>` this setting is
// ignored.
//
// Note: Currently, DNS failures and empty DNS responses are not treated differently and this
// configuration is applied in both situations.
RefreshRate dns_failure_refresh_rate = 44;
// Optional configuration for setting cluster's DNS refresh rate. If the value is set to true,
// cluster's DNS refresh rate will be set to resource record's TTL which comes from DNS
// resolution.
bool respect_dns_ttl = 39;
// The DNS IP address resolution policy. If this setting is not specified, the
// value defaults to
// :ref:`AUTO<envoy_api_enum_value_Cluster.DnsLookupFamily.AUTO>`.
DnsLookupFamily dns_lookup_family = 17 [(validate.rules).enum = {defined_only: true}];
// If DNS resolvers are specified and the cluster type is either
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`,
// or :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`,
// this value is used to specify the clusters dns resolvers.
// If this setting is not specified, the value defaults to the default
// resolver, which uses /etc/resolv.conf for configuration. For cluster types
// other than
// :ref:`STRICT_DNS<envoy_api_enum_value_Cluster.DiscoveryType.STRICT_DNS>`
// and :ref:`LOGICAL_DNS<envoy_api_enum_value_Cluster.DiscoveryType.LOGICAL_DNS>`
// this setting is ignored.
repeated core.Address dns_resolvers = 18;
// [#next-major-version: Reconcile DNS options in a single message.]
// Always use TCP queries instead of UDP queries for DNS lookups.
bool use_tcp_for_dns_lookups = 45;
// If specified, outlier detection will be enabled for this upstream cluster.
// Each of the configuration values can be overridden via
// :ref:`runtime values <config_cluster_manager_cluster_runtime_outlier_detection>`.
cluster.OutlierDetection outlier_detection = 19;
// The interval for removing stale hosts from a cluster type
// :ref:`ORIGINAL_DST<envoy_api_enum_value_Cluster.DiscoveryType.ORIGINAL_DST>`.
// Hosts are considered stale if they have not been used
// as upstream destinations during this interval. New hosts are added
// to original destination clusters on demand as new connections are
// redirected to Envoy, causing the number of hosts in the cluster to
// grow over time. Hosts that are not stale (they are actively used as
// destinations) are kept in the cluster, which allows connections to
// them remain open, saving the latency that would otherwise be spent
// on opening new connections. If this setting is not specified, the
// value defaults to 5000ms. For cluster types other than
// :ref:`ORIGINAL_DST<envoy_api_enum_value_Cluster.DiscoveryType.ORIGINAL_DST>`
// this setting is ignored.
google.protobuf.Duration cleanup_interval = 20 [(validate.rules).duration = {gt {}}];
// Optional configuration used to bind newly established upstream connections.
// This overrides any bind_config specified in the bootstrap proto.
// If the address and port are empty, no bind will be performed.
core.BindConfig upstream_bind_config = 21;
// Configuration for load balancing subsetting.
LbSubsetConfig lb_subset_config = 22;
// Optional configuration for the load balancing algorithm selected by
// LbPolicy. Currently only
// :ref:`RING_HASH<envoy_api_enum_value_Cluster.LbPolicy.RING_HASH>` and
// :ref:`LEAST_REQUEST<envoy_api_enum_value_Cluster.LbPolicy.LEAST_REQUEST>`
// has additional configuration options.
// Specifying ring_hash_lb_config or least_request_lb_config without setting the corresponding
// LbPolicy will generate an error at runtime.
oneof lb_config {
// Optional configuration for the Ring Hash load balancing policy.
RingHashLbConfig ring_hash_lb_config = 23;
// Optional configuration for the Original Destination load balancing policy.
OriginalDstLbConfig original_dst_lb_config = 34;
// Optional configuration for the LeastRequest load balancing policy.
LeastRequestLbConfig least_request_lb_config = 37;
}
// Common configuration for all load balancer implementations.
CommonLbConfig common_lb_config = 27;
// Optional custom transport socket implementation to use for upstream connections.
// To setup TLS, set a transport socket with name `tls` and
// :ref:`UpstreamTlsContexts <envoy_api_msg_auth.UpstreamTlsContext>` in the `typed_config`.
// If no transport socket configuration is specified, new connections
// will be set up with plaintext.
core.TransportSocket transport_socket = 24;
// The Metadata field can be used to provide additional information about the
// cluster. It can be used for stats, logging, and varying filter behavior.
// Fields should use reverse DNS notation to denote which entity within Envoy
// will need the information. For instance, if the metadata is intended for
// the Router filter, the filter name should be specified as *envoy.router*.
core.Metadata metadata = 25;
// Determines how Envoy selects the protocol used to speak to upstream hosts.
ClusterProtocolSelection protocol_selection = 26;
// Optional options for upstream connections.
UpstreamConnectionOptions upstream_connection_options = 30;
// If an upstream host becomes unhealthy (as determined by the configured health checks
// or outlier detection), immediately close all connections to the failed host.
//
// .. note::
//
// This is currently only supported for connections created by tcp_proxy.
//
// .. note::
//
// The current implementation of this feature closes all connections immediately when
// the unhealthy status is detected. If there are a large number of connections open
// to an upstream host that becomes unhealthy, Envoy may spend a substantial amount of
// time exclusively closing these connections, and not processing any other traffic.
bool close_connections_on_host_health_failure = 31;
// If set to true, Envoy will ignore the health value of a host when processing its removal
// from service discovery. This means that if active health checking is used, Envoy will *not*
// wait for the endpoint to go unhealthy before removing it.
bool drain_connections_on_host_removal = 32
[(udpa.annotations.field_migrate).rename = "ignore_health_on_host_removal"];
// An (optional) network filter chain, listed in the order the filters should be applied.
// The chain will be applied to all outgoing connections that Envoy makes to the upstream
// servers of this cluster.
repeated cluster.Filter filters = 40;
// [#not-implemented-hide:] New mechanism for LB policy configuration. Used only if the
// :ref:`lb_policy<envoy_api_field_Cluster.lb_policy>` field has the value
// :ref:`LOAD_BALANCING_POLICY_CONFIG<envoy_api_enum_value_Cluster.LbPolicy.LOAD_BALANCING_POLICY_CONFIG>`.
LoadBalancingPolicy load_balancing_policy = 41;
// [#not-implemented-hide:]
// If present, tells the client where to send load reports via LRS. If not present, the
// client will fall back to a client-side default, which may be either (a) don't send any
// load reports or (b) send load reports for all clusters to a single default server
// (which may be configured in the bootstrap file).
//
// Note that if multiple clusters point to the same LRS server, the client may choose to
// create a separate stream for each cluster or it may choose to coalesce the data for
// multiple clusters onto a single stream. Either way, the client must make sure to send
// the data for any given cluster on no more than one stream.
//
// [#next-major-version: In the v3 API, we should consider restructuring this somehow,
// maybe by allowing LRS to go on the ADS stream, or maybe by moving some of the negotiation
// from the LRS stream here.]
core.ConfigSource lrs_server = 42;
}
// [#not-implemented-hide:] Extensible load balancing policy configuration.
//
// Every LB policy defined via this mechanism will be identified via a unique name using reverse
// DNS notation. If the policy needs configuration parameters, it must define a message for its
// own configuration, which will be stored in the config field. The name of the policy will tell
// clients which type of message they should expect to see in the config field.
//
// Note that there are cases where it is useful to be able to independently select LB policies
// for choosing a locality and for choosing an endpoint within that locality. For example, a
// given deployment may always use the same policy to choose the locality, but for choosing the
// endpoint within the locality, some clusters may use weighted-round-robin, while others may
// use some sort of session-based balancing.
//
// This can be accomplished via hierarchical LB policies, where the parent LB policy creates a
// child LB policy for each locality. For each request, the parent chooses the locality and then
// delegates to the child policy for that locality to choose the endpoint within the locality.
//
// To facilitate this, the config message for the top-level LB policy may include a field of
// type LoadBalancingPolicy that specifies the child policy.
message LoadBalancingPolicy {
message Policy {
// Required. The name of the LB policy.
string name = 1;
// Optional config for the LB policy.
// No more than one of these two fields may be populated.
google.protobuf.Struct config = 2 [deprecated = true];
google.protobuf.Any typed_config = 3;
}
// Each client will iterate over the list in order and stop at the first policy that it
// supports. This provides a mechanism for starting to use new LB policies that are not yet
// supported by all clients.
repeated Policy policies = 1;
}
// An extensible structure containing the address Envoy should bind to when
// establishing upstream connections.
message UpstreamBindConfig {
// The address Envoy should bind to when establishing upstream connections.
core.Address source_address = 1;
}
message UpstreamConnectionOptions {
// If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
core.TcpKeepalive tcp_keepalive = 1;
}

@ -3,8 +3,6 @@ syntax = "proto3";
package envoy.api.v2;
import "envoy/api/v2/discovery.proto";
import "envoy/api/v2/endpoint/endpoint.proto";
import "envoy/type/percent.proto";
import "google/api/annotations.proto";
import "google/protobuf/duration.proto";
@ -13,6 +11,8 @@ import "google/protobuf/wrappers.proto";
import "udpa/annotations/migrate.proto";
import "validate/validate.proto";
import public "envoy/api/v2/endpoint.proto";
option java_package = "io.envoyproxy.envoy.api.v2";
option java_outer_classname = "EdsProto";
option java_multiple_files = true;
@ -37,98 +37,7 @@ service EndpointDiscoveryService {
}
}
// Each route from RDS will map to a single cluster or traffic split across
// clusters using weights expressed in the RDS WeightedCluster.
//
// With EDS, each cluster is treated independently from a LB perspective, with
// LB taking place between the Localities within a cluster and at a finer
// granularity between the hosts within a locality. The percentage of traffic
// for each endpoint is determined by both its load_balancing_weight, and the
// load_balancing_weight of its locality. First, a locality will be selected,
// then an endpoint within that locality will be chose based on its weight.
// [#next-free-field: 6]
message ClusterLoadAssignment {
// Load balancing policy settings.
// [#next-free-field: 6]
message Policy {
message DropOverload {
// Identifier for the policy specifying the drop.
string category = 1 [(validate.rules).string = {min_bytes: 1}];
// Percentage of traffic that should be dropped for the category.
type.FractionalPercent drop_percentage = 2;
}
reserved 1;
// Action to trim the overall incoming traffic to protect the upstream
// hosts. This action allows protection in case the hosts are unable to
// recover from an outage, or unable to autoscale or unable to handle
// incoming traffic volume for any reason.
//
// At the client each category is applied one after the other to generate
// the 'actual' drop percentage on all outgoing traffic. For example:
//
// .. code-block:: json
//
// { "drop_overloads": [
// { "category": "throttle", "drop_percentage": 60 }
// { "category": "lb", "drop_percentage": 50 }
// ]}
//
// The actual drop percentages applied to the traffic at the clients will be
// "throttle"_drop = 60%
// "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
// actual_outgoing_load = 20% // remaining after applying all categories.
repeated DropOverload drop_overloads = 2;
// Priority levels and localities are considered overprovisioned with this
// factor (in percentage). This means that we don't consider a priority
// level or locality unhealthy until the percentage of healthy hosts
// multiplied by the overprovisioning factor drops below 100.
// With the default value 140(1.4), Envoy doesn't consider a priority level
// or a locality unhealthy until their percentage of healthy hosts drops
// below 72%. For example:
//
// .. code-block:: json
//
// { "overprovisioning_factor": 100 }
//
// Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
// :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
google.protobuf.UInt32Value overprovisioning_factor = 3 [(validate.rules).uint32 = {gt: 0}];
// The max time until which the endpoints from this assignment can be used.
// If no new assignments are received before this time expires the endpoints
// are considered stale and should be marked unhealthy.
// Defaults to 0 which means endpoints never go stale.
google.protobuf.Duration endpoint_stale_after = 4 [(validate.rules).duration = {gt {}}];
// The flag to disable overprovisioning. If it is set to true,
// :ref:`overprovisioning factor
// <arch_overview_load_balancing_overprovisioning_factor>` will be ignored
// and Envoy will not perform graceful failover between priority levels or
// localities as endpoints become unhealthy. Otherwise Envoy will perform
// graceful failover as :ref:`overprovisioning factor
// <arch_overview_load_balancing_overprovisioning_factor>` suggests.
// [#next-major-version: Unify with overprovisioning config as a single message.]
// [#not-implemented-hide:]
bool disable_overprovisioning = 5;
}
// Name of the cluster. This will be the :ref:`service_name
// <envoy_api_field_Cluster.EdsClusterConfig.service_name>` value if specified
// in the cluster :ref:`EdsClusterConfig
// <envoy_api_msg_Cluster.EdsClusterConfig>`.
string cluster_name = 1 [(validate.rules).string = {min_bytes: 1}];
// List of endpoints to load balance to.
repeated endpoint.LocalityLbEndpoints endpoints = 2;
// Map of named endpoints that can be referenced in LocalityLbEndpoints.
// [#not-implemented-hide:]
map<string, endpoint.Endpoint> named_endpoints = 5;
// Load balancing policy settings.
Policy policy = 4;
// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing
// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file.
message EdsDummy {
}

@ -0,0 +1,117 @@
syntax = "proto3";
package envoy.api.v2;
import "envoy/api/v2/endpoint/endpoint_components.proto";
import "envoy/type/percent.proto";
import "google/api/annotations.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/wrappers.proto";
import "udpa/annotations/migrate.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.api.v2";
option java_outer_classname = "EndpointProto";
option java_multiple_files = true;
option (udpa.annotations.file_migrate).move_to_package = "envoy.config.endpoint.v3alpha";
// [#protodoc-title: Endpoint configuration]
// Endpoint discovery :ref:`architecture overview <arch_overview_service_discovery_types_eds>`
// Each route from RDS will map to a single cluster or traffic split across
// clusters using weights expressed in the RDS WeightedCluster.
//
// With EDS, each cluster is treated independently from a LB perspective, with
// LB taking place between the Localities within a cluster and at a finer
// granularity between the hosts within a locality. The percentage of traffic
// for each endpoint is determined by both its load_balancing_weight, and the
// load_balancing_weight of its locality. First, a locality will be selected,
// then an endpoint within that locality will be chose based on its weight.
// [#next-free-field: 6]
message ClusterLoadAssignment {
// Load balancing policy settings.
// [#next-free-field: 6]
message Policy {
message DropOverload {
// Identifier for the policy specifying the drop.
string category = 1 [(validate.rules).string = {min_bytes: 1}];
// Percentage of traffic that should be dropped for the category.
type.FractionalPercent drop_percentage = 2;
}
reserved 1;
// Action to trim the overall incoming traffic to protect the upstream
// hosts. This action allows protection in case the hosts are unable to
// recover from an outage, or unable to autoscale or unable to handle
// incoming traffic volume for any reason.
//
// At the client each category is applied one after the other to generate
// the 'actual' drop percentage on all outgoing traffic. For example:
//
// .. code-block:: json
//
// { "drop_overloads": [
// { "category": "throttle", "drop_percentage": 60 }
// { "category": "lb", "drop_percentage": 50 }
// ]}
//
// The actual drop percentages applied to the traffic at the clients will be
// "throttle"_drop = 60%
// "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
// actual_outgoing_load = 20% // remaining after applying all categories.
repeated DropOverload drop_overloads = 2;
// Priority levels and localities are considered overprovisioned with this
// factor (in percentage). This means that we don't consider a priority
// level or locality unhealthy until the percentage of healthy hosts
// multiplied by the overprovisioning factor drops below 100.
// With the default value 140(1.4), Envoy doesn't consider a priority level
// or a locality unhealthy until their percentage of healthy hosts drops
// below 72%. For example:
//
// .. code-block:: json
//
// { "overprovisioning_factor": 100 }
//
// Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
// :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
google.protobuf.UInt32Value overprovisioning_factor = 3 [(validate.rules).uint32 = {gt: 0}];
// The max time until which the endpoints from this assignment can be used.
// If no new assignments are received before this time expires the endpoints
// are considered stale and should be marked unhealthy.
// Defaults to 0 which means endpoints never go stale.
google.protobuf.Duration endpoint_stale_after = 4 [(validate.rules).duration = {gt {}}];
// The flag to disable overprovisioning. If it is set to true,
// :ref:`overprovisioning factor
// <arch_overview_load_balancing_overprovisioning_factor>` will be ignored
// and Envoy will not perform graceful failover between priority levels or
// localities as endpoints become unhealthy. Otherwise Envoy will perform
// graceful failover as :ref:`overprovisioning factor
// <arch_overview_load_balancing_overprovisioning_factor>` suggests.
// [#next-major-version: Unify with overprovisioning config as a single message.]
// [#not-implemented-hide:]
bool disable_overprovisioning = 5;
}
// Name of the cluster. This will be the :ref:`service_name
// <envoy_api_field_Cluster.EdsClusterConfig.service_name>` value if specified
// in the cluster :ref:`EdsClusterConfig
// <envoy_api_msg_Cluster.EdsClusterConfig>`.
string cluster_name = 1 [(validate.rules).string = {min_bytes: 1}];
// List of endpoints to load balance to.
repeated endpoint.LocalityLbEndpoints endpoints = 2;
// Map of named endpoints that can be referenced in LocalityLbEndpoints.
// [#not-implemented-hide:]
map<string, endpoint.Endpoint> named_endpoints = 5;
// Load balancing policy settings.
Policy policy = 4;
}

@ -2,130 +2,8 @@ syntax = "proto3";
package envoy.api.v2.endpoint;
import "envoy/api/v2/core/address.proto";
import "envoy/api/v2/core/base.proto";
import "envoy/api/v2/core/health_check.proto";
import "google/protobuf/wrappers.proto";
import "udpa/annotations/migrate.proto";
import "validate/validate.proto";
import public "envoy/api/v2/endpoint/endpoint_components.proto";
option java_package = "io.envoyproxy.envoy.api.v2.endpoint";
option java_outer_classname = "EndpointProto";
option java_multiple_files = true;
option (udpa.annotations.file_migrate).move_to_package = "envoy.config.endpoint.v3alpha";
// [#protodoc-title: Endpoints]
// Upstream host identifier.
message Endpoint {
// The optional health check configuration.
message HealthCheckConfig {
// Optional alternative health check port value.
//
// By default the health check address port of an upstream host is the same
// as the host's serving address port. This provides an alternative health
// check port. Setting this with a non-zero value allows an upstream host
// to have different health check address port.
uint32 port_value = 1 [(validate.rules).uint32 = {lte: 65535}];
}
// The upstream host address.
//
// .. attention::
//
// The form of host address depends on the given cluster type. For STATIC or EDS,
// it is expected to be a direct IP address (or something resolvable by the
// specified :ref:`resolver <envoy_api_field_core.SocketAddress.resolver_name>`
// in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname,
// and will be resolved via DNS.
core.Address address = 1;
// The optional health check configuration is used as configuration for the
// health checker to contact the health checked host.
//
// .. attention::
//
// This takes into effect only for upstream clusters with
// :ref:`active health checking <arch_overview_health_checking>` enabled.
HealthCheckConfig health_check_config = 2;
}
// An Endpoint that Envoy can route traffic to.
// [#next-free-field: 6]
message LbEndpoint {
// Upstream host identifier or a named reference.
oneof host_identifier {
Endpoint endpoint = 1;
// [#not-implemented-hide:]
string endpoint_name = 5;
}
// Optional health status when known and supplied by EDS server.
core.HealthStatus health_status = 2;
// The endpoint metadata specifies values that may be used by the load
// balancer to select endpoints in a cluster for a given request. The filter
// name should be specified as *envoy.lb*. An example boolean key-value pair
// is *canary*, providing the optional canary status of the upstream host.
// This may be matched against in a route's
// :ref:`RouteAction <envoy_api_msg_route.RouteAction>` metadata_match field
// to subset the endpoints considered in cluster load balancing.
core.Metadata metadata = 3;
// The optional load balancing weight of the upstream host; at least 1.
// Envoy uses the load balancing weight in some of the built in load
// balancers. The load balancing weight for an endpoint is divided by the sum
// of the weights of all endpoints in the endpoint's locality to produce a
// percentage of traffic for the endpoint. This percentage is then further
// weighted by the endpoint's locality's load balancing weight from
// LocalityLbEndpoints. If unspecified, each host is presumed to have equal
// weight in a locality.
google.protobuf.UInt32Value load_balancing_weight = 4 [(validate.rules).uint32 = {gte: 1}];
}
// A group of endpoints belonging to a Locality.
// One can have multiple LocalityLbEndpoints for a locality, but this is
// generally only done if the different groups need to have different load
// balancing weights or different priorities.
// [#next-free-field: 7]
message LocalityLbEndpoints {
// Identifies location of where the upstream hosts run.
core.Locality locality = 1;
// The group of endpoints belonging to the locality specified.
repeated LbEndpoint lb_endpoints = 2;
// Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
// balancing weight for a locality is divided by the sum of the weights of all
// localities at the same priority level to produce the effective percentage
// of traffic for the locality.
//
// Locality weights are only considered when :ref:`locality weighted load
// balancing <arch_overview_load_balancing_locality_weighted_lb>` is
// configured. These weights are ignored otherwise. If no weights are
// specified when locality weighted load balancing is enabled, the locality is
// assigned no load.
google.protobuf.UInt32Value load_balancing_weight = 3 [(validate.rules).uint32 = {gte: 1}];
// Optional: the priority for this LocalityLbEndpoints. If unspecified this will
// default to the highest priority (0).
//
// Under usual circumstances, Envoy will only select endpoints for the highest
// priority (0). In the event all endpoints for a particular priority are
// unavailable/unhealthy, Envoy will fail over to selecting endpoints for the
// next highest priority group.
//
// Priorities should range from 0 (highest) to N (lowest) without skipping.
uint32 priority = 5 [(validate.rules).uint32 = {lte: 128}];
// Optional: Per locality proximity value which indicates how close this
// locality is from the source locality. This value only provides ordering
// information (lower the value, closer it is to the source locality).
// This will be consumed by load balancing schemes that need proximity order
// to determine where to route the requests.
// [#not-implemented-hide:]
google.protobuf.UInt32Value proximity = 6;
}

@ -0,0 +1,131 @@
syntax = "proto3";
package envoy.api.v2.endpoint;
import "envoy/api/v2/core/address.proto";
import "envoy/api/v2/core/base.proto";
import "envoy/api/v2/core/health_check.proto";
import "google/protobuf/wrappers.proto";
import "udpa/annotations/migrate.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.api.v2.endpoint";
option java_outer_classname = "EndpointComponentsProto";
option java_multiple_files = true;
option (udpa.annotations.file_migrate).move_to_package = "envoy.config.endpoint.v3alpha";
// [#protodoc-title: Endpoints]
// Upstream host identifier.
message Endpoint {
// The optional health check configuration.
message HealthCheckConfig {
// Optional alternative health check port value.
//
// By default the health check address port of an upstream host is the same
// as the host's serving address port. This provides an alternative health
// check port. Setting this with a non-zero value allows an upstream host
// to have different health check address port.
uint32 port_value = 1 [(validate.rules).uint32 = {lte: 65535}];
}
// The upstream host address.
//
// .. attention::
//
// The form of host address depends on the given cluster type. For STATIC or EDS,
// it is expected to be a direct IP address (or something resolvable by the
// specified :ref:`resolver <envoy_api_field_core.SocketAddress.resolver_name>`
// in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname,
// and will be resolved via DNS.
core.Address address = 1;
// The optional health check configuration is used as configuration for the
// health checker to contact the health checked host.
//
// .. attention::
//
// This takes into effect only for upstream clusters with
// :ref:`active health checking <arch_overview_health_checking>` enabled.
HealthCheckConfig health_check_config = 2;
}
// An Endpoint that Envoy can route traffic to.
// [#next-free-field: 6]
message LbEndpoint {
// Upstream host identifier or a named reference.
oneof host_identifier {
Endpoint endpoint = 1;
// [#not-implemented-hide:]
string endpoint_name = 5;
}
// Optional health status when known and supplied by EDS server.
core.HealthStatus health_status = 2;
// The endpoint metadata specifies values that may be used by the load
// balancer to select endpoints in a cluster for a given request. The filter
// name should be specified as *envoy.lb*. An example boolean key-value pair
// is *canary*, providing the optional canary status of the upstream host.
// This may be matched against in a route's
// :ref:`RouteAction <envoy_api_msg_route.RouteAction>` metadata_match field
// to subset the endpoints considered in cluster load balancing.
core.Metadata metadata = 3;
// The optional load balancing weight of the upstream host; at least 1.
// Envoy uses the load balancing weight in some of the built in load
// balancers. The load balancing weight for an endpoint is divided by the sum
// of the weights of all endpoints in the endpoint's locality to produce a
// percentage of traffic for the endpoint. This percentage is then further
// weighted by the endpoint's locality's load balancing weight from
// LocalityLbEndpoints. If unspecified, each host is presumed to have equal
// weight in a locality.
google.protobuf.UInt32Value load_balancing_weight = 4 [(validate.rules).uint32 = {gte: 1}];
}
// A group of endpoints belonging to a Locality.
// One can have multiple LocalityLbEndpoints for a locality, but this is
// generally only done if the different groups need to have different load
// balancing weights or different priorities.
// [#next-free-field: 7]
message LocalityLbEndpoints {
// Identifies location of where the upstream hosts run.
core.Locality locality = 1;
// The group of endpoints belonging to the locality specified.
repeated LbEndpoint lb_endpoints = 2;
// Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
// balancing weight for a locality is divided by the sum of the weights of all
// localities at the same priority level to produce the effective percentage
// of traffic for the locality.
//
// Locality weights are only considered when :ref:`locality weighted load
// balancing <arch_overview_load_balancing_locality_weighted_lb>` is
// configured. These weights are ignored otherwise. If no weights are
// specified when locality weighted load balancing is enabled, the locality is
// assigned no load.
google.protobuf.UInt32Value load_balancing_weight = 3 [(validate.rules).uint32 = {gte: 1}];
// Optional: the priority for this LocalityLbEndpoints. If unspecified this will
// default to the highest priority (0).
//
// Under usual circumstances, Envoy will only select endpoints for the highest
// priority (0). In the event all endpoints for a particular priority are
// unavailable/unhealthy, Envoy will fail over to selecting endpoints for the
// next highest priority group.
//
// Priorities should range from 0 (highest) to N (lowest) without skipping.
uint32 priority = 5 [(validate.rules).uint32 = {lte: 128}];
// Optional: Per locality proximity value which indicates how close this
// locality is from the source locality. This value only provides ordering
// information (lower the value, closer it is to the source locality).
// This will be consumed by load balancing schemes that need proximity order
// to determine where to route the requests.
// [#not-implemented-hide:]
google.protobuf.UInt32Value proximity = 6;
}

@ -2,10 +2,7 @@ syntax = "proto3";
package envoy.api.v2;
import "envoy/api/v2/core/base.proto";
import "envoy/api/v2/core/config_source.proto";
import "envoy/api/v2/discovery.proto";
import "envoy/api/v2/route/route.proto";
import "google/api/annotations.proto";
import "google/protobuf/wrappers.proto";
@ -13,15 +10,15 @@ import "google/protobuf/wrappers.proto";
import "udpa/annotations/migrate.proto";
import "validate/validate.proto";
import public "envoy/api/v2/route.proto";
option java_package = "io.envoyproxy.envoy.api.v2";
option java_outer_classname = "RdsProto";
option java_multiple_files = true;
option java_generic_services = true;
option (udpa.annotations.file_migrate).move_to_package = "envoy.service.route.v3alpha";
// [#protodoc-title: HTTP route configuration]
// * Routing :ref:`architecture overview <arch_overview_http_routing>`
// * HTTP :ref:`router filter <config_http_filters_router>`
// [#protodoc-title: RDS]
// The resource_names field in DiscoveryRequest specifies a route configuration.
// This allows an Envoy configuration with multiple HTTP listeners (and
@ -56,86 +53,7 @@ service VirtualHostDiscoveryService {
}
}
// [#next-free-field: 11]
message RouteConfiguration {
// The name of the route configuration. For example, it might match
// :ref:`route_config_name
// <envoy_api_field_config.filter.network.http_connection_manager.v2.Rds.route_config_name>` in
// :ref:`envoy_api_msg_config.filter.network.http_connection_manager.v2.Rds`.
string name = 1;
// An array of virtual hosts that make up the route table.
repeated route.VirtualHost virtual_hosts = 2;
// An array of virtual hosts will be dynamically loaded via the VHDS API.
// Both *virtual_hosts* and *vhds* fields will be used when present. *virtual_hosts* can be used
// for a base routing table or for infrequently changing virtual hosts. *vhds* is used for
// on-demand discovery of virtual hosts. The contents of these two fields will be merged to
// generate a routing table for a given RouteConfiguration, with *vhds* derived configuration
// taking precedence.
Vhds vhds = 9;
// Optionally specifies a list of HTTP headers that the connection manager
// will consider to be internal only. If they are found on external requests they will be cleaned
// prior to filter invocation. See :ref:`config_http_conn_man_headers_x-envoy-internal` for more
// information.
repeated string internal_only_headers = 3;
// Specifies a list of HTTP headers that should be added to each response that
// the connection manager encodes. Headers specified at this level are applied
// after headers from any enclosed :ref:`envoy_api_msg_route.VirtualHost` or
// :ref:`envoy_api_msg_route.RouteAction`. For more information, including details on
// header value syntax, see the documentation on :ref:`custom request headers
// <config_http_conn_man_headers_custom_request_headers>`.
repeated core.HeaderValueOption response_headers_to_add = 4
[(validate.rules).repeated = {max_items: 1000}];
// Specifies a list of HTTP headers that should be removed from each response
// that the connection manager encodes.
repeated string response_headers_to_remove = 5;
// Specifies a list of HTTP headers that should be added to each request
// routed by the HTTP connection manager. Headers specified at this level are
// applied after headers from any enclosed :ref:`envoy_api_msg_route.VirtualHost` or
// :ref:`envoy_api_msg_route.RouteAction`. For more information, including details on
// header value syntax, see the documentation on :ref:`custom request headers
// <config_http_conn_man_headers_custom_request_headers>`.
repeated core.HeaderValueOption request_headers_to_add = 6
[(validate.rules).repeated = {max_items: 1000}];
// Specifies a list of HTTP headers that should be removed from each request
// routed by the HTTP connection manager.
repeated string request_headers_to_remove = 8;
// By default, headers that should be added/removed are evaluated from most to least specific:
//
// * route level
// * virtual host level
// * connection manager level
//
// To allow setting overrides at the route or virtual host level, this order can be reversed
// by setting this option to true. Defaults to false.
//
// [#next-major-version: In the v3 API, this will default to true.]
bool most_specific_header_mutations_wins = 10;
// An optional boolean that specifies whether the clusters that the route
// table refers to will be validated by the cluster manager. If set to true
// and a route refers to a non-existent cluster, the route table will not
// load. If set to false and a route refers to a non-existent cluster, the
// route table will load and the router filter will return a 404 if the route
// is selected at runtime. This setting defaults to true if the route table
// is statically defined via the :ref:`route_config
// <envoy_api_field_config.filter.network.http_connection_manager.v2.HttpConnectionManager.route_config>`
// option. This setting default to false if the route table is loaded dynamically via the
// :ref:`rds
// <envoy_api_field_config.filter.network.http_connection_manager.v2.HttpConnectionManager.rds>`
// option. Users may wish to override the default behavior in certain cases (for example when
// using CDS with a static route table).
google.protobuf.BoolValue validate_clusters = 7;
}
message Vhds {
// Configuration source specifier for VHDS.
core.ConfigSource config_source = 1 [(validate.rules).message = {required: true}];
// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing
// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file.
message RdsDummy {
}

@ -0,0 +1,105 @@
syntax = "proto3";
package envoy.api.v2;
import "envoy/api/v2/core/base.proto";
import "envoy/api/v2/core/config_source.proto";
import "envoy/api/v2/route/route_components.proto";
import "google/protobuf/wrappers.proto";
import "udpa/annotations/migrate.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.api.v2";
option java_outer_classname = "RouteProto";
option java_multiple_files = true;
option (udpa.annotations.file_migrate).move_to_package = "envoy.config.route.v3alpha";
// [#protodoc-title: HTTP route configuration]
// * Routing :ref:`architecture overview <arch_overview_http_routing>`
// * HTTP :ref:`router filter <config_http_filters_router>`
// [#next-free-field: 11]
message RouteConfiguration {
// The name of the route configuration. For example, it might match
// :ref:`route_config_name
// <envoy_api_field_config.filter.network.http_connection_manager.v2.Rds.route_config_name>` in
// :ref:`envoy_api_msg_config.filter.network.http_connection_manager.v2.Rds`.
string name = 1;
// An array of virtual hosts that make up the route table.
repeated route.VirtualHost virtual_hosts = 2;
// An array of virtual hosts will be dynamically loaded via the VHDS API.
// Both *virtual_hosts* and *vhds* fields will be used when present. *virtual_hosts* can be used
// for a base routing table or for infrequently changing virtual hosts. *vhds* is used for
// on-demand discovery of virtual hosts. The contents of these two fields will be merged to
// generate a routing table for a given RouteConfiguration, with *vhds* derived configuration
// taking precedence.
Vhds vhds = 9;
// Optionally specifies a list of HTTP headers that the connection manager
// will consider to be internal only. If they are found on external requests they will be cleaned
// prior to filter invocation. See :ref:`config_http_conn_man_headers_x-envoy-internal` for more
// information.
repeated string internal_only_headers = 3;
// Specifies a list of HTTP headers that should be added to each response that
// the connection manager encodes. Headers specified at this level are applied
// after headers from any enclosed :ref:`envoy_api_msg_route.VirtualHost` or
// :ref:`envoy_api_msg_route.RouteAction`. For more information, including details on
// header value syntax, see the documentation on :ref:`custom request headers
// <config_http_conn_man_headers_custom_request_headers>`.
repeated core.HeaderValueOption response_headers_to_add = 4
[(validate.rules).repeated = {max_items: 1000}];
// Specifies a list of HTTP headers that should be removed from each response
// that the connection manager encodes.
repeated string response_headers_to_remove = 5;
// Specifies a list of HTTP headers that should be added to each request
// routed by the HTTP connection manager. Headers specified at this level are
// applied after headers from any enclosed :ref:`envoy_api_msg_route.VirtualHost` or
// :ref:`envoy_api_msg_route.RouteAction`. For more information, including details on
// header value syntax, see the documentation on :ref:`custom request headers
// <config_http_conn_man_headers_custom_request_headers>`.
repeated core.HeaderValueOption request_headers_to_add = 6
[(validate.rules).repeated = {max_items: 1000}];
// Specifies a list of HTTP headers that should be removed from each request
// routed by the HTTP connection manager.
repeated string request_headers_to_remove = 8;
// By default, headers that should be added/removed are evaluated from most to least specific:
//
// * route level
// * virtual host level
// * connection manager level
//
// To allow setting overrides at the route or virtual host level, this order can be reversed
// by setting this option to true. Defaults to false.
//
// [#next-major-version: In the v3 API, this will default to true.]
bool most_specific_header_mutations_wins = 10;
// An optional boolean that specifies whether the clusters that the route
// table refers to will be validated by the cluster manager. If set to true
// and a route refers to a non-existent cluster, the route table will not
// load. If set to false and a route refers to a non-existent cluster, the
// route table will load and the router filter will return a 404 if the route
// is selected at runtime. This setting defaults to true if the route table
// is statically defined via the :ref:`route_config
// <envoy_api_field_config.filter.network.http_connection_manager.v2.HttpConnectionManager.route_config>`
// option. This setting default to false if the route table is loaded dynamically via the
// :ref:`rds
// <envoy_api_field_config.filter.network.http_connection_manager.v2.HttpConnectionManager.rds>`
// option. Users may wish to override the default behavior in certain cases (for example when
// using CDS with a static route table).
google.protobuf.BoolValue validate_clusters = 7;
}
message Vhds {
// Configuration source specifier for VHDS.
core.ConfigSource config_source = 1 [(validate.rules).message = {required: true}];
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,107 @@
syntax = "proto3";
package envoy.api.v2;
import "udpa/annotations/migrate.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.api.v2";
option java_outer_classname = "ScopedRouteProto";
option java_multiple_files = true;
option (udpa.annotations.file_migrate).move_to_package = "envoy.config.route.v3alpha";
// [#protodoc-title: HTTP scoped routing configuration]
// * Routing :ref:`architecture overview <arch_overview_http_routing>`
// Specifies a routing scope, which associates a
// :ref:`Key<envoy_api_msg_ScopedRouteConfiguration.Key>` to a
// :ref:`envoy_api_msg_RouteConfiguration` (identified by its resource name).
//
// The HTTP connection manager builds up a table consisting of these Key to
// RouteConfiguration mappings, and looks up the RouteConfiguration to use per
// request according to the algorithm specified in the
// :ref:`scope_key_builder<envoy_api_field_config.filter.network.http_connection_manager.v2.ScopedRoutes.scope_key_builder>`
// assigned to the HttpConnectionManager.
//
// For example, with the following configurations (in YAML):
//
// HttpConnectionManager config:
//
// .. code::
//
// ...
// scoped_routes:
// name: foo-scoped-routes
// scope_key_builder:
// fragments:
// - header_value_extractor:
// name: X-Route-Selector
// element_separator: ,
// element:
// separator: =
// key: vip
//
// ScopedRouteConfiguration resources (specified statically via
// :ref:`scoped_route_configurations_list<envoy_api_field_config.filter.network.http_connection_manager.v2.ScopedRoutes.scoped_route_configurations_list>`
// or obtained dynamically via SRDS):
//
// .. code::
//
// (1)
// name: route-scope1
// route_configuration_name: route-config1
// key:
// fragments:
// - string_key: 172.10.10.20
//
// (2)
// name: route-scope2
// route_configuration_name: route-config2
// key:
// fragments:
// - string_key: 172.20.20.30
//
// A request from a client such as:
//
// .. code::
//
// GET / HTTP/1.1
// Host: foo.com
// X-Route-Selector: vip=172.10.10.20
//
// would result in the routing table defined by the `route-config1`
// RouteConfiguration being assigned to the HTTP request/stream.
//
message ScopedRouteConfiguration {
// Specifies a key which is matched against the output of the
// :ref:`scope_key_builder<envoy_api_field_config.filter.network.http_connection_manager.v2.ScopedRoutes.scope_key_builder>`
// specified in the HttpConnectionManager. The matching is done per HTTP
// request and is dependent on the order of the fragments contained in the
// Key.
message Key {
message Fragment {
oneof type {
option (validate.required) = true;
// A string to match against.
string string_key = 1;
}
}
// The ordered set of fragments to match against. The order must match the
// fragments in the corresponding
// :ref:`scope_key_builder<envoy_api_field_config.filter.network.http_connection_manager.v2.ScopedRoutes.scope_key_builder>`.
repeated Fragment fragments = 1 [(validate.rules).repeated = {min_items: 1}];
}
// The name assigned to the routing scope.
string name = 1 [(validate.rules).string = {min_bytes: 1}];
// The resource name to use for a :ref:`envoy_api_msg_DiscoveryRequest` to an
// RDS server to fetch the :ref:`envoy_api_msg_RouteConfiguration` associated
// with this scope.
string route_configuration_name = 2 [(validate.rules).string = {min_bytes: 1}];
// The key to match against.
Key key = 3 [(validate.rules).message = {required: true}];
}

@ -7,7 +7,8 @@ import "envoy/api/v2/discovery.proto";
import "google/api/annotations.proto";
import "udpa/annotations/migrate.proto";
import "validate/validate.proto";
import public "envoy/api/v2/scoped_route.proto";
option java_package = "io.envoyproxy.envoy.api.v2";
option java_outer_classname = "SrdsProto";
@ -15,7 +16,7 @@ option java_multiple_files = true;
option java_generic_services = true;
option (udpa.annotations.file_migrate).move_to_package = "envoy.service.route.v3alpha";
// [#protodoc-title: HTTP scoped routing configuration]
// [#protodoc-title: SRDS]
// * Routing :ref:`architecture overview <arch_overview_http_routing>`
// The Scoped Routes Discovery Service (SRDS) API distributes
@ -38,95 +39,7 @@ service ScopedRoutesDiscoveryService {
}
}
// Specifies a routing scope, which associates a
// :ref:`Key<envoy_api_msg_ScopedRouteConfiguration.Key>` to a
// :ref:`envoy_api_msg_RouteConfiguration` (identified by its resource name).
//
// The HTTP connection manager builds up a table consisting of these Key to
// RouteConfiguration mappings, and looks up the RouteConfiguration to use per
// request according to the algorithm specified in the
// :ref:`scope_key_builder<envoy_api_field_config.filter.network.http_connection_manager.v2.ScopedRoutes.scope_key_builder>`
// assigned to the HttpConnectionManager.
//
// For example, with the following configurations (in YAML):
//
// HttpConnectionManager config:
//
// .. code::
//
// ...
// scoped_routes:
// name: foo-scoped-routes
// scope_key_builder:
// fragments:
// - header_value_extractor:
// name: X-Route-Selector
// element_separator: ,
// element:
// separator: =
// key: vip
//
// ScopedRouteConfiguration resources (specified statically via
// :ref:`scoped_route_configurations_list<envoy_api_field_config.filter.network.http_connection_manager.v2.ScopedRoutes.scoped_route_configurations_list>`
// or obtained dynamically via SRDS):
//
// .. code::
//
// (1)
// name: route-scope1
// route_configuration_name: route-config1
// key:
// fragments:
// - string_key: 172.10.10.20
//
// (2)
// name: route-scope2
// route_configuration_name: route-config2
// key:
// fragments:
// - string_key: 172.20.20.30
//
// A request from a client such as:
//
// .. code::
//
// GET / HTTP/1.1
// Host: foo.com
// X-Route-Selector: vip=172.10.10.20
//
// would result in the routing table defined by the `route-config1`
// RouteConfiguration being assigned to the HTTP request/stream.
//
message ScopedRouteConfiguration {
// Specifies a key which is matched against the output of the
// :ref:`scope_key_builder<envoy_api_field_config.filter.network.http_connection_manager.v2.ScopedRoutes.scope_key_builder>`
// specified in the HttpConnectionManager. The matching is done per HTTP
// request and is dependent on the order of the fragments contained in the
// Key.
message Key {
message Fragment {
oneof type {
option (validate.required) = true;
// A string to match against.
string string_key = 1;
}
}
// The ordered set of fragments to match against. The order must match the
// fragments in the corresponding
// :ref:`scope_key_builder<envoy_api_field_config.filter.network.http_connection_manager.v2.ScopedRoutes.scope_key_builder>`.
repeated Fragment fragments = 1 [(validate.rules).repeated = {min_items: 1}];
}
// The name assigned to the routing scope.
string name = 1 [(validate.rules).string = {min_bytes: 1}];
// The resource name to use for a :ref:`envoy_api_msg_DiscoveryRequest` to an
// RDS server to fetch the :ref:`envoy_api_msg_RouteConfiguration` associated
// with this scope.
string route_configuration_name = 2 [(validate.rules).string = {min_bytes: 1}];
// The key to match against.
Key key = 3 [(validate.rules).message = {required: true}];
// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing
// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file.
message SrdsDummy {
}

@ -3,7 +3,7 @@ syntax = "proto3";
package envoy.config.bootstrap.v2;
import "envoy/api/v2/auth/cert.proto";
import "envoy/api/v2/cds.proto";
import "envoy/api/v2/cluster.proto";
import "envoy/api/v2/core/address.proto";
import "envoy/api/v2/core/base.proto";
import "envoy/api/v2/core/config_source.proto";

@ -7,13 +7,13 @@ licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/config/bootstrap/v2:pkg",
"//envoy/config/cluster/v3alpha:pkg",
"//envoy/config/core/v3alpha:pkg",
"//envoy/config/listener/v3alpha:pkg",
"//envoy/config/metrics/v3alpha:pkg",
"//envoy/config/overload/v3alpha:pkg",
"//envoy/config/trace/v3alpha:pkg",
"//envoy/extensions/transport_sockets/tls/v3alpha:pkg",
"//envoy/service/cluster/v3alpha:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)

@ -2,6 +2,7 @@ syntax = "proto3";
package envoy.config.bootstrap.v3alpha;
import "envoy/config/cluster/v3alpha/cluster.proto";
import "envoy/config/core/v3alpha/address.proto";
import "envoy/config/core/v3alpha/base.proto";
import "envoy/config/core/v3alpha/config_source.proto";
@ -10,7 +11,6 @@ import "envoy/config/metrics/v3alpha/stats.proto";
import "envoy/config/overload/v3alpha/overload.proto";
import "envoy/config/trace/v3alpha/trace.proto";
import "envoy/extensions/transport_sockets/tls/v3alpha/cert.proto";
import "envoy/service/cluster/v3alpha/cds.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
@ -48,7 +48,7 @@ message Bootstrap {
// necessary to have some initial cluster definitions available to allow Envoy to know how to
// speak to the management server. These cluster definitions may not use :ref:`EDS
// <arch_overview_dynamic_config_eds>` (i.e. they should be static IP or DNS-based).
repeated service.cluster.v3alpha.Cluster clusters = 2;
repeated cluster.v3alpha.Cluster clusters = 2;
// These static secrets can be used by :ref:`SdsSecretConfig
// <envoy_api_msg_extensions.transport_sockets.tls.v3alpha.SdsSecretConfig>`
@ -65,7 +65,7 @@ message Bootstrap {
// single :ref:`LDS <arch_overview_dynamic_config_lds>` configuration source.
core.v3alpha.ConfigSource lds_config = 1;
// All post-bootstrap :ref:`Cluster <envoy_api_msg_service.cluster.v3alpha.Cluster>` definitions
// All post-bootstrap :ref:`Cluster <envoy_api_msg_config.cluster.v3alpha.Cluster>` definitions
// are provided by a single :ref:`CDS <arch_overview_dynamic_config_cds>` configuration source.
core.v3alpha.ConfigSource cds_config = 2;
@ -164,9 +164,9 @@ message Bootstrap {
// Always use TCP queries instead of UDP queries for DNS lookups.
// This may be overridden on a per-cluster basis in cds_config,
// when :ref:`dns_resolvers <envoy_api_field_service.cluster.v3alpha.Cluster.dns_resolvers>` and
// when :ref:`dns_resolvers <envoy_api_field_config.cluster.v3alpha.Cluster.dns_resolvers>` and
// :ref:`use_tcp_for_dns_lookups
// <envoy_api_field_service.cluster.v3alpha.Cluster.use_tcp_for_dns_lookups>` are specified.
// <envoy_api_field_config.cluster.v3alpha.Cluster.use_tcp_for_dns_lookups>` are specified.
bool use_tcp_for_dns_lookups = 20;
}
@ -210,7 +210,7 @@ message ClusterManager {
// this configuration). In order to enable :ref:`zone aware routing
// <arch_overview_load_balancing_zone_aware_routing>` this option must be set.
// If *local_cluster_name* is defined then :ref:`clusters
// <envoy_api_msg_service.cluster.v3alpha.Cluster>` must be defined in the :ref:`Bootstrap
// <envoy_api_msg_config.cluster.v3alpha.Cluster>` must be defined in the :ref:`Bootstrap
// static cluster resources
// <envoy_api_field_config.bootstrap.v3alpha.Bootstrap.StaticResources.clusters>`. This is
// unrelated to the :option:`--service-cluster` option which does not `affect zone aware routing

@ -6,8 +6,11 @@ licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/api/v2:pkg",
"//envoy/api/v2/cluster:pkg",
"//envoy/config/core/v3alpha:pkg",
"//envoy/config/endpoint/v3alpha:pkg",
"//envoy/type/v3alpha:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)

@ -0,0 +1,883 @@
syntax = "proto3";
package envoy.config.cluster.v3alpha;
import "envoy/config/cluster/v3alpha/circuit_breaker.proto";
import "envoy/config/cluster/v3alpha/filter.proto";
import "envoy/config/cluster/v3alpha/outlier_detection.proto";
import "envoy/config/core/v3alpha/address.proto";
import "envoy/config/core/v3alpha/base.proto";
import "envoy/config/core/v3alpha/config_source.proto";
import "envoy/config/core/v3alpha/health_check.proto";
import "envoy/config/core/v3alpha/protocol.proto";
import "envoy/config/endpoint/v3alpha/endpoint.proto";
import "envoy/type/v3alpha/percent.proto";
import "google/protobuf/any.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto";
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.config.cluster.v3alpha";
option java_outer_classname = "ClusterProto";
option java_multiple_files = true;
// [#protodoc-title: Cluster configuration]
// Configuration for a single upstream cluster.
// [#next-free-field: 46]
message Cluster {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.Cluster";
// Refer to :ref:`service discovery type <arch_overview_service_discovery_types>`
// for an explanation on each type.
enum DiscoveryType {
// Refer to the :ref:`static discovery type<arch_overview_service_discovery_types_static>`
// for an explanation.
STATIC = 0;
// Refer to the :ref:`strict DNS discovery
// type<arch_overview_service_discovery_types_strict_dns>`
// for an explanation.
STRICT_DNS = 1;
// Refer to the :ref:`logical DNS discovery
// type<arch_overview_service_discovery_types_logical_dns>`
// for an explanation.
LOGICAL_DNS = 2;
// Refer to the :ref:`service discovery type<arch_overview_service_discovery_types_eds>`
// for an explanation.
EDS = 3;
// Refer to the :ref:`original destination discovery
// type<arch_overview_service_discovery_types_original_destination>`
// for an explanation.
ORIGINAL_DST = 4;
}
// Refer to :ref:`load balancer type <arch_overview_load_balancing_types>` architecture
// overview section for information on each type.
enum LbPolicy {
reserved 4;
reserved "ORIGINAL_DST_LB";
// Refer to the :ref:`round robin load balancing
// policy<arch_overview_load_balancing_types_round_robin>`
// for an explanation.
ROUND_ROBIN = 0;
// Refer to the :ref:`least request load balancing
// policy<arch_overview_load_balancing_types_least_request>`
// for an explanation.
LEAST_REQUEST = 1;
// Refer to the :ref:`ring hash load balancing
// policy<arch_overview_load_balancing_types_ring_hash>`
// for an explanation.
RING_HASH = 2;
// Refer to the :ref:`random load balancing
// policy<arch_overview_load_balancing_types_random>`
// for an explanation.
RANDOM = 3;
// Refer to the :ref:`Maglev load balancing policy<arch_overview_load_balancing_types_maglev>`
// for an explanation.
MAGLEV = 5;
// This load balancer type must be specified if the configured cluster provides a cluster
// specific load balancer. Consult the configured cluster's documentation for whether to set
// this option or not.
CLUSTER_PROVIDED = 6;
// [#not-implemented-hide:] Use the new :ref:`load_balancing_policy
// <envoy_api_field_config.cluster.v3alpha.Cluster.load_balancing_policy>` field to determine
// the LB policy.
// [#next-major-version: In the v3 API, we should consider deprecating the lb_policy field
// and instead using the new load_balancing_policy field as the one and only mechanism for
// configuring this.]
LOAD_BALANCING_POLICY_CONFIG = 7;
}
// When V4_ONLY is selected, the DNS resolver will only perform a lookup for
// addresses in the IPv4 family. If V6_ONLY is selected, the DNS resolver will
// only perform a lookup for addresses in the IPv6 family. If AUTO is
// specified, the DNS resolver will first perform a lookup for addresses in
// the IPv6 family and fallback to a lookup for addresses in the IPv4 family.
// For cluster types other than
// :ref:`STRICT_DNS<envoy_api_enum_value_config.cluster.v3alpha.Cluster.DiscoveryType.STRICT_DNS>`
// and
// :ref:`LOGICAL_DNS<envoy_api_enum_value_config.cluster.v3alpha.Cluster.DiscoveryType.LOGICAL_DNS>`,
// this setting is
// ignored.
enum DnsLookupFamily {
AUTO = 0;
V4_ONLY = 1;
V6_ONLY = 2;
}
enum ClusterProtocolSelection {
// Cluster can only operate on one of the possible upstream protocols (HTTP1.1, HTTP2).
// If :ref:`http2_protocol_options
// <envoy_api_field_config.cluster.v3alpha.Cluster.http2_protocol_options>` are present, HTTP2
// will be used, otherwise HTTP1.1 will be used.
USE_CONFIGURED_PROTOCOL = 0;
// Use HTTP1.1 or HTTP2, depending on which one is used on the downstream connection.
USE_DOWNSTREAM_PROTOCOL = 1;
}
// TransportSocketMatch specifies what transport socket config will be used
// when the match conditions are satisfied.
message TransportSocketMatch {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.Cluster.TransportSocketMatch";
// The name of the match, used in stats generation.
string name = 1 [(validate.rules).string = {min_len: 1}];
// Optional endpoint metadata match criteria.
// The connection to the endpoint with metadata matching what is set in this field
// will use the transport socket configuration specified here.
// The endpoint's metadata entry in *envoy.transport_socket_match* is used to match
// against the values specified in this field.
google.protobuf.Struct match = 2;
// The configuration of the transport socket.
core.v3alpha.TransportSocket transport_socket = 3;
}
// Extended cluster type.
message CustomClusterType {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.Cluster.CustomClusterType";
// The type of the cluster to instantiate. The name must match a supported cluster type.
string name = 1 [(validate.rules).string = {min_bytes: 1}];
// Cluster specific configuration which depends on the cluster being instantiated.
// See the supported cluster for further documentation.
google.protobuf.Any typed_config = 2;
}
// Only valid when discovery type is EDS.
message EdsClusterConfig {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.Cluster.EdsClusterConfig";
// Configuration for the source of EDS updates for this Cluster.
core.v3alpha.ConfigSource eds_config = 1;
// Optional alternative to cluster name to present to EDS. This does not
// have the same restrictions as cluster name, i.e. it may be arbitrary
// length.
string service_name = 2;
}
// Optionally divide the endpoints in this cluster into subsets defined by
// endpoint metadata and selected by route and weighted cluster metadata.
// [#next-free-field: 8]
message LbSubsetConfig {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.Cluster.LbSubsetConfig";
// If NO_FALLBACK is selected, a result
// equivalent to no healthy hosts is reported. If ANY_ENDPOINT is selected,
// any cluster endpoint may be returned (subject to policy, health checks,
// etc). If DEFAULT_SUBSET is selected, load balancing is performed over the
// endpoints matching the values from the default_subset field.
enum LbSubsetFallbackPolicy {
NO_FALLBACK = 0;
ANY_ENDPOINT = 1;
DEFAULT_SUBSET = 2;
}
// Specifications for subsets.
message LbSubsetSelector {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector";
// Allows to override top level fallback policy per selector.
enum LbSubsetSelectorFallbackPolicy {
// If NOT_DEFINED top level config fallback policy is used instead.
NOT_DEFINED = 0;
// If NO_FALLBACK is selected, a result equivalent to no healthy hosts is reported.
NO_FALLBACK = 1;
// If ANY_ENDPOINT is selected, any cluster endpoint may be returned
// (subject to policy, health checks, etc).
ANY_ENDPOINT = 2;
// If DEFAULT_SUBSET is selected, load balancing is performed over the
// endpoints matching the values from the default_subset field.
DEFAULT_SUBSET = 3;
// If KEYS_SUBSET is selected, subset selector matching is performed again with metadata
// keys reduced to
// :ref:`fallback_keys_subset<envoy_api_field_config.cluster.v3alpha.Cluster.LbSubsetConfig.LbSubsetSelector.fallback_keys_subset>`.
// It allows for a fallback to a different, less specific selector if some of the keys of
// the selector are considered optional.
KEYS_SUBSET = 4;
}
// List of keys to match with the weighted cluster metadata.
repeated string keys = 1;
// The behavior used when no endpoint subset matches the selected route's
// metadata.
LbSubsetSelectorFallbackPolicy fallback_policy = 2
[(validate.rules).enum = {defined_only: true}];
// Subset of
// :ref:`keys<envoy_api_field_config.cluster.v3alpha.Cluster.LbSubsetConfig.LbSubsetSelector.keys>`
// used by
// :ref:`KEYS_SUBSET<envoy_api_enum_value_config.cluster.v3alpha.Cluster.LbSubsetConfig.LbSubsetSelector.LbSubsetSelectorFallbackPolicy.KEYS_SUBSET>`
// fallback policy.
// It has to be a non empty list if KEYS_SUBSET fallback policy is selected.
// For any other fallback policy the parameter is not used and should not be set.
// Only values also present in
// :ref:`keys<envoy_api_field_config.cluster.v3alpha.Cluster.LbSubsetConfig.LbSubsetSelector.keys>`
// are allowed, but `fallback_keys_subset` cannot be equal to `keys`.
repeated string fallback_keys_subset = 3;
}
// The behavior used when no endpoint subset matches the selected route's
// metadata. The value defaults to
// :ref:`NO_FALLBACK<envoy_api_enum_value_config.cluster.v3alpha.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
LbSubsetFallbackPolicy fallback_policy = 1 [(validate.rules).enum = {defined_only: true}];
// Specifies the default subset of endpoints used during fallback if
// fallback_policy is
// :ref:`DEFAULT_SUBSET<envoy_api_enum_value_config.cluster.v3alpha.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.
// Each field in default_subset is
// compared to the matching LbEndpoint.Metadata under the *envoy.lb*
// namespace. It is valid for no hosts to match, in which case the behavior
// is the same as a fallback_policy of
// :ref:`NO_FALLBACK<envoy_api_enum_value_config.cluster.v3alpha.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
google.protobuf.Struct default_subset = 2;
// For each entry, LbEndpoint.Metadata's
// *envoy.lb* namespace is traversed and a subset is created for each unique
// combination of key and value. For example:
//
// .. code-block:: json
//
// { "subset_selectors": [
// { "keys": [ "version" ] },
// { "keys": [ "stage", "hardware_type" ] }
// ]}
//
// A subset is matched when the metadata from the selected route and
// weighted cluster contains the same keys and values as the subset's
// metadata. The same host may appear in multiple subsets.
repeated LbSubsetSelector subset_selectors = 3;
// If true, routing to subsets will take into account the localities and locality weights of the
// endpoints when making the routing decision.
//
// There are some potential pitfalls associated with enabling this feature, as the resulting
// traffic split after applying both a subset match and locality weights might be undesirable.
//
// Consider for example a situation in which you have 50/50 split across two localities X/Y
// which have 100 hosts each without subsetting. If the subset LB results in X having only 1
// host selected but Y having 100, then a lot more load is being dumped on the single host in X
// than originally anticipated in the load balancing assignment delivered via EDS.
bool locality_weight_aware = 4;
// When used with locality_weight_aware, scales the weight of each locality by the ratio
// of hosts in the subset vs hosts in the original subset. This aims to even out the load
// going to an individual locality if said locality is disproportionately affected by the
// subset predicate.
bool scale_locality_weight = 5;
// If true, when a fallback policy is configured and its corresponding subset fails to find
// a host this will cause any host to be selected instead.
//
// This is useful when using the default subset as the fallback policy, given the default
// subset might become empty. With this option enabled, if that happens the LB will attempt
// to select a host from the entire cluster.
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;
}
// Specific configuration for the LeastRequest load balancing policy.
message LeastRequestLbConfig {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.Cluster.LeastRequestLbConfig";
// The number of random healthy hosts from which the host with the fewest active requests will
// be chosen. Defaults to 2 so that we perform two-choice selection if the field is not set.
google.protobuf.UInt32Value choice_count = 1 [(validate.rules).uint32 = {gte: 2}];
}
// Specific configuration for the :ref:`RingHash<arch_overview_load_balancing_types_ring_hash>`
// load balancing policy.
message RingHashLbConfig {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.Cluster.RingHashLbConfig";
// The hash function used to hash hosts onto the ketama ring.
enum HashFunction {
// Use `xxHash <https://github.com/Cyan4973/xxHash>`_, this is the default hash function.
XX_HASH = 0;
// Use `MurmurHash2 <https://sites.google.com/site/murmurhash/>`_, this is compatible with
// std:hash<string> in GNU libstdc++ 3.4.20 or above. This is typically the case when compiled
// on Linux and not macOS.
MURMUR_HASH_2 = 1;
}
reserved 2;
// Minimum hash ring size. The larger the ring is (that is, the more hashes there are for each
// provided host) the better the request distribution will reflect the desired weights. Defaults
// to 1024 entries, and limited to 8M entries. See also
// :ref:`maximum_ring_size<envoy_api_field_config.cluster.v3alpha.Cluster.RingHashLbConfig.maximum_ring_size>`.
google.protobuf.UInt64Value minimum_ring_size = 1 [(validate.rules).uint64 = {lte: 8388608}];
// The hash function used to hash hosts onto the ketama ring. The value defaults to
// :ref:`XX_HASH<envoy_api_enum_value_config.cluster.v3alpha.Cluster.RingHashLbConfig.HashFunction.XX_HASH>`.
HashFunction hash_function = 3 [(validate.rules).enum = {defined_only: true}];
// Maximum hash ring size. Defaults to 8M entries, and limited to 8M entries, but can be lowered
// to further constrain resource use. See also
// :ref:`minimum_ring_size<envoy_api_field_config.cluster.v3alpha.Cluster.RingHashLbConfig.minimum_ring_size>`.
google.protobuf.UInt64Value maximum_ring_size = 4 [(validate.rules).uint64 = {lte: 8388608}];
}
// Specific configuration for the
// :ref:`Original Destination <arch_overview_load_balancing_types_original_destination>`
// load balancing policy.
message OriginalDstLbConfig {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.Cluster.OriginalDstLbConfig";
// When true, :ref:`x-envoy-original-dst-host
// <config_http_conn_man_headers_x-envoy-original-dst-host>` can be used to override destination
// address.
//
// .. attention::
//
// This header isn't sanitized by default, so enabling this feature allows HTTP clients to
// route traffic to arbitrary hosts and/or ports, which may have serious security
// consequences.
bool use_http_header = 1;
}
// Common configuration for all load balancer implementations.
// [#next-free-field: 7]
message CommonLbConfig {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.Cluster.CommonLbConfig";
// Configuration for :ref:`zone aware routing
// <arch_overview_load_balancing_zone_aware_routing>`.
message ZoneAwareLbConfig {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.Cluster.CommonLbConfig.ZoneAwareLbConfig";
// Configures percentage of requests that will be considered for zone aware routing
// if zone aware routing is configured. If not specified, the default is 100%.
// * :ref:`runtime values <config_cluster_manager_cluster_runtime_zone_routing>`.
// * :ref:`Zone aware routing support <arch_overview_load_balancing_zone_aware_routing>`.
type.v3alpha.Percent routing_enabled = 1;
// Configures minimum upstream cluster size required for zone aware routing
// If upstream cluster size is less than specified, zone aware routing is not performed
// even if zone aware routing is configured. If not specified, the default is 6.
// * :ref:`runtime values <config_cluster_manager_cluster_runtime_zone_routing>`.
// * :ref:`Zone aware routing support <arch_overview_load_balancing_zone_aware_routing>`.
google.protobuf.UInt64Value min_cluster_size = 2;
// If set to true, Envoy will not consider any hosts when the cluster is in :ref:`panic
// mode<arch_overview_load_balancing_panic_threshold>`. Instead, the cluster will fail all
// requests as if all hosts are unhealthy. This can help avoid potentially overwhelming a
// failing service.
bool fail_traffic_on_panic = 3;
}
// Configuration for :ref:`locality weighted load balancing
// <arch_overview_load_balancing_locality_weighted_lb>`
message LocalityWeightedLbConfig {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.Cluster.CommonLbConfig.LocalityWeightedLbConfig";
}
// Configures the :ref:`healthy panic threshold <arch_overview_load_balancing_panic_threshold>`.
// If not specified, the default is 50%.
// To disable panic mode, set to 0%.
//
// .. note::
// The specified percent will be truncated to the nearest 1%.
type.v3alpha.Percent healthy_panic_threshold = 1;
oneof locality_config_specifier {
ZoneAwareLbConfig zone_aware_lb_config = 2;
LocalityWeightedLbConfig locality_weighted_lb_config = 3;
}
// If set, all health check/weight/metadata updates that happen within this duration will be
// merged and delivered in one shot when the duration expires. The start of the duration is when
// the first update happens. This is useful for big clusters, with potentially noisy deploys
// that might trigger excessive CPU usage due to a constant stream of healthcheck state changes
// or metadata updates. The first set of updates to be seen apply immediately (e.g.: a new
// cluster). Please always keep in mind that the use of sandbox technologies may change this
// behavior.
//
// If this is not set, we default to a merge window of 1000ms. To disable it, set the merge
// window to 0.
//
// Note: merging does not apply to cluster membership changes (e.g.: adds/removes); this is
// because merging those updates isn't currently safe. See
// https://github.com/envoyproxy/envoy/pull/3941.
google.protobuf.Duration update_merge_window = 4;
// If set to true, Envoy will not consider new hosts when computing load balancing weights until
// they have been health checked for the first time. This will have no effect unless
// active health checking is also configured.
//
// Ignoring a host means that for any load balancing calculations that adjust weights based
// on the ratio of eligible hosts and total hosts (priority spillover, locality weighting and
// panic mode) Envoy will exclude these hosts in the denominator.
//
// For example, with hosts in two priorities P0 and P1, where P0 looks like
// {healthy, unhealthy (new), unhealthy (new)}
// and where P1 looks like
// {healthy, healthy}
// all traffic will still hit P0, as 1 / (3 - 2) = 1.
//
// Enabling this will allow scaling up the number of hosts for a given cluster without entering
// panic mode or triggering priority spillover, assuming the hosts pass the first health check.
//
// If panic mode is triggered, new hosts are still eligible for traffic; they simply do not
// contribute to the calculation when deciding whether panic mode is enabled or not.
bool ignore_new_hosts_until_first_hc = 5;
// If set to `true`, the cluster manager will drain all existing
// connections to upstream hosts whenever hosts are added or removed from the cluster.
bool close_connections_on_host_set_change = 6;
}
message RefreshRate {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.Cluster.RefreshRate";
// Specifies the base interval between refreshes. This parameter is required and must be greater
// than zero and less than
// :ref:`max_interval
// <envoy_api_field_config.cluster.v3alpha.Cluster.RefreshRate.max_interval>`.
google.protobuf.Duration base_interval = 1 [(validate.rules).duration = {
required: true
gt {nanos: 1000000}
}];
// Specifies the maximum interval between refreshes. This parameter is optional, but must be
// greater than or equal to the
// :ref:`base_interval
// <envoy_api_field_config.cluster.v3alpha.Cluster.RefreshRate.base_interval>` if set. The
// default is 10 times the :ref:`base_interval
// <envoy_api_field_config.cluster.v3alpha.Cluster.RefreshRate.base_interval>`.
google.protobuf.Duration max_interval = 2 [(validate.rules).duration = {gt {nanos: 1000000}}];
}
reserved 12, 15, 11, 35;
reserved "tls_context", "extension_protocol_options";
// Configuration to use different transport sockets for different endpoints.
// The entry of *envoy.transport_socket* in the
// :ref:`LbEndpoint.Metadata <envoy_api_field_config.endpoint.v3alpha.LbEndpoint.metadata>`
// is used to match against the transport sockets as they appear in the list. The first
// :ref:`match <envoy_api_msg_config.cluster.v3alpha.Cluster.TransportSocketMatch>` is used.
// For example, with the following match
//
// .. code-block:: yaml
//
// transport_socket_matches:
// - name: "enableMTLS"
// match:
// acceptMTLS: true
// transport_socket:
// name: envoy.transport_sockets.tls
// config: { ... } # tls socket configuration
// - name: "defaultToPlaintext"
// match: {}
// transport_socket:
// name: envoy.transport_sockets.raw_buffer
//
// Connections to the endpoints whose metadata value under *envoy.transport_socket*
// having "acceptMTLS"/"true" key/value pair use the "enableMTLS" socket configuration.
//
// If a :ref:`socket match <envoy_api_msg_config.cluster.v3alpha.Cluster.TransportSocketMatch>`
// with empty match criteria is provided, that always match any endpoint. For example, the
// "defaultToPlaintext" socket match in case above.
//
// If an endpoint metadata's value under *envoy.transport_socket* does not match any
// *TransportSocketMatch*, socket configuration fallbacks to use the *tls_context* or
// *transport_socket* specified in this cluster.
//
// This field allows gradual and flexible transport socket configuration changes.
//
// The metadata of endpoints in EDS can indicate transport socket capabilities. For example,
// an endpoint's metadata can have two key value pairs as "acceptMTLS": "true",
// "acceptPlaintext": "true". While some other endpoints, only accepting plaintext traffic
// has "acceptPlaintext": "true" metadata information.
//
// Then the xDS server can configure the CDS to a client, Envoy A, to send mutual TLS
// traffic for endpoints with "acceptMTLS": "true", by adding a corresponding
// *TransportSocketMatch* in this field. Other client Envoys receive CDS without
// *transport_socket_match* set, and still send plain text traffic to the same cluster.
//
// [#comment:TODO(incfly): add a detailed architecture doc on intended usage.]
repeated TransportSocketMatch transport_socket_matches = 43;
// Supplies the name of the cluster which must be unique across all clusters.
// The cluster name is used when emitting
// :ref:`statistics <config_cluster_manager_cluster_stats>` if :ref:`alt_stat_name
// <envoy_api_field_config.cluster.v3alpha.Cluster.alt_stat_name>` is not provided.
// Any ``:`` in the cluster name will be converted to ``_`` when emitting statistics.
string name = 1 [(validate.rules).string = {min_bytes: 1}];
// An optional alternative to the cluster name to be used while emitting stats.
// Any ``:`` in the name will be converted to ``_`` when emitting statistics. This should not be
// confused with :ref:`Router Filter Header
// <config_http_filters_router_x-envoy-upstream-alt-stat-name>`.
string alt_stat_name = 28;
oneof cluster_discovery_type {
// The :ref:`service discovery type <arch_overview_service_discovery_types>`
// to use for resolving the cluster.
DiscoveryType type = 2 [(validate.rules).enum = {defined_only: true}];
// The custom cluster type.
CustomClusterType cluster_type = 38;
}
// Configuration to use for EDS updates for the Cluster.
EdsClusterConfig eds_cluster_config = 3;
// The timeout for new network connections to hosts in the cluster.
google.protobuf.Duration connect_timeout = 4 [(validate.rules).duration = {gt {}}];
// Soft limit on size of the clusters connections read and write buffers. If
// unspecified, an implementation defined default is applied (1MiB).
google.protobuf.UInt32Value per_connection_buffer_limit_bytes = 5;
// The :ref:`load balancer type <arch_overview_load_balancing_types>` to use
// when picking a host in the cluster.
LbPolicy lb_policy = 6 [(validate.rules).enum = {defined_only: true}];
// If the service discovery type is
// :ref:`STATIC<envoy_api_enum_value_config.cluster.v3alpha.Cluster.DiscoveryType.STATIC>`,
// :ref:`STRICT_DNS<envoy_api_enum_value_config.cluster.v3alpha.Cluster.DiscoveryType.STRICT_DNS>`
// or
// :ref:`LOGICAL_DNS<envoy_api_enum_value_config.cluster.v3alpha.Cluster.DiscoveryType.LOGICAL_DNS>`,
// then hosts is required.
//
// .. attention::
//
// **This field is deprecated**. Set the
// :ref:`load_assignment<envoy_api_field_config.cluster.v3alpha.Cluster.load_assignment>` field
// instead.
//
repeated core.v3alpha.Address hosts = 7;
// Setting this is required for specifying members of
// :ref:`STATIC<envoy_api_enum_value_config.cluster.v3alpha.Cluster.DiscoveryType.STATIC>`,
// :ref:`STRICT_DNS<envoy_api_enum_value_config.cluster.v3alpha.Cluster.DiscoveryType.STRICT_DNS>`
// or
// :ref:`LOGICAL_DNS<envoy_api_enum_value_config.cluster.v3alpha.Cluster.DiscoveryType.LOGICAL_DNS>`
// clusters. This field supersedes
// :ref:`hosts<envoy_api_field_config.cluster.v3alpha.Cluster.hosts>` field.
// [#comment:TODO(dio): Deprecate the hosts field and add it to :ref:`deprecated log<deprecated>`
// once load_assignment is implemented.]
//
// .. attention::
//
// Setting this allows non-EDS cluster types to contain embedded EDS equivalent
// :ref:`endpoint assignments<envoy_api_msg_config.endpoint.v3alpha.ClusterLoadAssignment>`.
// Setting this overrides :ref:`hosts<envoy_api_field_config.cluster.v3alpha.Cluster.hosts>`
// values.
//
endpoint.v3alpha.ClusterLoadAssignment load_assignment = 33;
// Optional :ref:`active health checking <arch_overview_health_checking>`
// configuration for the cluster. If no
// configuration is specified no health checking will be done and all cluster
// members will be considered healthy at all times.
repeated core.v3alpha.HealthCheck health_checks = 8;
// Optional maximum requests for a single upstream connection. This parameter
// is respected by both the HTTP/1.1 and HTTP/2 connection pool
// implementations. If not specified, there is no limit. Setting this
// parameter to 1 will effectively disable keep alive.
google.protobuf.UInt32Value max_requests_per_connection = 9;
// Optional :ref:`circuit breaking <arch_overview_circuit_break>` for the cluster.
CircuitBreakers circuit_breakers = 10;
// Additional options when handling HTTP requests upstream. These options will be applicable to
// both HTTP1 and HTTP2 requests.
core.v3alpha.HttpProtocolOptions common_http_protocol_options = 29;
// Additional options when handling HTTP1 requests.
core.v3alpha.Http1ProtocolOptions http_protocol_options = 13;
// Even if default HTTP2 protocol options are desired, this field must be
// set so that Envoy will assume that the upstream supports HTTP/2 when
// making new HTTP connection pool connections. Currently, Envoy only
// supports prior knowledge for upstream connections. Even if TLS is used
// with ALPN, `http2_protocol_options` must be specified. As an aside this allows HTTP/2
// connections to happen over plain text.
core.v3alpha.Http2ProtocolOptions http2_protocol_options = 14;
// The extension_protocol_options field is used to provide extension-specific protocol options
// for upstream connections. The key should match the extension filter name, such as
// "envoy.filters.network.thrift_proxy". See the extension's documentation for details on
// specific options.
map<string, google.protobuf.Any> typed_extension_protocol_options = 36;
// If the DNS refresh rate is specified and the cluster type is either
// :ref:`STRICT_DNS<envoy_api_enum_value_config.cluster.v3alpha.Cluster.DiscoveryType.STRICT_DNS>`,
// or
// :ref:`LOGICAL_DNS<envoy_api_enum_value_config.cluster.v3alpha.Cluster.DiscoveryType.LOGICAL_DNS>`,
// this value is used as the clusters DNS refresh
// rate. The value configured must be at least 1ms. If this setting is not specified, the
// value defaults to 5000ms. For cluster types other than
// :ref:`STRICT_DNS<envoy_api_enum_value_config.cluster.v3alpha.Cluster.DiscoveryType.STRICT_DNS>`
// and
// :ref:`LOGICAL_DNS<envoy_api_enum_value_config.cluster.v3alpha.Cluster.DiscoveryType.LOGICAL_DNS>`
// this setting is ignored.
google.protobuf.Duration dns_refresh_rate = 16
[(validate.rules).duration = {gt {nanos: 1000000}}];
// If the DNS failure refresh rate is specified and the cluster type is either
// :ref:`STRICT_DNS<envoy_api_enum_value_config.cluster.v3alpha.Cluster.DiscoveryType.STRICT_DNS>`,
// or
// :ref:`LOGICAL_DNS<envoy_api_enum_value_config.cluster.v3alpha.Cluster.DiscoveryType.LOGICAL_DNS>`,
// this is used as the clusters DNS refresh rate when requests are failing. If this setting is
// not specified, the failure refresh rate defaults to the DNS refresh rate. For cluster types
// other than
// :ref:`STRICT_DNS<envoy_api_enum_value_config.cluster.v3alpha.Cluster.DiscoveryType.STRICT_DNS>`
// and
// :ref:`LOGICAL_DNS<envoy_api_enum_value_config.cluster.v3alpha.Cluster.DiscoveryType.LOGICAL_DNS>`
// this setting is ignored.
//
// Note: Currently, DNS failures and empty DNS responses are not treated differently and this
// configuration is applied in both situations.
RefreshRate dns_failure_refresh_rate = 44;
// Optional configuration for setting cluster's DNS refresh rate. If the value is set to true,
// cluster's DNS refresh rate will be set to resource record's TTL which comes from DNS
// resolution.
bool respect_dns_ttl = 39;
// The DNS IP address resolution policy. If this setting is not specified, the
// value defaults to
// :ref:`AUTO<envoy_api_enum_value_config.cluster.v3alpha.Cluster.DnsLookupFamily.AUTO>`.
DnsLookupFamily dns_lookup_family = 17 [(validate.rules).enum = {defined_only: true}];
// If DNS resolvers are specified and the cluster type is either
// :ref:`STRICT_DNS<envoy_api_enum_value_config.cluster.v3alpha.Cluster.DiscoveryType.STRICT_DNS>`,
// or
// :ref:`LOGICAL_DNS<envoy_api_enum_value_config.cluster.v3alpha.Cluster.DiscoveryType.LOGICAL_DNS>`,
// this value is used to specify the clusters dns resolvers.
// If this setting is not specified, the value defaults to the default
// resolver, which uses /etc/resolv.conf for configuration. For cluster types
// other than
// :ref:`STRICT_DNS<envoy_api_enum_value_config.cluster.v3alpha.Cluster.DiscoveryType.STRICT_DNS>`
// and
// :ref:`LOGICAL_DNS<envoy_api_enum_value_config.cluster.v3alpha.Cluster.DiscoveryType.LOGICAL_DNS>`
// this setting is ignored.
repeated core.v3alpha.Address dns_resolvers = 18;
// [#next-major-version: Reconcile DNS options in a single message.]
// Always use TCP queries instead of UDP queries for DNS lookups.
bool use_tcp_for_dns_lookups = 45;
// If specified, outlier detection will be enabled for this upstream cluster.
// Each of the configuration values can be overridden via
// :ref:`runtime values <config_cluster_manager_cluster_runtime_outlier_detection>`.
OutlierDetection outlier_detection = 19;
// The interval for removing stale hosts from a cluster type
// :ref:`ORIGINAL_DST<envoy_api_enum_value_config.cluster.v3alpha.Cluster.DiscoveryType.ORIGINAL_DST>`.
// Hosts are considered stale if they have not been used
// as upstream destinations during this interval. New hosts are added
// to original destination clusters on demand as new connections are
// redirected to Envoy, causing the number of hosts in the cluster to
// grow over time. Hosts that are not stale (they are actively used as
// destinations) are kept in the cluster, which allows connections to
// them remain open, saving the latency that would otherwise be spent
// on opening new connections. If this setting is not specified, the
// value defaults to 5000ms. For cluster types other than
// :ref:`ORIGINAL_DST<envoy_api_enum_value_config.cluster.v3alpha.Cluster.DiscoveryType.ORIGINAL_DST>`
// this setting is ignored.
google.protobuf.Duration cleanup_interval = 20 [(validate.rules).duration = {gt {}}];
// Optional configuration used to bind newly established upstream connections.
// This overrides any bind_config specified in the bootstrap proto.
// If the address and port are empty, no bind will be performed.
core.v3alpha.BindConfig upstream_bind_config = 21;
// Configuration for load balancing subsetting.
LbSubsetConfig lb_subset_config = 22;
// Optional configuration for the load balancing algorithm selected by
// LbPolicy. Currently only
// :ref:`RING_HASH<envoy_api_enum_value_config.cluster.v3alpha.Cluster.LbPolicy.RING_HASH>` and
// :ref:`LEAST_REQUEST<envoy_api_enum_value_config.cluster.v3alpha.Cluster.LbPolicy.LEAST_REQUEST>`
// has additional configuration options.
// Specifying ring_hash_lb_config or least_request_lb_config without setting the corresponding
// LbPolicy will generate an error at runtime.
oneof lb_config {
// Optional configuration for the Ring Hash load balancing policy.
RingHashLbConfig ring_hash_lb_config = 23;
// Optional configuration for the Original Destination load balancing policy.
OriginalDstLbConfig original_dst_lb_config = 34;
// Optional configuration for the LeastRequest load balancing policy.
LeastRequestLbConfig least_request_lb_config = 37;
}
// Common configuration for all load balancer implementations.
CommonLbConfig common_lb_config = 27;
// Optional custom transport socket implementation to use for upstream connections.
// To setup TLS, set a transport socket with name `tls` and
// :ref:`UpstreamTlsContexts
// <envoy_api_msg_extensions.transport_sockets.tls.v3alpha.UpstreamTlsContext>` in the
// `typed_config`. If no transport socket configuration is specified, new connections will be set
// up with plaintext.
core.v3alpha.TransportSocket transport_socket = 24;
// The Metadata field can be used to provide additional information about the
// cluster. It can be used for stats, logging, and varying filter behavior.
// Fields should use reverse DNS notation to denote which entity within Envoy
// will need the information. For instance, if the metadata is intended for
// the Router filter, the filter name should be specified as *envoy.router*.
core.v3alpha.Metadata metadata = 25;
// Determines how Envoy selects the protocol used to speak to upstream hosts.
ClusterProtocolSelection protocol_selection = 26;
// Optional options for upstream connections.
UpstreamConnectionOptions upstream_connection_options = 30;
// If an upstream host becomes unhealthy (as determined by the configured health checks
// or outlier detection), immediately close all connections to the failed host.
//
// .. note::
//
// This is currently only supported for connections created by tcp_proxy.
//
// .. note::
//
// The current implementation of this feature closes all connections immediately when
// the unhealthy status is detected. If there are a large number of connections open
// to an upstream host that becomes unhealthy, Envoy may spend a substantial amount of
// time exclusively closing these connections, and not processing any other traffic.
bool close_connections_on_host_health_failure = 31;
// If set to true, Envoy will ignore the health value of a host when processing its removal
// from service discovery. This means that if active health checking is used, Envoy will *not*
// wait for the endpoint to go unhealthy before removing it.
bool ignore_health_on_host_removal = 32;
// An (optional) network filter chain, listed in the order the filters should be applied.
// The chain will be applied to all outgoing connections that Envoy makes to the upstream
// servers of this cluster.
repeated Filter filters = 40;
// [#not-implemented-hide:] New mechanism for LB policy configuration. Used only if the
// :ref:`lb_policy<envoy_api_field_config.cluster.v3alpha.Cluster.lb_policy>` field has the value
// :ref:`LOAD_BALANCING_POLICY_CONFIG<envoy_api_enum_value_config.cluster.v3alpha.Cluster.LbPolicy.LOAD_BALANCING_POLICY_CONFIG>`.
LoadBalancingPolicy load_balancing_policy = 41;
// [#not-implemented-hide:]
// If present, tells the client where to send load reports via LRS. If not present, the
// client will fall back to a client-side default, which may be either (a) don't send any
// load reports or (b) send load reports for all clusters to a single default server
// (which may be configured in the bootstrap file).
//
// Note that if multiple clusters point to the same LRS server, the client may choose to
// create a separate stream for each cluster or it may choose to coalesce the data for
// multiple clusters onto a single stream. Either way, the client must make sure to send
// the data for any given cluster on no more than one stream.
//
// [#next-major-version: In the v3 API, we should consider restructuring this somehow,
// maybe by allowing LRS to go on the ADS stream, or maybe by moving some of the negotiation
// from the LRS stream here.]
core.v3alpha.ConfigSource lrs_server = 42;
}
// [#not-implemented-hide:] Extensible load balancing policy configuration.
//
// Every LB policy defined via this mechanism will be identified via a unique name using reverse
// DNS notation. If the policy needs configuration parameters, it must define a message for its
// own configuration, which will be stored in the config field. The name of the policy will tell
// clients which type of message they should expect to see in the config field.
//
// Note that there are cases where it is useful to be able to independently select LB policies
// for choosing a locality and for choosing an endpoint within that locality. For example, a
// given deployment may always use the same policy to choose the locality, but for choosing the
// endpoint within the locality, some clusters may use weighted-round-robin, while others may
// use some sort of session-based balancing.
//
// This can be accomplished via hierarchical LB policies, where the parent LB policy creates a
// child LB policy for each locality. For each request, the parent chooses the locality and then
// delegates to the child policy for that locality to choose the endpoint within the locality.
//
// To facilitate this, the config message for the top-level LB policy may include a field of
// type LoadBalancingPolicy that specifies the child policy.
message LoadBalancingPolicy {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.LoadBalancingPolicy";
message Policy {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.LoadBalancingPolicy.Policy";
reserved 2;
reserved "config";
// Required. The name of the LB policy.
string name = 1;
google.protobuf.Any typed_config = 3;
}
// Each client will iterate over the list in order and stop at the first policy that it
// supports. This provides a mechanism for starting to use new LB policies that are not yet
// supported by all clients.
repeated Policy policies = 1;
}
// An extensible structure containing the address Envoy should bind to when
// establishing upstream connections.
message UpstreamBindConfig {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.UpstreamBindConfig";
// The address Envoy should bind to when establishing upstream connections.
core.v3alpha.Address source_address = 1;
}
message UpstreamConnectionOptions {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.UpstreamConnectionOptions";
// If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
core.v3alpha.TcpKeepalive tcp_keepalive = 1;
}

@ -2,7 +2,7 @@ syntax = "proto3";
package envoy.config.common.dynamic_forward_proxy.v2alpha;
import "envoy/api/v2/cds.proto";
import "envoy/api/v2/cluster.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/wrappers.proto";

@ -47,7 +47,7 @@ message SocketAddress {
// in :ref:`FilterChainMatch <envoy_api_msg_config.listener.v3alpha.FilterChainMatch>`.] When used
// within an upstream :ref:`BindConfig <envoy_api_msg_config.core.v3alpha.BindConfig>`, the
// address controls the source address of outbound connections. For :ref:`clusters
// <envoy_api_msg_service.cluster.v3alpha.Cluster>`, the cluster type determines whether the
// <envoy_api_msg_config.cluster.v3alpha.Cluster>`, the cluster type determines whether the
// address must be an IP (*STATIC* or *EDS* clusters) or a hostname resolved by DNS
// (*STRICT_DNS* or *LOGICAL_DNS* clusters). Address resolution can be customized
// via :ref:`resolver_name <envoy_api_field_config.core.v3alpha.SocketAddress.resolver_name>`.
@ -104,10 +104,11 @@ message BindConfig {
// Whether to set the *IP_FREEBIND* option when creating the socket. When this
// flag is set to true, allows the :ref:`source_address
// <envoy_api_field_service.cluster.v3alpha.UpstreamBindConfig.source_address>` to be an IP
// address that is not configured on the system running Envoy. When this flag is set to false, the
// option *IP_FREEBIND* is disabled on the socket. When this flag is not set (default), the socket
// is not modified, i.e. the option is neither enabled nor disabled.
// <envoy_api_field_config.cluster.v3alpha.UpstreamBindConfig.source_address>` to be an IP address
// that is not configured on the system running Envoy. When this flag is set
// to false, the option *IP_FREEBIND* is disabled on the socket. When this
// flag is not set (default), the socket is not modified, i.e. the option is
// neither enabled nor disabled.
google.protobuf.BoolValue freebind = 2;
// Additional socket options that may not be present in Envoy source code or

@ -257,7 +257,7 @@ message AsyncDataSource {
}
// Configuration for transport socket in :ref:`listeners <config_listeners>` and
// :ref:`clusters <envoy_api_msg_service.cluster.v3alpha.Cluster>`. If the configuration is
// :ref:`clusters <envoy_api_msg_config.cluster.v3alpha.Cluster>`. If the configuration is
// empty, a default transport socket implementation and configuration will be
// chosen based on the platform and existence of tls_context.
message TransportSocket {

@ -109,7 +109,7 @@ message RateLimitSettings {
// Configuration for :ref:`listeners <config_listeners>`, :ref:`clusters
// <config_cluster_manager>`, :ref:`routes
// <envoy_api_msg_service.route.v3alpha.RouteConfiguration>`, :ref:`endpoints
// <envoy_api_msg_config.route.v3alpha.RouteConfiguration>`, :ref:`endpoints
// <arch_overview_service_discovery>` etc. may either be sourced from the
// filesystem or from an xDS API source. Filesystem configs are watched with
// inotify for updates.

@ -30,8 +30,8 @@ message GrpcService {
"envoy.api.v2.core.GrpcService.EnvoyGrpc";
// The name of the upstream gRPC cluster. SSL credentials will be supplied
// in the :ref:`Cluster <envoy_api_msg_service.cluster.v3alpha.Cluster>` :ref:`transport_socket
// <envoy_api_field_service.cluster.v3alpha.Cluster.transport_socket>`.
// in the :ref:`Cluster <envoy_api_msg_config.cluster.v3alpha.Cluster>` :ref:`transport_socket
// <envoy_api_field_config.cluster.v3alpha.Cluster.transport_socket>`.
string cluster_name = 1 [(validate.rules).string = {min_bytes: 1}];
}

@ -6,8 +6,10 @@ licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/api/v2:pkg",
"//envoy/api/v2/endpoint:pkg",
"//envoy/config/core/v3alpha:pkg",
"//envoy/type/v3alpha:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)

@ -2,10 +2,11 @@ syntax = "proto3";
package envoy.config.endpoint.v3alpha;
import "envoy/config/core/v3alpha/address.proto";
import "envoy/config/core/v3alpha/base.proto";
import "envoy/config/core/v3alpha/health_check.proto";
import "envoy/config/endpoint/v3alpha/endpoint_components.proto";
import "envoy/type/v3alpha/percent.proto";
import "google/api/annotations.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/wrappers.proto";
import "udpa/annotations/versioning.proto";
@ -16,126 +17,109 @@ option java_package = "io.envoyproxy.envoy.config.endpoint.v3alpha";
option java_outer_classname = "EndpointProto";
option java_multiple_files = true;
// [#protodoc-title: Endpoints]
// Upstream host identifier.
message Endpoint {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.endpoint.Endpoint";
// [#protodoc-title: Endpoint configuration]
// Endpoint discovery :ref:`architecture overview <arch_overview_service_discovery_types_eds>`
// Each route from RDS will map to a single cluster or traffic split across
// clusters using weights expressed in the RDS WeightedCluster.
//
// With EDS, each cluster is treated independently from a LB perspective, with
// LB taking place between the Localities within a cluster and at a finer
// granularity between the hosts within a locality. The percentage of traffic
// for each endpoint is determined by both its load_balancing_weight, and the
// load_balancing_weight of its locality. First, a locality will be selected,
// then an endpoint within that locality will be chose based on its weight.
// [#next-free-field: 6]
message ClusterLoadAssignment {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.ClusterLoadAssignment";
// The optional health check configuration.
message HealthCheckConfig {
// Load balancing policy settings.
// [#next-free-field: 6]
message Policy {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.endpoint.Endpoint.HealthCheckConfig";
"envoy.api.v2.ClusterLoadAssignment.Policy";
// Optional alternative health check port value.
//
// By default the health check address port of an upstream host is the same
// as the host's serving address port. This provides an alternative health
// check port. Setting this with a non-zero value allows an upstream host
// to have different health check address port.
uint32 port_value = 1 [(validate.rules).uint32 = {lte: 65535}];
}
message DropOverload {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.ClusterLoadAssignment.Policy.DropOverload";
// The upstream host address.
//
// .. attention::
//
// The form of host address depends on the given cluster type. For STATIC or EDS,
// it is expected to be a direct IP address (or something resolvable by the
// specified :ref:`resolver <envoy_api_field_config.core.v3alpha.SocketAddress.resolver_name>`
// in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname,
// and will be resolved via DNS.
core.v3alpha.Address address = 1;
// The optional health check configuration is used as configuration for the
// health checker to contact the health checked host.
//
// .. attention::
//
// This takes into effect only for upstream clusters with
// :ref:`active health checking <arch_overview_health_checking>` enabled.
HealthCheckConfig health_check_config = 2;
}
// Identifier for the policy specifying the drop.
string category = 1 [(validate.rules).string = {min_bytes: 1}];
// An Endpoint that Envoy can route traffic to.
// [#next-free-field: 6]
message LbEndpoint {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.endpoint.LbEndpoint";
// Percentage of traffic that should be dropped for the category.
type.v3alpha.FractionalPercent drop_percentage = 2;
}
// Upstream host identifier or a named reference.
oneof host_identifier {
Endpoint endpoint = 1;
reserved 1;
// Action to trim the overall incoming traffic to protect the upstream
// hosts. This action allows protection in case the hosts are unable to
// recover from an outage, or unable to autoscale or unable to handle
// incoming traffic volume for any reason.
//
// At the client each category is applied one after the other to generate
// the 'actual' drop percentage on all outgoing traffic. For example:
//
// .. code-block:: json
//
// { "drop_overloads": [
// { "category": "throttle", "drop_percentage": 60 }
// { "category": "lb", "drop_percentage": 50 }
// ]}
//
// The actual drop percentages applied to the traffic at the clients will be
// "throttle"_drop = 60%
// "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
// actual_outgoing_load = 20% // remaining after applying all categories.
repeated DropOverload drop_overloads = 2;
// Priority levels and localities are considered overprovisioned with this
// factor (in percentage). This means that we don't consider a priority
// level or locality unhealthy until the percentage of healthy hosts
// multiplied by the overprovisioning factor drops below 100.
// With the default value 140(1.4), Envoy doesn't consider a priority level
// or a locality unhealthy until their percentage of healthy hosts drops
// below 72%. For example:
//
// .. code-block:: json
//
// { "overprovisioning_factor": 100 }
//
// Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
// :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
google.protobuf.UInt32Value overprovisioning_factor = 3 [(validate.rules).uint32 = {gt: 0}];
// The max time until which the endpoints from this assignment can be used.
// If no new assignments are received before this time expires the endpoints
// are considered stale and should be marked unhealthy.
// Defaults to 0 which means endpoints never go stale.
google.protobuf.Duration endpoint_stale_after = 4 [(validate.rules).duration = {gt {}}];
// The flag to disable overprovisioning. If it is set to true,
// :ref:`overprovisioning factor
// <arch_overview_load_balancing_overprovisioning_factor>` will be ignored
// and Envoy will not perform graceful failover between priority levels or
// localities as endpoints become unhealthy. Otherwise Envoy will perform
// graceful failover as :ref:`overprovisioning factor
// <arch_overview_load_balancing_overprovisioning_factor>` suggests.
// [#next-major-version: Unify with overprovisioning config as a single message.]
// [#not-implemented-hide:]
string endpoint_name = 5;
bool disable_overprovisioning = 5;
}
// Optional health status when known and supplied by EDS server.
core.v3alpha.HealthStatus health_status = 2;
// The endpoint metadata specifies values that may be used by the load
// balancer to select endpoints in a cluster for a given request. The filter
// name should be specified as *envoy.lb*. An example boolean key-value pair
// is *canary*, providing the optional canary status of the upstream host.
// This may be matched against in a route's
// :ref:`RouteAction <envoy_api_msg_config.route.v3alpha.RouteAction>` metadata_match field
// to subset the endpoints considered in cluster load balancing.
core.v3alpha.Metadata metadata = 3;
// The optional load balancing weight of the upstream host; at least 1.
// Envoy uses the load balancing weight in some of the built in load
// balancers. The load balancing weight for an endpoint is divided by the sum
// of the weights of all endpoints in the endpoint's locality to produce a
// percentage of traffic for the endpoint. This percentage is then further
// weighted by the endpoint's locality's load balancing weight from
// LocalityLbEndpoints. If unspecified, each host is presumed to have equal
// weight in a locality.
google.protobuf.UInt32Value load_balancing_weight = 4 [(validate.rules).uint32 = {gte: 1}];
}
// Name of the cluster. This will be the :ref:`service_name
// <envoy_api_field_config.cluster.v3alpha.Cluster.EdsClusterConfig.service_name>` value if
// specified in the cluster :ref:`EdsClusterConfig
// <envoy_api_msg_config.cluster.v3alpha.Cluster.EdsClusterConfig>`.
string cluster_name = 1 [(validate.rules).string = {min_bytes: 1}];
// A group of endpoints belonging to a Locality.
// One can have multiple LocalityLbEndpoints for a locality, but this is
// generally only done if the different groups need to have different load
// balancing weights or different priorities.
// [#next-free-field: 7]
message LocalityLbEndpoints {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.endpoint.LocalityLbEndpoints";
// Identifies location of where the upstream hosts run.
core.v3alpha.Locality locality = 1;
// The group of endpoints belonging to the locality specified.
repeated LbEndpoint lb_endpoints = 2;
// Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
// balancing weight for a locality is divided by the sum of the weights of all
// localities at the same priority level to produce the effective percentage
// of traffic for the locality.
//
// Locality weights are only considered when :ref:`locality weighted load
// balancing <arch_overview_load_balancing_locality_weighted_lb>` is
// configured. These weights are ignored otherwise. If no weights are
// specified when locality weighted load balancing is enabled, the locality is
// assigned no load.
google.protobuf.UInt32Value load_balancing_weight = 3 [(validate.rules).uint32 = {gte: 1}];
// Optional: the priority for this LocalityLbEndpoints. If unspecified this will
// default to the highest priority (0).
//
// Under usual circumstances, Envoy will only select endpoints for the highest
// priority (0). In the event all endpoints for a particular priority are
// unavailable/unhealthy, Envoy will fail over to selecting endpoints for the
// next highest priority group.
//
// Priorities should range from 0 (highest) to N (lowest) without skipping.
uint32 priority = 5 [(validate.rules).uint32 = {lte: 128}];
// Optional: Per locality proximity value which indicates how close this
// locality is from the source locality. This value only provides ordering
// information (lower the value, closer it is to the source locality).
// This will be consumed by load balancing schemes that need proximity order
// to determine where to route the requests.
// List of endpoints to load balance to.
repeated LocalityLbEndpoints endpoints = 2;
// Map of named endpoints that can be referenced in LocalityLbEndpoints.
// [#not-implemented-hide:]
google.protobuf.UInt32Value proximity = 6;
map<string, Endpoint> named_endpoints = 5;
// Load balancing policy settings.
Policy policy = 4;
}

@ -0,0 +1,141 @@
syntax = "proto3";
package envoy.config.endpoint.v3alpha;
import "envoy/config/core/v3alpha/address.proto";
import "envoy/config/core/v3alpha/base.proto";
import "envoy/config/core/v3alpha/health_check.proto";
import "google/protobuf/wrappers.proto";
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.config.endpoint.v3alpha";
option java_outer_classname = "EndpointComponentsProto";
option java_multiple_files = true;
// [#protodoc-title: Endpoints]
// Upstream host identifier.
message Endpoint {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.endpoint.Endpoint";
// The optional health check configuration.
message HealthCheckConfig {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.endpoint.Endpoint.HealthCheckConfig";
// Optional alternative health check port value.
//
// By default the health check address port of an upstream host is the same
// as the host's serving address port. This provides an alternative health
// check port. Setting this with a non-zero value allows an upstream host
// to have different health check address port.
uint32 port_value = 1 [(validate.rules).uint32 = {lte: 65535}];
}
// The upstream host address.
//
// .. attention::
//
// The form of host address depends on the given cluster type. For STATIC or EDS,
// it is expected to be a direct IP address (or something resolvable by the
// specified :ref:`resolver <envoy_api_field_config.core.v3alpha.SocketAddress.resolver_name>`
// in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname,
// and will be resolved via DNS.
core.v3alpha.Address address = 1;
// The optional health check configuration is used as configuration for the
// health checker to contact the health checked host.
//
// .. attention::
//
// This takes into effect only for upstream clusters with
// :ref:`active health checking <arch_overview_health_checking>` enabled.
HealthCheckConfig health_check_config = 2;
}
// An Endpoint that Envoy can route traffic to.
// [#next-free-field: 6]
message LbEndpoint {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.endpoint.LbEndpoint";
// Upstream host identifier or a named reference.
oneof host_identifier {
Endpoint endpoint = 1;
// [#not-implemented-hide:]
string endpoint_name = 5;
}
// Optional health status when known and supplied by EDS server.
core.v3alpha.HealthStatus health_status = 2;
// The endpoint metadata specifies values that may be used by the load
// balancer to select endpoints in a cluster for a given request. The filter
// name should be specified as *envoy.lb*. An example boolean key-value pair
// is *canary*, providing the optional canary status of the upstream host.
// This may be matched against in a route's
// :ref:`RouteAction <envoy_api_msg_config.route.v3alpha.RouteAction>` metadata_match field
// to subset the endpoints considered in cluster load balancing.
core.v3alpha.Metadata metadata = 3;
// The optional load balancing weight of the upstream host; at least 1.
// Envoy uses the load balancing weight in some of the built in load
// balancers. The load balancing weight for an endpoint is divided by the sum
// of the weights of all endpoints in the endpoint's locality to produce a
// percentage of traffic for the endpoint. This percentage is then further
// weighted by the endpoint's locality's load balancing weight from
// LocalityLbEndpoints. If unspecified, each host is presumed to have equal
// weight in a locality.
google.protobuf.UInt32Value load_balancing_weight = 4 [(validate.rules).uint32 = {gte: 1}];
}
// A group of endpoints belonging to a Locality.
// One can have multiple LocalityLbEndpoints for a locality, but this is
// generally only done if the different groups need to have different load
// balancing weights or different priorities.
// [#next-free-field: 7]
message LocalityLbEndpoints {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.endpoint.LocalityLbEndpoints";
// Identifies location of where the upstream hosts run.
core.v3alpha.Locality locality = 1;
// The group of endpoints belonging to the locality specified.
repeated LbEndpoint lb_endpoints = 2;
// Optional: Per priority/region/zone/sub_zone weight; at least 1. The load
// balancing weight for a locality is divided by the sum of the weights of all
// localities at the same priority level to produce the effective percentage
// of traffic for the locality.
//
// Locality weights are only considered when :ref:`locality weighted load
// balancing <arch_overview_load_balancing_locality_weighted_lb>` is
// configured. These weights are ignored otherwise. If no weights are
// specified when locality weighted load balancing is enabled, the locality is
// assigned no load.
google.protobuf.UInt32Value load_balancing_weight = 3 [(validate.rules).uint32 = {gte: 1}];
// Optional: the priority for this LocalityLbEndpoints. If unspecified this will
// default to the highest priority (0).
//
// Under usual circumstances, Envoy will only select endpoints for the highest
// priority (0). In the event all endpoints for a particular priority are
// unavailable/unhealthy, Envoy will fail over to selecting endpoints for the
// next highest priority group.
//
// Priorities should range from 0 (highest) to N (lowest) without skipping.
uint32 priority = 5 [(validate.rules).uint32 = {lte: 128}];
// Optional: Per locality proximity value which indicates how close this
// locality is from the source locality. This value only provides ordering
// information (lower the value, closer it is to the source locality).
// This will be consumed by load balancing schemes that need proximity order
// to determine where to route the requests.
// [#not-implemented-hide:]
google.protobuf.UInt32Value proximity = 6;
}

@ -3,7 +3,7 @@ syntax = "proto3";
package envoy.config.filter.accesslog.v2;
import "envoy/api/v2/core/base.proto";
import "envoy/api/v2/route/route.proto";
import "envoy/api/v2/route/route_components.proto";
import "envoy/type/percent.proto";
import "google/protobuf/any.proto";

@ -3,7 +3,7 @@ syntax = "proto3";
package envoy.config.filter.accesslog.v3alpha;
import "envoy/config/core/v3alpha/base.proto";
import "envoy/config/route/v3alpha/route.proto";
import "envoy/config/route/v3alpha/route_components.proto";
import "envoy/type/v3alpha/percent.proto";
import "google/protobuf/any.proto";

@ -2,7 +2,7 @@ syntax = "proto3";
package envoy.config.filter.http.fault.v2;
import "envoy/api/v2/route/route.proto";
import "envoy/api/v2/route/route_components.proto";
import "envoy/config/filter/fault/v2/fault.proto";
import "envoy/type/percent.proto";

@ -2,7 +2,7 @@ syntax = "proto3";
package envoy.config.filter.http.health_check.v2;
import "envoy/api/v2/route/route.proto";
import "envoy/api/v2/route/route_components.proto";
import "envoy/type/percent.proto";
import "google/protobuf/duration.proto";

@ -4,7 +4,7 @@ package envoy.config.filter.http.jwt_authn.v2alpha;
import "envoy/api/v2/core/base.proto";
import "envoy/api/v2/core/http_uri.proto";
import "envoy/api/v2/route/route.proto";
import "envoy/api/v2/route/route_components.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/empty.proto";

@ -2,7 +2,7 @@ syntax = "proto3";
package envoy.config.filter.network.dubbo_proxy.v2alpha1;
import "envoy/api/v2/route/route.proto";
import "envoy/api/v2/route/route_components.proto";
import "envoy/type/matcher/string.proto";
import "envoy/type/range.proto";

@ -4,8 +4,8 @@ package envoy.config.filter.network.http_connection_manager.v2;
import "envoy/api/v2/core/config_source.proto";
import "envoy/api/v2/core/protocol.proto";
import "envoy/api/v2/rds.proto";
import "envoy/api/v2/srds.proto";
import "envoy/api/v2/route.proto";
import "envoy/api/v2/scoped_route.proto";
import "envoy/config/filter/accesslog/v2/accesslog.proto";
import "envoy/type/percent.proto";
import "envoy/type/tracing/v2/custom_tag.proto";

@ -3,7 +3,7 @@ syntax = "proto3";
package envoy.config.filter.network.thrift_proxy.v2alpha1;
import "envoy/api/v2/core/base.proto";
import "envoy/api/v2/route/route.proto";
import "envoy/api/v2/route/route_components.proto";
import "google/protobuf/wrappers.proto";

@ -3,7 +3,7 @@ syntax = "proto3";
package envoy.config.rbac.v2;
import "envoy/api/v2/core/address.proto";
import "envoy/api/v2/route/route.proto";
import "envoy/api/v2/route/route_components.proto";
import "envoy/type/matcher/metadata.proto";
import "envoy/type/matcher/string.proto";

@ -3,7 +3,7 @@ syntax = "proto3";
package envoy.config.rbac.v3alpha;
import "envoy/config/core/v3alpha/address.proto";
import "envoy/config/route/v3alpha/route.proto";
import "envoy/config/route/v3alpha/route_components.proto";
import "envoy/type/matcher/v3alpha/metadata.proto";
import "envoy/type/matcher/v3alpha/string.proto";

@ -6,6 +6,7 @@ licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/api/v2:pkg",
"//envoy/api/v2/route:pkg",
"//envoy/config/core/v3alpha:pkg",
"//envoy/type/matcher/v3alpha:pkg",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,116 @@
syntax = "proto3";
package envoy.config.route.v3alpha;
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.config.route.v3alpha";
option java_outer_classname = "ScopedRouteProto";
option java_multiple_files = true;
// [#protodoc-title: HTTP scoped routing configuration]
// * Routing :ref:`architecture overview <arch_overview_http_routing>`
// Specifies a routing scope, which associates a
// :ref:`Key<envoy_api_msg_config.route.v3alpha.ScopedRouteConfiguration.Key>` to a
// :ref:`envoy_api_msg_RouteConfiguration` (identified by its resource name).
//
// The HTTP connection manager builds up a table consisting of these Key to
// RouteConfiguration mappings, and looks up the RouteConfiguration to use per
// request according to the algorithm specified in the
// :ref:`scope_key_builder<envoy_api_field_extensions.filters.network.http_connection_manager.v3alpha.ScopedRoutes.scope_key_builder>`
// assigned to the HttpConnectionManager.
//
// For example, with the following configurations (in YAML):
//
// HttpConnectionManager config:
//
// .. code::
//
// ...
// scoped_routes:
// name: foo-scoped-routes
// scope_key_builder:
// fragments:
// - header_value_extractor:
// name: X-Route-Selector
// element_separator: ,
// element:
// separator: =
// key: vip
//
// ScopedRouteConfiguration resources (specified statically via
// :ref:`scoped_route_configurations_list<envoy_api_field_extensions.filters.network.http_connection_manager.v3alpha.ScopedRoutes.scoped_route_configurations_list>`
// or obtained dynamically via SRDS):
//
// .. code::
//
// (1)
// name: route-scope1
// route_configuration_name: route-config1
// key:
// fragments:
// - string_key: 172.10.10.20
//
// (2)
// name: route-scope2
// route_configuration_name: route-config2
// key:
// fragments:
// - string_key: 172.20.20.30
//
// A request from a client such as:
//
// .. code::
//
// GET / HTTP/1.1
// Host: foo.com
// X-Route-Selector: vip=172.10.10.20
//
// would result in the routing table defined by the `route-config1`
// RouteConfiguration being assigned to the HTTP request/stream.
//
message ScopedRouteConfiguration {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.ScopedRouteConfiguration";
// Specifies a key which is matched against the output of the
// :ref:`scope_key_builder<envoy_api_field_extensions.filters.network.http_connection_manager.v3alpha.ScopedRoutes.scope_key_builder>`
// specified in the HttpConnectionManager. The matching is done per HTTP
// request and is dependent on the order of the fragments contained in the
// Key.
message Key {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.ScopedRouteConfiguration.Key";
message Fragment {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.ScopedRouteConfiguration.Key.Fragment";
oneof type {
option (validate.required) = true;
// A string to match against.
string string_key = 1;
}
}
// The ordered set of fragments to match against. The order must match the
// fragments in the corresponding
// :ref:`scope_key_builder<envoy_api_field_extensions.filters.network.http_connection_manager.v3alpha.ScopedRoutes.scope_key_builder>`.
repeated Fragment fragments = 1 [(validate.rules).repeated = {min_items: 1}];
}
// The name assigned to the routing scope.
string name = 1 [(validate.rules).string = {min_bytes: 1}];
// The resource name to use for a :ref:`envoy_api_msg_DiscoveryRequest` to an
// RDS server to fetch the :ref:`envoy_api_msg_RouteConfiguration` associated
// with this scope.
string route_configuration_name = 2 [(validate.rules).string = {min_bytes: 1}];
// The key to match against.
Key key = 3 [(validate.rules).message = {required: true}];
}

@ -0,0 +1,14 @@
# DO NOT EDIT. This file is generated by tools/proto_sync.py.
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/config/core/v3alpha:pkg",
"//envoy/config/route/v3alpha:pkg",
"//envoy/service/tap/v2alpha:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)

@ -1,10 +1,10 @@
syntax = "proto3";
package envoy.service.tap.v3alpha;
package envoy.config.tap.v3alpha;
import "envoy/config/core/v3alpha/base.proto";
import "envoy/config/core/v3alpha/grpc_service.proto";
import "envoy/config/route/v3alpha/route.proto";
import "envoy/config/route/v3alpha/route_components.proto";
import "google/protobuf/wrappers.proto";
@ -12,7 +12,7 @@ import "udpa/annotations/versioning.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.service.tap.v3alpha";
option java_package = "io.envoyproxy.envoy.config.tap.v3alpha";
option java_outer_classname = "CommonProto";
option java_multiple_files = true;
@ -41,7 +41,7 @@ message TapConfig {
//
// This field defaults to 100/:ref:`HUNDRED
// <envoy_api_enum_type.v3alpha.FractionalPercent.DenominatorType>`.
config.core.v3alpha.RuntimeFractionalPercent tap_enabled = 3;
core.v3alpha.RuntimeFractionalPercent tap_enabled = 3;
}
// Tap match configuration. This is a recursive structure which allows complex nested match
@ -97,7 +97,7 @@ message HttpHeadersMatch {
"envoy.service.tap.v2alpha.HttpHeadersMatch";
// HTTP headers to match.
repeated config.route.v3alpha.HeaderMatcher headers = 1;
repeated route.v3alpha.HeaderMatcher headers = 1;
}
// Tap output configuration.
@ -225,5 +225,5 @@ message StreamingGrpcSink {
string tap_id = 1;
// The gRPC server that hosts the Tap Sink Service.
config.core.v3alpha.GrpcService grpc_service = 2 [(validate.rules).message = {required: true}];
core.v3alpha.GrpcService grpc_service = 2 [(validate.rules).message = {required: true}];
}

@ -21,15 +21,15 @@ message Body {
bytes as_bytes = 1;
// Body data as string. This field is only used when the :ref:`JSON_BODY_AS_STRING
// <envoy_api_enum_value_service.tap.v3alpha.OutputSink.Format.JSON_BODY_AS_STRING>` sink
// <envoy_api_enum_value_config.tap.v3alpha.OutputSink.Format.JSON_BODY_AS_STRING>` sink
// format type is selected. See the documentation for that option for why this is useful.
string as_string = 2;
}
// Specifies whether body data has been truncated to fit within the specified
// :ref:`max_buffered_rx_bytes
// <envoy_api_field_service.tap.v3alpha.OutputConfig.max_buffered_rx_bytes>` and
// <envoy_api_field_config.tap.v3alpha.OutputConfig.max_buffered_rx_bytes>` and
// :ref:`max_buffered_tx_bytes
// <envoy_api_field_service.tap.v3alpha.OutputConfig.max_buffered_tx_bytes>` settings.
// <envoy_api_field_config.tap.v3alpha.OutputConfig.max_buffered_tx_bytes>` settings.
bool truncated = 3;
}

@ -93,11 +93,11 @@ message SocketBufferedTrace {
repeated SocketEvent events = 3;
// Set to true if read events were truncated due to the :ref:`max_buffered_rx_bytes
// <envoy_api_field_service.tap.v3alpha.OutputConfig.max_buffered_rx_bytes>` setting.
// <envoy_api_field_config.tap.v3alpha.OutputConfig.max_buffered_rx_bytes>` setting.
bool read_truncated = 4;
// Set to true if write events were truncated due to the :ref:`max_buffered_tx_bytes
// <envoy_api_field_service.tap.v3alpha.OutputConfig.max_buffered_tx_bytes>` setting.
// <envoy_api_field_config.tap.v3alpha.OutputConfig.max_buffered_tx_bytes>` setting.
bool write_truncated = 5;
}

@ -6,8 +6,8 @@ licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/config/cluster/v3alpha:pkg",
"//envoy/config/common/dynamic_forward_proxy/v2alpha:pkg",
"//envoy/service/cluster/v3alpha:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)

@ -2,7 +2,7 @@ syntax = "proto3";
package envoy.extensions.common.dynamic_forward_proxy.v3alpha;
import "envoy/service/cluster/v3alpha/cds.proto";
import "envoy/config/cluster/v3alpha/cluster.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/wrappers.proto";
@ -39,7 +39,7 @@ message DnsCacheConfig {
// likely build a "happy eyeballs" connection pool which would race the primary / fall back
// address and return the one that wins. This same method could potentially also be used for
// QUIC to TCP fall back.]
service.cluster.v3alpha.Cluster.DnsLookupFamily dns_lookup_family = 2
config.cluster.v3alpha.Cluster.DnsLookupFamily dns_lookup_family = 2
[(validate.rules).enum = {defined_only: true}];
// The DNS refresh rate for currently cached DNS hosts. If not specified defaults to 60s.

@ -8,7 +8,7 @@ api_proto_package(
deps = [
"//envoy/config/common/tap/v2alpha:pkg",
"//envoy/config/core/v3alpha:pkg",
"//envoy/service/tap/v3alpha:pkg",
"//envoy/config/tap/v3alpha:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)

@ -3,7 +3,7 @@ syntax = "proto3";
package envoy.extensions.common.tap.v3alpha;
import "envoy/config/core/v3alpha/config_source.proto";
import "envoy/service/tap/v3alpha/common.proto";
import "envoy/config/tap/v3alpha/common.proto";
import "udpa/annotations/versioning.proto";
@ -41,7 +41,7 @@ message CommonExtensionConfig {
// If specified, the tap filter will be configured via a static configuration that cannot be
// changed.
service.tap.v3alpha.TapConfig static_config = 2;
config.tap.v3alpha.TapConfig static_config = 2;
// [#not-implemented-hide:] Configuration to use for TapDS updates for the filter.
TapDSConfig tapds_config = 3;

@ -2,7 +2,7 @@ syntax = "proto3";
package envoy.extensions.filters.http.fault.v3alpha;
import "envoy/config/route/v3alpha/route.proto";
import "envoy/config/route/v3alpha/route_components.proto";
import "envoy/extensions/filters/common/fault/v3alpha/fault.proto";
import "envoy/type/v3alpha/percent.proto";

@ -2,7 +2,7 @@ syntax = "proto3";
package envoy.extensions.filters.http.health_check.v3alpha;
import "envoy/config/route/v3alpha/route.proto";
import "envoy/config/route/v3alpha/route_components.proto";
import "envoy/type/v3alpha/percent.proto";
import "google/protobuf/duration.proto";

@ -4,7 +4,7 @@ package envoy.extensions.filters.http.jwt_authn.v3alpha;
import "envoy/config/core/v3alpha/base.proto";
import "envoy/config/core/v3alpha/http_uri.proto";
import "envoy/config/route/v3alpha/route.proto";
import "envoy/config/route/v3alpha/route_components.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/empty.proto";

@ -2,7 +2,7 @@ syntax = "proto3";
package envoy.extensions.filters.network.dubbo_proxy.v3alpha;
import "envoy/config/route/v3alpha/route.proto";
import "envoy/config/route/v3alpha/route_components.proto";
import "envoy/type/matcher/v3alpha/string.proto";
import "envoy/type/v3alpha/range.proto";

@ -9,7 +9,7 @@ api_proto_package(
"//envoy/config/core/v3alpha:pkg",
"//envoy/config/filter/accesslog/v3alpha:pkg",
"//envoy/config/filter/network/http_connection_manager/v2:pkg",
"//envoy/service/route/v3alpha:pkg",
"//envoy/config/route/v3alpha:pkg",
"//envoy/type/tracing/v2:pkg",
"//envoy/type/v3alpha:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",

@ -5,8 +5,8 @@ package envoy.extensions.filters.network.http_connection_manager.v3alpha;
import "envoy/config/core/v3alpha/config_source.proto";
import "envoy/config/core/v3alpha/protocol.proto";
import "envoy/config/filter/accesslog/v3alpha/accesslog.proto";
import "envoy/service/route/v3alpha/rds.proto";
import "envoy/service/route/v3alpha/srds.proto";
import "envoy/config/route/v3alpha/route.proto";
import "envoy/config/route/v3alpha/scoped_route.proto";
import "envoy/type/tracing/v2/custom_tag.proto";
import "envoy/type/v3alpha/percent.proto";
@ -239,7 +239,7 @@ message HttpConnectionManager {
Rds rds = 3;
// The route table for the connection manager is static and is specified in this property.
service.route.v3alpha.RouteConfiguration route_config = 4;
config.route.v3alpha.RouteConfiguration route_config = 4;
// A route table will be dynamically assigned to each request based on request attributes
// (e.g., the value of a header). The "routing scopes" (i.e., route tables) and "scope keys" are
@ -495,7 +495,7 @@ message ScopedRouteConfigurationsList {
option (udpa.annotations.versioning).previous_message_type =
"envoy.config.filter.network.http_connection_manager.v2.ScopedRouteConfigurationsList";
repeated service.route.v3alpha.ScopedRouteConfiguration scoped_route_configurations = 1
repeated config.route.v3alpha.ScopedRouteConfiguration scoped_route_configurations = 1
[(validate.rules).repeated = {min_items: 1}];
}
@ -506,15 +506,15 @@ message ScopedRoutes {
// Specifies the mechanism for constructing "scope keys" based on HTTP request attributes. These
// keys are matched against a set of
// :ref:`Key<envoy_api_msg_service.route.v3alpha.ScopedRouteConfiguration.Key>` objects assembled
// :ref:`Key<envoy_api_msg_config.route.v3alpha.ScopedRouteConfiguration.Key>` objects assembled
// from
// :ref:`ScopedRouteConfiguration<envoy_api_msg_service.route.v3alpha.ScopedRouteConfiguration>`
// :ref:`ScopedRouteConfiguration<envoy_api_msg_config.route.v3alpha.ScopedRouteConfiguration>`
// messages distributed via SRDS (the Scoped Route Discovery Service) or assigned statically via
// :ref:`scoped_route_configurations_list<envoy_api_field_extensions.filters.network.http_connection_manager.v3alpha.ScopedRoutes.scoped_route_configurations_list>`.
//
// Upon receiving a request's headers, the Router will build a key using the algorithm specified
// by this message. This key will be used to look up the routing table (i.e., the
// :ref:`RouteConfiguration<envoy_api_msg_service.route.v3alpha.RouteConfiguration>`) to use for
// :ref:`RouteConfiguration<envoy_api_msg_config.route.v3alpha.RouteConfiguration>`) to use for
// the request.
message ScopeKeyBuilder {
option (udpa.annotations.versioning).previous_message_type =

@ -234,7 +234,7 @@ message RedisProxy {
}
// RedisProtocolOptions specifies Redis upstream protocol options. This object is used in
// :ref:`extension_protocol_options<envoy_api_field_service.cluster.v3alpha.Cluster.extension_protocol_options>`,
// :ref:`extension_protocol_options<envoy_api_field_config.cluster.v3alpha.Cluster.extension_protocol_options>`,
// keyed by the name `envoy.redis_proxy`.
message RedisProtocolOptions {
option (udpa.annotations.versioning).previous_message_type =

@ -3,7 +3,7 @@ syntax = "proto3";
package envoy.extensions.filters.network.thrift_proxy.v3alpha;
import "envoy/config/core/v3alpha/base.proto";
import "envoy/config/route/v3alpha/route.proto";
import "envoy/config/route/v3alpha/route_components.proto";
import "google/protobuf/wrappers.proto";

@ -109,7 +109,7 @@ message ThriftFilter {
// ThriftProtocolOptions specifies Thrift upstream protocol options. This object is used in
// in
// :ref:`extension_protocol_options<envoy_api_field_service.cluster.v3alpha.Cluster.extension_protocol_options>`,
// :ref:`extension_protocol_options<envoy_api_field_config.cluster.v3alpha.Cluster.extension_protocol_options>`,
// keyed by the name `envoy.filters.network.thrift_proxy`.
message ThriftProtocolOptions {
option (udpa.annotations.versioning).previous_message_type =

@ -8,11 +8,7 @@ api_proto_package(
has_services = True,
deps = [
"//envoy/api/v2:pkg",
"//envoy/config/cluster/v3alpha:pkg",
"//envoy/config/core/v3alpha:pkg",
"//envoy/service/discovery/v3alpha:pkg",
"//envoy/service/endpoint/v3alpha:pkg",
"//envoy/type/v3alpha:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)

@ -2,34 +2,18 @@ syntax = "proto3";
package envoy.service.cluster.v3alpha;
import "envoy/config/cluster/v3alpha/circuit_breaker.proto";
import "envoy/config/cluster/v3alpha/filter.proto";
import "envoy/config/cluster/v3alpha/outlier_detection.proto";
import "envoy/config/core/v3alpha/address.proto";
import "envoy/config/core/v3alpha/base.proto";
import "envoy/config/core/v3alpha/config_source.proto";
import "envoy/config/core/v3alpha/health_check.proto";
import "envoy/config/core/v3alpha/protocol.proto";
import "envoy/service/discovery/v3alpha/discovery.proto";
import "envoy/service/endpoint/v3alpha/eds.proto";
import "envoy/type/v3alpha/percent.proto";
import "google/api/annotations.proto";
import "google/protobuf/any.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto";
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.service.cluster.v3alpha";
option java_outer_classname = "CdsProto";
option java_multiple_files = true;
option java_generic_services = true;
// [#protodoc-title: Clusters]
// [#protodoc-title: CDS]
// Return list of all clusters this proxy will load balance to.
service ClusterDiscoveryService {
@ -48,856 +32,8 @@ service ClusterDiscoveryService {
}
}
// Configuration for a single upstream cluster.
// [#next-free-field: 46]
message Cluster {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.Cluster";
// Refer to :ref:`service discovery type <arch_overview_service_discovery_types>`
// for an explanation on each type.
enum DiscoveryType {
// Refer to the :ref:`static discovery type<arch_overview_service_discovery_types_static>`
// for an explanation.
STATIC = 0;
// Refer to the :ref:`strict DNS discovery
// type<arch_overview_service_discovery_types_strict_dns>`
// for an explanation.
STRICT_DNS = 1;
// Refer to the :ref:`logical DNS discovery
// type<arch_overview_service_discovery_types_logical_dns>`
// for an explanation.
LOGICAL_DNS = 2;
// Refer to the :ref:`service discovery type<arch_overview_service_discovery_types_eds>`
// for an explanation.
EDS = 3;
// Refer to the :ref:`original destination discovery
// type<arch_overview_service_discovery_types_original_destination>`
// for an explanation.
ORIGINAL_DST = 4;
}
// Refer to :ref:`load balancer type <arch_overview_load_balancing_types>` architecture
// overview section for information on each type.
enum LbPolicy {
reserved 4;
reserved "ORIGINAL_DST_LB";
// Refer to the :ref:`round robin load balancing
// policy<arch_overview_load_balancing_types_round_robin>`
// for an explanation.
ROUND_ROBIN = 0;
// Refer to the :ref:`least request load balancing
// policy<arch_overview_load_balancing_types_least_request>`
// for an explanation.
LEAST_REQUEST = 1;
// Refer to the :ref:`ring hash load balancing
// policy<arch_overview_load_balancing_types_ring_hash>`
// for an explanation.
RING_HASH = 2;
// Refer to the :ref:`random load balancing
// policy<arch_overview_load_balancing_types_random>`
// for an explanation.
RANDOM = 3;
// Refer to the :ref:`Maglev load balancing policy<arch_overview_load_balancing_types_maglev>`
// for an explanation.
MAGLEV = 5;
// This load balancer type must be specified if the configured cluster provides a cluster
// specific load balancer. Consult the configured cluster's documentation for whether to set
// this option or not.
CLUSTER_PROVIDED = 6;
// [#not-implemented-hide:] Use the new :ref:`load_balancing_policy
// <envoy_api_field_service.cluster.v3alpha.Cluster.load_balancing_policy>` field to determine
// the LB policy.
// [#next-major-version: In the v3 API, we should consider deprecating the lb_policy field
// and instead using the new load_balancing_policy field as the one and only mechanism for
// configuring this.]
LOAD_BALANCING_POLICY_CONFIG = 7;
}
// When V4_ONLY is selected, the DNS resolver will only perform a lookup for
// addresses in the IPv4 family. If V6_ONLY is selected, the DNS resolver will
// only perform a lookup for addresses in the IPv6 family. If AUTO is
// specified, the DNS resolver will first perform a lookup for addresses in
// the IPv6 family and fallback to a lookup for addresses in the IPv4 family.
// For cluster types other than
// :ref:`STRICT_DNS<envoy_api_enum_value_service.cluster.v3alpha.Cluster.DiscoveryType.STRICT_DNS>`
// and
// :ref:`LOGICAL_DNS<envoy_api_enum_value_service.cluster.v3alpha.Cluster.DiscoveryType.LOGICAL_DNS>`,
// this setting is
// ignored.
enum DnsLookupFamily {
AUTO = 0;
V4_ONLY = 1;
V6_ONLY = 2;
}
enum ClusterProtocolSelection {
// Cluster can only operate on one of the possible upstream protocols (HTTP1.1, HTTP2).
// If :ref:`http2_protocol_options
// <envoy_api_field_service.cluster.v3alpha.Cluster.http2_protocol_options>` are present, HTTP2
// will be used, otherwise HTTP1.1 will be used.
USE_CONFIGURED_PROTOCOL = 0;
// Use HTTP1.1 or HTTP2, depending on which one is used on the downstream connection.
USE_DOWNSTREAM_PROTOCOL = 1;
}
// TransportSocketMatch specifies what transport socket config will be used
// when the match conditions are satisfied.
message TransportSocketMatch {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.Cluster.TransportSocketMatch";
// The name of the match, used in stats generation.
string name = 1 [(validate.rules).string = {min_len: 1}];
// Optional endpoint metadata match criteria.
// The connection to the endpoint with metadata matching what is set in this field
// will use the transport socket configuration specified here.
// The endpoint's metadata entry in *envoy.transport_socket_match* is used to match
// against the values specified in this field.
google.protobuf.Struct match = 2;
// The configuration of the transport socket.
config.core.v3alpha.TransportSocket transport_socket = 3;
}
// Extended cluster type.
message CustomClusterType {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.Cluster.CustomClusterType";
// The type of the cluster to instantiate. The name must match a supported cluster type.
string name = 1 [(validate.rules).string = {min_bytes: 1}];
// Cluster specific configuration which depends on the cluster being instantiated.
// See the supported cluster for further documentation.
google.protobuf.Any typed_config = 2;
}
// Only valid when discovery type is EDS.
message EdsClusterConfig {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.Cluster.EdsClusterConfig";
// Configuration for the source of EDS updates for this Cluster.
config.core.v3alpha.ConfigSource eds_config = 1;
// Optional alternative to cluster name to present to EDS. This does not
// have the same restrictions as cluster name, i.e. it may be arbitrary
// length.
string service_name = 2;
}
// Optionally divide the endpoints in this cluster into subsets defined by
// endpoint metadata and selected by route and weighted cluster metadata.
// [#next-free-field: 8]
message LbSubsetConfig {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.Cluster.LbSubsetConfig";
// If NO_FALLBACK is selected, a result
// equivalent to no healthy hosts is reported. If ANY_ENDPOINT is selected,
// any cluster endpoint may be returned (subject to policy, health checks,
// etc). If DEFAULT_SUBSET is selected, load balancing is performed over the
// endpoints matching the values from the default_subset field.
enum LbSubsetFallbackPolicy {
NO_FALLBACK = 0;
ANY_ENDPOINT = 1;
DEFAULT_SUBSET = 2;
}
// Specifications for subsets.
message LbSubsetSelector {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector";
// Allows to override top level fallback policy per selector.
enum LbSubsetSelectorFallbackPolicy {
// If NOT_DEFINED top level config fallback policy is used instead.
NOT_DEFINED = 0;
// If NO_FALLBACK is selected, a result equivalent to no healthy hosts is reported.
NO_FALLBACK = 1;
// If ANY_ENDPOINT is selected, any cluster endpoint may be returned
// (subject to policy, health checks, etc).
ANY_ENDPOINT = 2;
// If DEFAULT_SUBSET is selected, load balancing is performed over the
// endpoints matching the values from the default_subset field.
DEFAULT_SUBSET = 3;
// If KEYS_SUBSET is selected, subset selector matching is performed again with metadata
// keys reduced to
// :ref:`fallback_keys_subset<envoy_api_field_service.cluster.v3alpha.Cluster.LbSubsetConfig.LbSubsetSelector.fallback_keys_subset>`.
// It allows for a fallback to a different, less specific selector if some of the keys of
// the selector are considered optional.
KEYS_SUBSET = 4;
}
// List of keys to match with the weighted cluster metadata.
repeated string keys = 1;
// The behavior used when no endpoint subset matches the selected route's
// metadata.
LbSubsetSelectorFallbackPolicy fallback_policy = 2
[(validate.rules).enum = {defined_only: true}];
// Subset of
// :ref:`keys<envoy_api_field_service.cluster.v3alpha.Cluster.LbSubsetConfig.LbSubsetSelector.keys>`
// used by
// :ref:`KEYS_SUBSET<envoy_api_enum_value_service.cluster.v3alpha.Cluster.LbSubsetConfig.LbSubsetSelector.LbSubsetSelectorFallbackPolicy.KEYS_SUBSET>`
// fallback policy.
// It has to be a non empty list if KEYS_SUBSET fallback policy is selected.
// For any other fallback policy the parameter is not used and should not be set.
// Only values also present in
// :ref:`keys<envoy_api_field_service.cluster.v3alpha.Cluster.LbSubsetConfig.LbSubsetSelector.keys>`
// are allowed, but `fallback_keys_subset` cannot be equal to `keys`.
repeated string fallback_keys_subset = 3;
}
// The behavior used when no endpoint subset matches the selected route's
// metadata. The value defaults to
// :ref:`NO_FALLBACK<envoy_api_enum_value_service.cluster.v3alpha.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
LbSubsetFallbackPolicy fallback_policy = 1 [(validate.rules).enum = {defined_only: true}];
// Specifies the default subset of endpoints used during fallback if
// fallback_policy is
// :ref:`DEFAULT_SUBSET<envoy_api_enum_value_service.cluster.v3alpha.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.
// Each field in default_subset is
// compared to the matching LbEndpoint.Metadata under the *envoy.lb*
// namespace. It is valid for no hosts to match, in which case the behavior
// is the same as a fallback_policy of
// :ref:`NO_FALLBACK<envoy_api_enum_value_service.cluster.v3alpha.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
google.protobuf.Struct default_subset = 2;
// For each entry, LbEndpoint.Metadata's
// *envoy.lb* namespace is traversed and a subset is created for each unique
// combination of key and value. For example:
//
// .. code-block:: json
//
// { "subset_selectors": [
// { "keys": [ "version" ] },
// { "keys": [ "stage", "hardware_type" ] }
// ]}
//
// A subset is matched when the metadata from the selected route and
// weighted cluster contains the same keys and values as the subset's
// metadata. The same host may appear in multiple subsets.
repeated LbSubsetSelector subset_selectors = 3;
// If true, routing to subsets will take into account the localities and locality weights of the
// endpoints when making the routing decision.
//
// There are some potential pitfalls associated with enabling this feature, as the resulting
// traffic split after applying both a subset match and locality weights might be undesirable.
//
// Consider for example a situation in which you have 50/50 split across two localities X/Y
// which have 100 hosts each without subsetting. If the subset LB results in X having only 1
// host selected but Y having 100, then a lot more load is being dumped on the single host in X
// than originally anticipated in the load balancing assignment delivered via EDS.
bool locality_weight_aware = 4;
// When used with locality_weight_aware, scales the weight of each locality by the ratio
// of hosts in the subset vs hosts in the original subset. This aims to even out the load
// going to an individual locality if said locality is disproportionately affected by the
// subset predicate.
bool scale_locality_weight = 5;
// If true, when a fallback policy is configured and its corresponding subset fails to find
// a host this will cause any host to be selected instead.
//
// This is useful when using the default subset as the fallback policy, given the default
// subset might become empty. With this option enabled, if that happens the LB will attempt
// to select a host from the entire cluster.
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;
}
// Specific configuration for the LeastRequest load balancing policy.
message LeastRequestLbConfig {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.Cluster.LeastRequestLbConfig";
// The number of random healthy hosts from which the host with the fewest active requests will
// be chosen. Defaults to 2 so that we perform two-choice selection if the field is not set.
google.protobuf.UInt32Value choice_count = 1 [(validate.rules).uint32 = {gte: 2}];
}
// Specific configuration for the :ref:`RingHash<arch_overview_load_balancing_types_ring_hash>`
// load balancing policy.
message RingHashLbConfig {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.Cluster.RingHashLbConfig";
// The hash function used to hash hosts onto the ketama ring.
enum HashFunction {
// Use `xxHash <https://github.com/Cyan4973/xxHash>`_, this is the default hash function.
XX_HASH = 0;
// Use `MurmurHash2 <https://sites.google.com/site/murmurhash/>`_, this is compatible with
// std:hash<string> in GNU libstdc++ 3.4.20 or above. This is typically the case when compiled
// on Linux and not macOS.
MURMUR_HASH_2 = 1;
}
reserved 2;
// Minimum hash ring size. The larger the ring is (that is, the more hashes there are for each
// provided host) the better the request distribution will reflect the desired weights. Defaults
// to 1024 entries, and limited to 8M entries. See also
// :ref:`maximum_ring_size<envoy_api_field_service.cluster.v3alpha.Cluster.RingHashLbConfig.maximum_ring_size>`.
google.protobuf.UInt64Value minimum_ring_size = 1 [(validate.rules).uint64 = {lte: 8388608}];
// The hash function used to hash hosts onto the ketama ring. The value defaults to
// :ref:`XX_HASH<envoy_api_enum_value_service.cluster.v3alpha.Cluster.RingHashLbConfig.HashFunction.XX_HASH>`.
HashFunction hash_function = 3 [(validate.rules).enum = {defined_only: true}];
// Maximum hash ring size. Defaults to 8M entries, and limited to 8M entries, but can be lowered
// to further constrain resource use. See also
// :ref:`minimum_ring_size<envoy_api_field_service.cluster.v3alpha.Cluster.RingHashLbConfig.minimum_ring_size>`.
google.protobuf.UInt64Value maximum_ring_size = 4 [(validate.rules).uint64 = {lte: 8388608}];
}
// Specific configuration for the
// :ref:`Original Destination <arch_overview_load_balancing_types_original_destination>`
// load balancing policy.
message OriginalDstLbConfig {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.Cluster.OriginalDstLbConfig";
// When true, :ref:`x-envoy-original-dst-host
// <config_http_conn_man_headers_x-envoy-original-dst-host>` can be used to override destination
// address.
//
// .. attention::
//
// This header isn't sanitized by default, so enabling this feature allows HTTP clients to
// route traffic to arbitrary hosts and/or ports, which may have serious security
// consequences.
bool use_http_header = 1;
}
// Common configuration for all load balancer implementations.
// [#next-free-field: 7]
message CommonLbConfig {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.Cluster.CommonLbConfig";
// Configuration for :ref:`zone aware routing
// <arch_overview_load_balancing_zone_aware_routing>`.
message ZoneAwareLbConfig {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.Cluster.CommonLbConfig.ZoneAwareLbConfig";
// Configures percentage of requests that will be considered for zone aware routing
// if zone aware routing is configured. If not specified, the default is 100%.
// * :ref:`runtime values <config_cluster_manager_cluster_runtime_zone_routing>`.
// * :ref:`Zone aware routing support <arch_overview_load_balancing_zone_aware_routing>`.
type.v3alpha.Percent routing_enabled = 1;
// Configures minimum upstream cluster size required for zone aware routing
// If upstream cluster size is less than specified, zone aware routing is not performed
// even if zone aware routing is configured. If not specified, the default is 6.
// * :ref:`runtime values <config_cluster_manager_cluster_runtime_zone_routing>`.
// * :ref:`Zone aware routing support <arch_overview_load_balancing_zone_aware_routing>`.
google.protobuf.UInt64Value min_cluster_size = 2;
// If set to true, Envoy will not consider any hosts when the cluster is in :ref:`panic
// mode<arch_overview_load_balancing_panic_threshold>`. Instead, the cluster will fail all
// requests as if all hosts are unhealthy. This can help avoid potentially overwhelming a
// failing service.
bool fail_traffic_on_panic = 3;
}
// Configuration for :ref:`locality weighted load balancing
// <arch_overview_load_balancing_locality_weighted_lb>`
message LocalityWeightedLbConfig {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.Cluster.CommonLbConfig.LocalityWeightedLbConfig";
}
// Configures the :ref:`healthy panic threshold <arch_overview_load_balancing_panic_threshold>`.
// If not specified, the default is 50%.
// To disable panic mode, set to 0%.
//
// .. note::
// The specified percent will be truncated to the nearest 1%.
type.v3alpha.Percent healthy_panic_threshold = 1;
oneof locality_config_specifier {
ZoneAwareLbConfig zone_aware_lb_config = 2;
LocalityWeightedLbConfig locality_weighted_lb_config = 3;
}
// If set, all health check/weight/metadata updates that happen within this duration will be
// merged and delivered in one shot when the duration expires. The start of the duration is when
// the first update happens. This is useful for big clusters, with potentially noisy deploys
// that might trigger excessive CPU usage due to a constant stream of healthcheck state changes
// or metadata updates. The first set of updates to be seen apply immediately (e.g.: a new
// cluster). Please always keep in mind that the use of sandbox technologies may change this
// behavior.
//
// If this is not set, we default to a merge window of 1000ms. To disable it, set the merge
// window to 0.
//
// Note: merging does not apply to cluster membership changes (e.g.: adds/removes); this is
// because merging those updates isn't currently safe. See
// https://github.com/envoyproxy/envoy/pull/3941.
google.protobuf.Duration update_merge_window = 4;
// If set to true, Envoy will not consider new hosts when computing load balancing weights until
// they have been health checked for the first time. This will have no effect unless
// active health checking is also configured.
//
// Ignoring a host means that for any load balancing calculations that adjust weights based
// on the ratio of eligible hosts and total hosts (priority spillover, locality weighting and
// panic mode) Envoy will exclude these hosts in the denominator.
//
// For example, with hosts in two priorities P0 and P1, where P0 looks like
// {healthy, unhealthy (new), unhealthy (new)}
// and where P1 looks like
// {healthy, healthy}
// all traffic will still hit P0, as 1 / (3 - 2) = 1.
//
// Enabling this will allow scaling up the number of hosts for a given cluster without entering
// panic mode or triggering priority spillover, assuming the hosts pass the first health check.
//
// If panic mode is triggered, new hosts are still eligible for traffic; they simply do not
// contribute to the calculation when deciding whether panic mode is enabled or not.
bool ignore_new_hosts_until_first_hc = 5;
// If set to `true`, the cluster manager will drain all existing
// connections to upstream hosts whenever hosts are added or removed from the cluster.
bool close_connections_on_host_set_change = 6;
}
message RefreshRate {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.Cluster.RefreshRate";
// Specifies the base interval between refreshes. This parameter is required and must be greater
// than zero and less than
// :ref:`max_interval
// <envoy_api_field_service.cluster.v3alpha.Cluster.RefreshRate.max_interval>`.
google.protobuf.Duration base_interval = 1 [(validate.rules).duration = {
required: true
gt {nanos: 1000000}
}];
// Specifies the maximum interval between refreshes. This parameter is optional, but must be
// greater than or equal to the
// :ref:`base_interval
// <envoy_api_field_service.cluster.v3alpha.Cluster.RefreshRate.base_interval>` if set. The
// default is 10 times the :ref:`base_interval
// <envoy_api_field_service.cluster.v3alpha.Cluster.RefreshRate.base_interval>`.
google.protobuf.Duration max_interval = 2 [(validate.rules).duration = {gt {nanos: 1000000}}];
}
reserved 12, 15, 11, 35;
reserved "tls_context", "extension_protocol_options";
// Configuration to use different transport sockets for different endpoints.
// The entry of *envoy.transport_socket* in the
// :ref:`LbEndpoint.Metadata <envoy_api_field_config.endpoint.v3alpha.LbEndpoint.metadata>`
// is used to match against the transport sockets as they appear in the list. The first
// :ref:`match <envoy_api_msg_service.cluster.v3alpha.Cluster.TransportSocketMatch>` is used.
// For example, with the following match
//
// .. code-block:: yaml
//
// transport_socket_matches:
// - name: "enableMTLS"
// match:
// acceptMTLS: true
// transport_socket:
// name: envoy.transport_sockets.tls
// config: { ... } # tls socket configuration
// - name: "defaultToPlaintext"
// match: {}
// transport_socket:
// name: envoy.transport_sockets.raw_buffer
//
// Connections to the endpoints whose metadata value under *envoy.transport_socket*
// having "acceptMTLS"/"true" key/value pair use the "enableMTLS" socket configuration.
//
// If a :ref:`socket match <envoy_api_msg_service.cluster.v3alpha.Cluster.TransportSocketMatch>`
// with empty match criteria is provided, that always match any endpoint. For example, the
// "defaultToPlaintext" socket match in case above.
//
// If an endpoint metadata's value under *envoy.transport_socket* does not match any
// *TransportSocketMatch*, socket configuration fallbacks to use the *tls_context* or
// *transport_socket* specified in this cluster.
//
// This field allows gradual and flexible transport socket configuration changes.
//
// The metadata of endpoints in EDS can indicate transport socket capabilities. For example,
// an endpoint's metadata can have two key value pairs as "acceptMTLS": "true",
// "acceptPlaintext": "true". While some other endpoints, only accepting plaintext traffic
// has "acceptPlaintext": "true" metadata information.
//
// Then the xDS server can configure the CDS to a client, Envoy A, to send mutual TLS
// traffic for endpoints with "acceptMTLS": "true", by adding a corresponding
// *TransportSocketMatch* in this field. Other client Envoys receive CDS without
// *transport_socket_match* set, and still send plain text traffic to the same cluster.
//
// [#comment:TODO(incfly): add a detailed architecture doc on intended usage.]
repeated TransportSocketMatch transport_socket_matches = 43;
// Supplies the name of the cluster which must be unique across all clusters.
// The cluster name is used when emitting
// :ref:`statistics <config_cluster_manager_cluster_stats>` if :ref:`alt_stat_name
// <envoy_api_field_service.cluster.v3alpha.Cluster.alt_stat_name>` is not provided.
// Any ``:`` in the cluster name will be converted to ``_`` when emitting statistics.
string name = 1 [(validate.rules).string = {min_bytes: 1}];
// An optional alternative to the cluster name to be used while emitting stats.
// Any ``:`` in the name will be converted to ``_`` when emitting statistics. This should not be
// confused with :ref:`Router Filter Header
// <config_http_filters_router_x-envoy-upstream-alt-stat-name>`.
string alt_stat_name = 28;
oneof cluster_discovery_type {
// The :ref:`service discovery type <arch_overview_service_discovery_types>`
// to use for resolving the cluster.
DiscoveryType type = 2 [(validate.rules).enum = {defined_only: true}];
// The custom cluster type.
CustomClusterType cluster_type = 38;
}
// Configuration to use for EDS updates for the Cluster.
EdsClusterConfig eds_cluster_config = 3;
// The timeout for new network connections to hosts in the cluster.
google.protobuf.Duration connect_timeout = 4 [(validate.rules).duration = {gt {}}];
// Soft limit on size of the clusters connections read and write buffers. If
// unspecified, an implementation defined default is applied (1MiB).
google.protobuf.UInt32Value per_connection_buffer_limit_bytes = 5;
// The :ref:`load balancer type <arch_overview_load_balancing_types>` to use
// when picking a host in the cluster.
LbPolicy lb_policy = 6 [(validate.rules).enum = {defined_only: true}];
// If the service discovery type is
// :ref:`STATIC<envoy_api_enum_value_service.cluster.v3alpha.Cluster.DiscoveryType.STATIC>`,
// :ref:`STRICT_DNS<envoy_api_enum_value_service.cluster.v3alpha.Cluster.DiscoveryType.STRICT_DNS>`
// or
// :ref:`LOGICAL_DNS<envoy_api_enum_value_service.cluster.v3alpha.Cluster.DiscoveryType.LOGICAL_DNS>`,
// then hosts is required.
//
// .. attention::
//
// **This field is deprecated**. Set the
// :ref:`load_assignment<envoy_api_field_service.cluster.v3alpha.Cluster.load_assignment>` field
// instead.
//
repeated config.core.v3alpha.Address hosts = 7;
// Setting this is required for specifying members of
// :ref:`STATIC<envoy_api_enum_value_service.cluster.v3alpha.Cluster.DiscoveryType.STATIC>`,
// :ref:`STRICT_DNS<envoy_api_enum_value_service.cluster.v3alpha.Cluster.DiscoveryType.STRICT_DNS>`
// or
// :ref:`LOGICAL_DNS<envoy_api_enum_value_service.cluster.v3alpha.Cluster.DiscoveryType.LOGICAL_DNS>`
// clusters. This field supersedes
// :ref:`hosts<envoy_api_field_service.cluster.v3alpha.Cluster.hosts>` field.
// [#comment:TODO(dio): Deprecate the hosts field and add it to :ref:`deprecated log<deprecated>`
// once load_assignment is implemented.]
//
// .. attention::
//
// Setting this allows non-EDS cluster types to contain embedded EDS equivalent
// :ref:`endpoint assignments<envoy_api_msg_service.endpoint.v3alpha.ClusterLoadAssignment>`.
// Setting this overrides :ref:`hosts<envoy_api_field_service.cluster.v3alpha.Cluster.hosts>`
// values.
//
endpoint.v3alpha.ClusterLoadAssignment load_assignment = 33;
// Optional :ref:`active health checking <arch_overview_health_checking>`
// configuration for the cluster. If no
// configuration is specified no health checking will be done and all cluster
// members will be considered healthy at all times.
repeated config.core.v3alpha.HealthCheck health_checks = 8;
// Optional maximum requests for a single upstream connection. This parameter
// is respected by both the HTTP/1.1 and HTTP/2 connection pool
// implementations. If not specified, there is no limit. Setting this
// parameter to 1 will effectively disable keep alive.
google.protobuf.UInt32Value max_requests_per_connection = 9;
// Optional :ref:`circuit breaking <arch_overview_circuit_break>` for the cluster.
config.cluster.v3alpha.CircuitBreakers circuit_breakers = 10;
// Additional options when handling HTTP requests upstream. These options will be applicable to
// both HTTP1 and HTTP2 requests.
config.core.v3alpha.HttpProtocolOptions common_http_protocol_options = 29;
// Additional options when handling HTTP1 requests.
config.core.v3alpha.Http1ProtocolOptions http_protocol_options = 13;
// Even if default HTTP2 protocol options are desired, this field must be
// set so that Envoy will assume that the upstream supports HTTP/2 when
// making new HTTP connection pool connections. Currently, Envoy only
// supports prior knowledge for upstream connections. Even if TLS is used
// with ALPN, `http2_protocol_options` must be specified. As an aside this allows HTTP/2
// connections to happen over plain text.
config.core.v3alpha.Http2ProtocolOptions http2_protocol_options = 14;
// The extension_protocol_options field is used to provide extension-specific protocol options
// for upstream connections. The key should match the extension filter name, such as
// "envoy.filters.network.thrift_proxy". See the extension's documentation for details on
// specific options.
map<string, google.protobuf.Any> typed_extension_protocol_options = 36;
// If the DNS refresh rate is specified and the cluster type is either
// :ref:`STRICT_DNS<envoy_api_enum_value_service.cluster.v3alpha.Cluster.DiscoveryType.STRICT_DNS>`,
// or
// :ref:`LOGICAL_DNS<envoy_api_enum_value_service.cluster.v3alpha.Cluster.DiscoveryType.LOGICAL_DNS>`,
// this value is used as the clusters DNS refresh
// rate. The value configured must be at least 1ms. If this setting is not specified, the
// value defaults to 5000ms. For cluster types other than
// :ref:`STRICT_DNS<envoy_api_enum_value_service.cluster.v3alpha.Cluster.DiscoveryType.STRICT_DNS>`
// and
// :ref:`LOGICAL_DNS<envoy_api_enum_value_service.cluster.v3alpha.Cluster.DiscoveryType.LOGICAL_DNS>`
// this setting is ignored.
google.protobuf.Duration dns_refresh_rate = 16
[(validate.rules).duration = {gt {nanos: 1000000}}];
// If the DNS failure refresh rate is specified and the cluster type is either
// :ref:`STRICT_DNS<envoy_api_enum_value_service.cluster.v3alpha.Cluster.DiscoveryType.STRICT_DNS>`,
// or
// :ref:`LOGICAL_DNS<envoy_api_enum_value_service.cluster.v3alpha.Cluster.DiscoveryType.LOGICAL_DNS>`,
// this is used as the clusters DNS refresh rate when requests are failing. If this setting is
// not specified, the failure refresh rate defaults to the DNS refresh rate. For cluster types
// other than
// :ref:`STRICT_DNS<envoy_api_enum_value_service.cluster.v3alpha.Cluster.DiscoveryType.STRICT_DNS>`
// and
// :ref:`LOGICAL_DNS<envoy_api_enum_value_service.cluster.v3alpha.Cluster.DiscoveryType.LOGICAL_DNS>`
// this setting is ignored.
//
// Note: Currently, DNS failures and empty DNS responses are not treated differently and this
// configuration is applied in both situations.
RefreshRate dns_failure_refresh_rate = 44;
// Optional configuration for setting cluster's DNS refresh rate. If the value is set to true,
// cluster's DNS refresh rate will be set to resource record's TTL which comes from DNS
// resolution.
bool respect_dns_ttl = 39;
// The DNS IP address resolution policy. If this setting is not specified, the
// value defaults to
// :ref:`AUTO<envoy_api_enum_value_service.cluster.v3alpha.Cluster.DnsLookupFamily.AUTO>`.
DnsLookupFamily dns_lookup_family = 17 [(validate.rules).enum = {defined_only: true}];
// If DNS resolvers are specified and the cluster type is either
// :ref:`STRICT_DNS<envoy_api_enum_value_service.cluster.v3alpha.Cluster.DiscoveryType.STRICT_DNS>`,
// or
// :ref:`LOGICAL_DNS<envoy_api_enum_value_service.cluster.v3alpha.Cluster.DiscoveryType.LOGICAL_DNS>`,
// this value is used to specify the clusters dns resolvers.
// If this setting is not specified, the value defaults to the default
// resolver, which uses /etc/resolv.conf for configuration. For cluster types
// other than
// :ref:`STRICT_DNS<envoy_api_enum_value_service.cluster.v3alpha.Cluster.DiscoveryType.STRICT_DNS>`
// and
// :ref:`LOGICAL_DNS<envoy_api_enum_value_service.cluster.v3alpha.Cluster.DiscoveryType.LOGICAL_DNS>`
// this setting is ignored.
repeated config.core.v3alpha.Address dns_resolvers = 18;
// [#next-major-version: Reconcile DNS options in a single message.]
// Always use TCP queries instead of UDP queries for DNS lookups.
bool use_tcp_for_dns_lookups = 45;
// If specified, outlier detection will be enabled for this upstream cluster.
// Each of the configuration values can be overridden via
// :ref:`runtime values <config_cluster_manager_cluster_runtime_outlier_detection>`.
config.cluster.v3alpha.OutlierDetection outlier_detection = 19;
// The interval for removing stale hosts from a cluster type
// :ref:`ORIGINAL_DST<envoy_api_enum_value_service.cluster.v3alpha.Cluster.DiscoveryType.ORIGINAL_DST>`.
// Hosts are considered stale if they have not been used
// as upstream destinations during this interval. New hosts are added
// to original destination clusters on demand as new connections are
// redirected to Envoy, causing the number of hosts in the cluster to
// grow over time. Hosts that are not stale (they are actively used as
// destinations) are kept in the cluster, which allows connections to
// them remain open, saving the latency that would otherwise be spent
// on opening new connections. If this setting is not specified, the
// value defaults to 5000ms. For cluster types other than
// :ref:`ORIGINAL_DST<envoy_api_enum_value_service.cluster.v3alpha.Cluster.DiscoveryType.ORIGINAL_DST>`
// this setting is ignored.
google.protobuf.Duration cleanup_interval = 20 [(validate.rules).duration = {gt {}}];
// Optional configuration used to bind newly established upstream connections.
// This overrides any bind_config specified in the bootstrap proto.
// If the address and port are empty, no bind will be performed.
config.core.v3alpha.BindConfig upstream_bind_config = 21;
// Configuration for load balancing subsetting.
LbSubsetConfig lb_subset_config = 22;
// Optional configuration for the load balancing algorithm selected by
// LbPolicy. Currently only
// :ref:`RING_HASH<envoy_api_enum_value_service.cluster.v3alpha.Cluster.LbPolicy.RING_HASH>` and
// :ref:`LEAST_REQUEST<envoy_api_enum_value_service.cluster.v3alpha.Cluster.LbPolicy.LEAST_REQUEST>`
// has additional configuration options.
// Specifying ring_hash_lb_config or least_request_lb_config without setting the corresponding
// LbPolicy will generate an error at runtime.
oneof lb_config {
// Optional configuration for the Ring Hash load balancing policy.
RingHashLbConfig ring_hash_lb_config = 23;
// Optional configuration for the Original Destination load balancing policy.
OriginalDstLbConfig original_dst_lb_config = 34;
// Optional configuration for the LeastRequest load balancing policy.
LeastRequestLbConfig least_request_lb_config = 37;
}
// Common configuration for all load balancer implementations.
CommonLbConfig common_lb_config = 27;
// Optional custom transport socket implementation to use for upstream connections.
// To setup TLS, set a transport socket with name `tls` and
// :ref:`UpstreamTlsContexts
// <envoy_api_msg_extensions.transport_sockets.tls.v3alpha.UpstreamTlsContext>` in the
// `typed_config`. If no transport socket configuration is specified, new connections will be set
// up with plaintext.
config.core.v3alpha.TransportSocket transport_socket = 24;
// The Metadata field can be used to provide additional information about the
// cluster. It can be used for stats, logging, and varying filter behavior.
// Fields should use reverse DNS notation to denote which entity within Envoy
// will need the information. For instance, if the metadata is intended for
// the Router filter, the filter name should be specified as *envoy.router*.
config.core.v3alpha.Metadata metadata = 25;
// Determines how Envoy selects the protocol used to speak to upstream hosts.
ClusterProtocolSelection protocol_selection = 26;
// Optional options for upstream connections.
UpstreamConnectionOptions upstream_connection_options = 30;
// If an upstream host becomes unhealthy (as determined by the configured health checks
// or outlier detection), immediately close all connections to the failed host.
//
// .. note::
//
// This is currently only supported for connections created by tcp_proxy.
//
// .. note::
//
// The current implementation of this feature closes all connections immediately when
// the unhealthy status is detected. If there are a large number of connections open
// to an upstream host that becomes unhealthy, Envoy may spend a substantial amount of
// time exclusively closing these connections, and not processing any other traffic.
bool close_connections_on_host_health_failure = 31;
// If set to true, Envoy will ignore the health value of a host when processing its removal
// from service discovery. This means that if active health checking is used, Envoy will *not*
// wait for the endpoint to go unhealthy before removing it.
bool ignore_health_on_host_removal = 32;
// An (optional) network filter chain, listed in the order the filters should be applied.
// The chain will be applied to all outgoing connections that Envoy makes to the upstream
// servers of this cluster.
repeated config.cluster.v3alpha.Filter filters = 40;
// [#not-implemented-hide:] New mechanism for LB policy configuration. Used only if the
// :ref:`lb_policy<envoy_api_field_service.cluster.v3alpha.Cluster.lb_policy>` field has the value
// :ref:`LOAD_BALANCING_POLICY_CONFIG<envoy_api_enum_value_service.cluster.v3alpha.Cluster.LbPolicy.LOAD_BALANCING_POLICY_CONFIG>`.
LoadBalancingPolicy load_balancing_policy = 41;
// [#not-implemented-hide:]
// If present, tells the client where to send load reports via LRS. If not present, the
// client will fall back to a client-side default, which may be either (a) don't send any
// load reports or (b) send load reports for all clusters to a single default server
// (which may be configured in the bootstrap file).
//
// Note that if multiple clusters point to the same LRS server, the client may choose to
// create a separate stream for each cluster or it may choose to coalesce the data for
// multiple clusters onto a single stream. Either way, the client must make sure to send
// the data for any given cluster on no more than one stream.
//
// [#next-major-version: In the v3 API, we should consider restructuring this somehow,
// maybe by allowing LRS to go on the ADS stream, or maybe by moving some of the negotiation
// from the LRS stream here.]
config.core.v3alpha.ConfigSource lrs_server = 42;
}
// [#not-implemented-hide:] Extensible load balancing policy configuration.
//
// Every LB policy defined via this mechanism will be identified via a unique name using reverse
// DNS notation. If the policy needs configuration parameters, it must define a message for its
// own configuration, which will be stored in the config field. The name of the policy will tell
// clients which type of message they should expect to see in the config field.
//
// Note that there are cases where it is useful to be able to independently select LB policies
// for choosing a locality and for choosing an endpoint within that locality. For example, a
// given deployment may always use the same policy to choose the locality, but for choosing the
// endpoint within the locality, some clusters may use weighted-round-robin, while others may
// use some sort of session-based balancing.
//
// This can be accomplished via hierarchical LB policies, where the parent LB policy creates a
// child LB policy for each locality. For each request, the parent chooses the locality and then
// delegates to the child policy for that locality to choose the endpoint within the locality.
//
// To facilitate this, the config message for the top-level LB policy may include a field of
// type LoadBalancingPolicy that specifies the child policy.
message LoadBalancingPolicy {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.LoadBalancingPolicy";
message Policy {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.LoadBalancingPolicy.Policy";
reserved 2;
reserved "config";
// Required. The name of the LB policy.
string name = 1;
google.protobuf.Any typed_config = 3;
}
// Each client will iterate over the list in order and stop at the first policy that it
// supports. This provides a mechanism for starting to use new LB policies that are not yet
// supported by all clients.
repeated Policy policies = 1;
}
// An extensible structure containing the address Envoy should bind to when
// establishing upstream connections.
message UpstreamBindConfig {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.UpstreamBindConfig";
// The address Envoy should bind to when establishing upstream connections.
config.core.v3alpha.Address source_address = 1;
}
message UpstreamConnectionOptions {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.UpstreamConnectionOptions";
// If set then set SO_KEEPALIVE on the socket to enable TCP Keepalives.
config.core.v3alpha.TcpKeepalive tcp_keepalive = 1;
// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing
// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file.
message CdsDummy {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.CdsDummy";
}

@ -4,7 +4,7 @@ package envoy.service.discovery.v2;
import "envoy/api/v2/core/base.proto";
import "envoy/api/v2/core/health_check.proto";
import "envoy/api/v2/endpoint/endpoint.proto";
import "envoy/api/v2/endpoint/endpoint_components.proto";
import "google/api/annotations.proto";
import "google/protobuf/duration.proto";

@ -8,9 +8,7 @@ api_proto_package(
has_services = True,
deps = [
"//envoy/api/v2:pkg",
"//envoy/config/endpoint/v3alpha:pkg",
"//envoy/service/discovery/v3alpha:pkg",
"//envoy/type/v3alpha:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)

@ -2,9 +2,7 @@ syntax = "proto3";
package envoy.service.endpoint.v3alpha;
import "envoy/config/endpoint/v3alpha/endpoint.proto";
import "envoy/service/discovery/v3alpha/discovery.proto";
import "envoy/type/v3alpha/percent.proto";
import "google/api/annotations.proto";
import "google/protobuf/duration.proto";
@ -40,106 +38,8 @@ service EndpointDiscoveryService {
}
}
// Each route from RDS will map to a single cluster or traffic split across
// clusters using weights expressed in the RDS WeightedCluster.
//
// With EDS, each cluster is treated independently from a LB perspective, with
// LB taking place between the Localities within a cluster and at a finer
// granularity between the hosts within a locality. The percentage of traffic
// for each endpoint is determined by both its load_balancing_weight, and the
// load_balancing_weight of its locality. First, a locality will be selected,
// then an endpoint within that locality will be chose based on its weight.
// [#next-free-field: 6]
message ClusterLoadAssignment {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.ClusterLoadAssignment";
// Load balancing policy settings.
// [#next-free-field: 6]
message Policy {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.ClusterLoadAssignment.Policy";
message DropOverload {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.ClusterLoadAssignment.Policy.DropOverload";
// Identifier for the policy specifying the drop.
string category = 1 [(validate.rules).string = {min_bytes: 1}];
// Percentage of traffic that should be dropped for the category.
type.v3alpha.FractionalPercent drop_percentage = 2;
}
reserved 1;
// Action to trim the overall incoming traffic to protect the upstream
// hosts. This action allows protection in case the hosts are unable to
// recover from an outage, or unable to autoscale or unable to handle
// incoming traffic volume for any reason.
//
// At the client each category is applied one after the other to generate
// the 'actual' drop percentage on all outgoing traffic. For example:
//
// .. code-block:: json
//
// { "drop_overloads": [
// { "category": "throttle", "drop_percentage": 60 }
// { "category": "lb", "drop_percentage": 50 }
// ]}
//
// The actual drop percentages applied to the traffic at the clients will be
// "throttle"_drop = 60%
// "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%.
// actual_outgoing_load = 20% // remaining after applying all categories.
repeated DropOverload drop_overloads = 2;
// Priority levels and localities are considered overprovisioned with this
// factor (in percentage). This means that we don't consider a priority
// level or locality unhealthy until the percentage of healthy hosts
// multiplied by the overprovisioning factor drops below 100.
// With the default value 140(1.4), Envoy doesn't consider a priority level
// or a locality unhealthy until their percentage of healthy hosts drops
// below 72%. For example:
//
// .. code-block:: json
//
// { "overprovisioning_factor": 100 }
//
// Read more at :ref:`priority levels <arch_overview_load_balancing_priority_levels>` and
// :ref:`localities <arch_overview_load_balancing_locality_weighted_lb>`.
google.protobuf.UInt32Value overprovisioning_factor = 3 [(validate.rules).uint32 = {gt: 0}];
// The max time until which the endpoints from this assignment can be used.
// If no new assignments are received before this time expires the endpoints
// are considered stale and should be marked unhealthy.
// Defaults to 0 which means endpoints never go stale.
google.protobuf.Duration endpoint_stale_after = 4 [(validate.rules).duration = {gt {}}];
// The flag to disable overprovisioning. If it is set to true,
// :ref:`overprovisioning factor
// <arch_overview_load_balancing_overprovisioning_factor>` will be ignored
// and Envoy will not perform graceful failover between priority levels or
// localities as endpoints become unhealthy. Otherwise Envoy will perform
// graceful failover as :ref:`overprovisioning factor
// <arch_overview_load_balancing_overprovisioning_factor>` suggests.
// [#next-major-version: Unify with overprovisioning config as a single message.]
// [#not-implemented-hide:]
bool disable_overprovisioning = 5;
}
// Name of the cluster. This will be the :ref:`service_name
// <envoy_api_field_service.cluster.v3alpha.Cluster.EdsClusterConfig.service_name>` value if
// specified in the cluster :ref:`EdsClusterConfig
// <envoy_api_msg_service.cluster.v3alpha.Cluster.EdsClusterConfig>`.
string cluster_name = 1 [(validate.rules).string = {min_bytes: 1}];
// List of endpoints to load balance to.
repeated config.endpoint.v3alpha.LocalityLbEndpoints endpoints = 2;
// Map of named endpoints that can be referenced in LocalityLbEndpoints.
// [#not-implemented-hide:]
map<string, config.endpoint.v3alpha.Endpoint> named_endpoints = 5;
// Load balancing policy settings.
Policy policy = 4;
// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing
// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file.
message EdsDummy {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.EdsDummy";
}

@ -4,7 +4,7 @@ package envoy.service.health.v3alpha;
import "envoy/config/core/v3alpha/base.proto";
import "envoy/config/core/v3alpha/health_check.proto";
import "envoy/config/endpoint/v3alpha/endpoint.proto";
import "envoy/config/endpoint/v3alpha/endpoint_components.proto";
import "google/api/annotations.proto";
import "google/protobuf/duration.proto";

@ -8,8 +8,6 @@ api_proto_package(
has_services = True,
deps = [
"//envoy/api/v2:pkg",
"//envoy/config/core/v3alpha:pkg",
"//envoy/config/route/v3alpha:pkg",
"//envoy/service/discovery/v3alpha:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],

@ -2,9 +2,6 @@ syntax = "proto3";
package envoy.service.route.v3alpha;
import "envoy/config/core/v3alpha/base.proto";
import "envoy/config/core/v3alpha/config_source.proto";
import "envoy/config/route/v3alpha/route.proto";
import "envoy/service/discovery/v3alpha/discovery.proto";
import "google/api/annotations.proto";
@ -19,9 +16,7 @@ option java_outer_classname = "RdsProto";
option java_multiple_files = true;
option java_generic_services = true;
// [#protodoc-title: HTTP route configuration]
// * Routing :ref:`architecture overview <arch_overview_http_routing>`
// * HTTP :ref:`router filter <config_http_filters_router>`
// [#protodoc-title: RDS]
// The resource_names field in DiscoveryRequest specifies a route configuration.
// This allows an Envoy configuration with multiple HTTP listeners (and
@ -62,90 +57,8 @@ service VirtualHostDiscoveryService {
}
}
// [#next-free-field: 11]
message RouteConfiguration {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.RouteConfiguration";
// The name of the route configuration. For example, it might match
// :ref:`route_config_name
// <envoy_api_field_extensions.filters.network.http_connection_manager.v3alpha.Rds.route_config_name>`
// in :ref:`envoy_api_msg_config.filter.network.http_connection_manager.v2.Rds`.
string name = 1;
// An array of virtual hosts that make up the route table.
repeated config.route.v3alpha.VirtualHost virtual_hosts = 2;
// An array of virtual hosts will be dynamically loaded via the VHDS API.
// Both *virtual_hosts* and *vhds* fields will be used when present. *virtual_hosts* can be used
// for a base routing table or for infrequently changing virtual hosts. *vhds* is used for
// on-demand discovery of virtual hosts. The contents of these two fields will be merged to
// generate a routing table for a given RouteConfiguration, with *vhds* derived configuration
// taking precedence.
Vhds vhds = 9;
// Optionally specifies a list of HTTP headers that the connection manager
// will consider to be internal only. If they are found on external requests they will be cleaned
// prior to filter invocation. See :ref:`config_http_conn_man_headers_x-envoy-internal` for more
// information.
repeated string internal_only_headers = 3;
// Specifies a list of HTTP headers that should be added to each response that
// the connection manager encodes. Headers specified at this level are applied
// after headers from any enclosed :ref:`envoy_api_msg_route.VirtualHost` or
// :ref:`envoy_api_msg_route.RouteAction`. For more information, including details on
// header value syntax, see the documentation on :ref:`custom request headers
// <config_http_conn_man_headers_custom_request_headers>`.
repeated config.core.v3alpha.HeaderValueOption response_headers_to_add = 4
[(validate.rules).repeated = {max_items: 1000}];
// Specifies a list of HTTP headers that should be removed from each response
// that the connection manager encodes.
repeated string response_headers_to_remove = 5;
// Specifies a list of HTTP headers that should be added to each request
// routed by the HTTP connection manager. Headers specified at this level are
// applied after headers from any enclosed :ref:`envoy_api_msg_route.VirtualHost` or
// :ref:`envoy_api_msg_route.RouteAction`. For more information, including details on
// header value syntax, see the documentation on :ref:`custom request headers
// <config_http_conn_man_headers_custom_request_headers>`.
repeated config.core.v3alpha.HeaderValueOption request_headers_to_add = 6
[(validate.rules).repeated = {max_items: 1000}];
// Specifies a list of HTTP headers that should be removed from each request
// routed by the HTTP connection manager.
repeated string request_headers_to_remove = 8;
// By default, headers that should be added/removed are evaluated from most to least specific:
//
// * route level
// * virtual host level
// * connection manager level
//
// To allow setting overrides at the route or virtual host level, this order can be reversed
// by setting this option to true. Defaults to false.
//
// [#next-major-version: In the v3 API, this will default to true.]
bool most_specific_header_mutations_wins = 10;
// An optional boolean that specifies whether the clusters that the route
// table refers to will be validated by the cluster manager. If set to true
// and a route refers to a non-existent cluster, the route table will not
// load. If set to false and a route refers to a non-existent cluster, the
// route table will load and the router filter will return a 404 if the route
// is selected at runtime. This setting defaults to true if the route table
// is statically defined via the :ref:`route_config
// <envoy_api_field_extensions.filters.network.http_connection_manager.v3alpha.HttpConnectionManager.route_config>`
// option. This setting default to false if the route table is loaded dynamically via the
// :ref:`rds
// <envoy_api_field_extensions.filters.network.http_connection_manager.v3alpha.HttpConnectionManager.rds>`
// option. Users may wish to override the default behavior in certain cases (for example when
// using CDS with a static route table).
google.protobuf.BoolValue validate_clusters = 7;
}
message Vhds {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.Vhds";
// Configuration source specifier for VHDS.
config.core.v3alpha.ConfigSource config_source = 1 [(validate.rules).message = {required: true}];
// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing
// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file.
message RdsDummy {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.RdsDummy";
}

@ -8,14 +8,12 @@ import "google/api/annotations.proto";
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.service.route.v3alpha";
option java_outer_classname = "SrdsProto";
option java_multiple_files = true;
option java_generic_services = true;
// [#protodoc-title: HTTP scoped routing configuration]
// [#protodoc-title: SRDS]
// * Routing :ref:`architecture overview <arch_overview_http_routing>`
// The Scoped Routes Discovery Service (SRDS) API distributes
@ -23,8 +21,8 @@ option java_generic_services = true;
// resources. Each ScopedRouteConfiguration resource represents a "routing
// scope" containing a mapping that allows the HTTP connection manager to
// dynamically assign a routing table (specified via a
// :ref:`RouteConfiguration<envoy_api_msg_service.route.v3alpha.RouteConfiguration>` message) to
// each HTTP request.
// :ref:`RouteConfiguration<envoy_api_msg_config.route.v3alpha.RouteConfiguration>` message) to each
// HTTP request.
service ScopedRoutesDiscoveryService {
rpc StreamScopedRoutes(stream discovery.v3alpha.DiscoveryRequest)
returns (stream discovery.v3alpha.DiscoveryResponse) {
@ -41,104 +39,8 @@ service ScopedRoutesDiscoveryService {
}
}
// Specifies a routing scope, which associates a
// :ref:`Key<envoy_api_msg_service.route.v3alpha.ScopedRouteConfiguration.Key>` to a
// :ref:`envoy_api_msg_RouteConfiguration` (identified by its resource name).
//
// The HTTP connection manager builds up a table consisting of these Key to
// RouteConfiguration mappings, and looks up the RouteConfiguration to use per
// request according to the algorithm specified in the
// :ref:`scope_key_builder<envoy_api_field_extensions.filters.network.http_connection_manager.v3alpha.ScopedRoutes.scope_key_builder>`
// assigned to the HttpConnectionManager.
//
// For example, with the following configurations (in YAML):
//
// HttpConnectionManager config:
//
// .. code::
//
// ...
// scoped_routes:
// name: foo-scoped-routes
// scope_key_builder:
// fragments:
// - header_value_extractor:
// name: X-Route-Selector
// element_separator: ,
// element:
// separator: =
// key: vip
//
// ScopedRouteConfiguration resources (specified statically via
// :ref:`scoped_route_configurations_list<envoy_api_field_extensions.filters.network.http_connection_manager.v3alpha.ScopedRoutes.scoped_route_configurations_list>`
// or obtained dynamically via SRDS):
//
// .. code::
//
// (1)
// name: route-scope1
// route_configuration_name: route-config1
// key:
// fragments:
// - string_key: 172.10.10.20
//
// (2)
// name: route-scope2
// route_configuration_name: route-config2
// key:
// fragments:
// - string_key: 172.20.20.30
//
// A request from a client such as:
//
// .. code::
//
// GET / HTTP/1.1
// Host: foo.com
// X-Route-Selector: vip=172.10.10.20
//
// would result in the routing table defined by the `route-config1`
// RouteConfiguration being assigned to the HTTP request/stream.
//
message ScopedRouteConfiguration {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.ScopedRouteConfiguration";
// Specifies a key which is matched against the output of the
// :ref:`scope_key_builder<envoy_api_field_extensions.filters.network.http_connection_manager.v3alpha.ScopedRoutes.scope_key_builder>`
// specified in the HttpConnectionManager. The matching is done per HTTP
// request and is dependent on the order of the fragments contained in the
// Key.
message Key {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.ScopedRouteConfiguration.Key";
message Fragment {
option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.ScopedRouteConfiguration.Key.Fragment";
oneof type {
option (validate.required) = true;
// A string to match against.
string string_key = 1;
}
}
// The ordered set of fragments to match against. The order must match the
// fragments in the corresponding
// :ref:`scope_key_builder<envoy_api_field_extensions.filters.network.http_connection_manager.v3alpha.ScopedRoutes.scope_key_builder>`.
repeated Fragment fragments = 1 [(validate.rules).repeated = {min_items: 1}];
}
// The name assigned to the routing scope.
string name = 1 [(validate.rules).string = {min_bytes: 1}];
// The resource name to use for a :ref:`envoy_api_msg_DiscoveryRequest` to an
// RDS server to fetch the :ref:`envoy_api_msg_RouteConfiguration` associated
// with this scope.
string route_configuration_name = 2 [(validate.rules).string = {min_bytes: 1}];
// The key to match against.
Key key = 3 [(validate.rules).message = {required: true}];
// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing
// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file.
message SrdsDummy {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.SrdsDummy";
}

@ -11,5 +11,6 @@ api_proto_package(
"//envoy/api/v2/core:pkg",
"//envoy/api/v2/route:pkg",
"//envoy/data/tap/v2alpha:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)

@ -4,15 +4,17 @@ package envoy.service.tap.v2alpha;
import "envoy/api/v2/core/base.proto";
import "envoy/api/v2/core/grpc_service.proto";
import "envoy/api/v2/route/route.proto";
import "envoy/api/v2/route/route_components.proto";
import "google/protobuf/wrappers.proto";
import "udpa/annotations/migrate.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.service.tap.v2alpha";
option java_outer_classname = "CommonProto";
option java_multiple_files = true;
option (udpa.annotations.file_migrate).move_to_package = "envoy.config.tap.v3alpha";
// [#protodoc-title: Common tap configuration]

@ -8,7 +8,7 @@ api_proto_package(
has_services = True,
deps = [
"//envoy/config/core/v3alpha:pkg",
"//envoy/config/route/v3alpha:pkg",
"//envoy/config/tap/v3alpha:pkg",
"//envoy/data/tap/v3alpha:pkg",
"//envoy/service/discovery/v3alpha:pkg",
"//envoy/service/tap/v2alpha:pkg",

@ -40,7 +40,7 @@ message StreamTapsRequest {
config.core.v3alpha.Node node = 1 [(validate.rules).message = {required: true}];
// The opaque identifier that was set in the :ref:`output config
// <envoy_api_field_service.tap.v3alpha.StreamingGrpcSink.tap_id>`.
// <envoy_api_field_config.tap.v3alpha.StreamingGrpcSink.tap_id>`.
string tap_id = 2;
}

@ -2,8 +2,8 @@ syntax = "proto3";
package envoy.service.tap.v3alpha;
import "envoy/config/tap/v3alpha/common.proto";
import "envoy/service/discovery/v3alpha/discovery.proto";
import "envoy/service/tap/v3alpha/common.proto";
import "google/api/annotations.proto";
@ -45,5 +45,5 @@ message TapResource {
string name = 1 [(validate.rules).string = {min_bytes: 1}];
// Tap config to apply
TapConfig config = 2;
config.tap.v3alpha.TapConfig config = 2;
}

@ -4,10 +4,10 @@
// We don't use all the headers in the test below, but including them anyway as
// a cheap way to get some C++ compiler sanity checking.
#include "envoy/api/v2/cds.pb.validate.h"
#include "envoy/api/v2/eds.pb.validate.h"
#include "envoy/api/v2/lds.pb.validate.h"
#include "envoy/api/v2/rds.pb.validate.h"
#include "envoy/api/v2/cluster.pb.validate.h"
#include "envoy/api/v2/endpoint.pb.validate.h"
#include "envoy/api/v2/listener.pb.validate.h"
#include "envoy/api/v2/route.pb.validate.h"
#include "envoy/api/v2/core/protocol.pb.validate.h"
#include "envoy/config/health_checker/redis/v2/redis.pb.validate.h"
#include "envoy/config/filter/accesslog/v2/accesslog.pb.validate.h"

Loading…
Cancel
Save