|
|
|
@ -1,17 +1,18 @@ |
|
|
|
|
syntax = "proto3"; |
|
|
|
|
|
|
|
|
|
package envoy.api.v2.cluster; |
|
|
|
|
option go_package = "cluster"; |
|
|
|
|
package envoy.api.v2; |
|
|
|
|
|
|
|
|
|
import "envoy/api/v2/address.proto"; |
|
|
|
|
import "envoy/api/v2/auth/cert.proto"; |
|
|
|
|
import "envoy/api/v2/base.proto"; |
|
|
|
|
import "envoy/api/v2/config_source.proto"; |
|
|
|
|
import "envoy/api/v2/discovery.proto"; |
|
|
|
|
import "envoy/api/v2/health_check.proto"; |
|
|
|
|
import "envoy/api/v2/protocol.proto"; |
|
|
|
|
import "envoy/api/v2/cluster/circuit_breaker.proto"; |
|
|
|
|
import "envoy/api/v2/cluster/outlier_detection.proto"; |
|
|
|
|
|
|
|
|
|
import "google/api/annotations.proto"; |
|
|
|
|
import "google/protobuf/duration.proto"; |
|
|
|
|
import "google/protobuf/struct.proto"; |
|
|
|
|
import "google/protobuf/wrappers.proto"; |
|
|
|
@ -19,6 +20,19 @@ import "google/protobuf/wrappers.proto"; |
|
|
|
|
import "validate/validate.proto"; |
|
|
|
|
import "gogoproto/gogo.proto"; |
|
|
|
|
|
|
|
|
|
// Return list of all clusters this proxy will load balance to. |
|
|
|
|
service ClusterDiscoveryService { |
|
|
|
|
rpc StreamClusters(stream DiscoveryRequest) returns (stream DiscoveryResponse) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
rpc FetchClusters(DiscoveryRequest) returns (DiscoveryResponse) { |
|
|
|
|
option (google.api.http) = { |
|
|
|
|
post: "/v2/discovery:clusters" |
|
|
|
|
body: "*" |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// [#protodoc-title: Clusters] |
|
|
|
|
|
|
|
|
|
message Cluster { |
|
|
|
@ -119,9 +133,9 @@ message Cluster { |
|
|
|
|
LbPolicy lb_policy = 6 [(validate.rules).enum.defined_only = true]; |
|
|
|
|
|
|
|
|
|
// If the service discovery type is |
|
|
|
|
// :ref:`STATIC<envoy_api_enum_value_cluster.Cluster.DiscoveryType.STATIC>`, |
|
|
|
|
// :ref:`STRICT_DNS<envoy_api_enum_value_cluster.Cluster.DiscoveryType.STRICT_DNS>` |
|
|
|
|
// or :ref:`LOGICAL_DNS<envoy_api_enum_value_cluster.Cluster.DiscoveryType.LOGICAL_DNS>`, |
|
|
|
|
// :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. |
|
|
|
|
repeated Address hosts = 7; |
|
|
|
|
|
|
|
|
@ -138,7 +152,7 @@ message Cluster { |
|
|
|
|
google.protobuf.UInt32Value max_requests_per_connection = 9; |
|
|
|
|
|
|
|
|
|
// Optional :ref:`circuit breaking <arch_overview_circuit_break>` for the cluster. |
|
|
|
|
CircuitBreakers circuit_breakers = 10; |
|
|
|
|
envoy.api.v2.cluster.CircuitBreakers circuit_breakers = 10; |
|
|
|
|
|
|
|
|
|
// The TLS configuration for connections to the upstream cluster. If no TLS |
|
|
|
|
// configuration is specified, TLS will not be used for new connections. |
|
|
|
@ -166,13 +180,13 @@ message Cluster { |
|
|
|
|
reserved 15; |
|
|
|
|
|
|
|
|
|
// If the DNS refresh rate is specified and the cluster type is either |
|
|
|
|
// :ref:`STRICT_DNS<envoy_api_enum_value_cluster.Cluster.DiscoveryType.STRICT_DNS>`, |
|
|
|
|
// or :ref:`LOGICAL_DNS<envoy_api_enum_value_cluster.Cluster.DiscoveryType.LOGICAL_DNS>`, |
|
|
|
|
// :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 cluster’s DNS refresh |
|
|
|
|
// rate. If this setting is not specified, the value defaults to 5000. For |
|
|
|
|
// cluster types other than |
|
|
|
|
// :ref:`STRICT_DNS<envoy_api_enum_value_cluster.Cluster.DiscoveryType.STRICT_DNS>` |
|
|
|
|
// and :ref:`LOGICAL_DNS<envoy_api_enum_value_cluster.Cluster.DiscoveryType.LOGICAL_DNS>` |
|
|
|
|
// :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 = {}, (gogoproto.stdduration) = true]; |
|
|
|
@ -183,8 +197,8 @@ message Cluster { |
|
|
|
|
// 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.Cluster.DiscoveryType.STRICT_DNS>` and |
|
|
|
|
// :ref:`LOGICAL_DNS<envoy_api_enum_value_cluster.Cluster.DiscoveryType.LOGICAL_DNS>`, |
|
|
|
|
// :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 { |
|
|
|
@ -195,28 +209,28 @@ message Cluster { |
|
|
|
|
|
|
|
|
|
// The DNS IP address resolution policy. If this setting is not specified, the |
|
|
|
|
// value defaults to |
|
|
|
|
// :ref:`AUTO<envoy_api_enum_value_cluster.Cluster.DnsLookupFamily.AUTO>`. |
|
|
|
|
// :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.Cluster.DiscoveryType.STRICT_DNS>`, |
|
|
|
|
// or :ref:`LOGICAL_DNS<envoy_api_enum_value_cluster.Cluster.DiscoveryType.LOGICAL_DNS>`, |
|
|
|
|
// :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 cluster’s 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.Cluster.DiscoveryType.STRICT_DNS>` |
|
|
|
|
// and :ref:`LOGICAL_DNS<envoy_api_enum_value_cluster.Cluster.DiscoveryType.LOGICAL_DNS>` |
|
|
|
|
// :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 Address dns_resolvers = 18; |
|
|
|
|
|
|
|
|
|
// 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; |
|
|
|
|
envoy.api.v2.cluster.OutlierDetection outlier_detection = 19; |
|
|
|
|
|
|
|
|
|
// The interval for removing stale hosts from a cluster type |
|
|
|
|
// :ref:`ORIGINAL_DST<envoy_api_enum_value_cluster.Cluster.DiscoveryType.ORIGINAL_DST>`. |
|
|
|
|
// :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 |
|
|
|
@ -226,7 +240,7 @@ message Cluster { |
|
|
|
|
// 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.Cluster.DiscoveryType.ORIGINAL_DST>` |
|
|
|
|
// :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 = {}, (gogoproto.stdduration) = true]; |
|
|
|
@ -253,17 +267,17 @@ message Cluster { |
|
|
|
|
|
|
|
|
|
// 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.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`. |
|
|
|
|
// :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.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`. |
|
|
|
|
// :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.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`. |
|
|
|
|
// :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`. |
|
|
|
|
google.protobuf.Struct default_subset = 2; |
|
|
|
|
|
|
|
|
|
// Specifications for subsets. |
|
|
|
@ -317,10 +331,10 @@ message Cluster { |
|
|
|
|
|
|
|
|
|
// Optional configuration for the load balancing algorithm selected by |
|
|
|
|
// LbPolicy. Currently only |
|
|
|
|
// :ref:`RING_HASH<envoy_api_enum_value_cluster.Cluster.LbPolicy.RING_HASH>` |
|
|
|
|
// :ref:`RING_HASH<envoy_api_enum_value_Cluster.LbPolicy.RING_HASH>` |
|
|
|
|
// has additional configuration options. |
|
|
|
|
// Specifying ring_hash_lb_config without setting the LbPolicy to |
|
|
|
|
// :ref:`RING_HASH<envoy_api_enum_value_cluster.Cluster.LbPolicy.RING_HASH>` |
|
|
|
|
// :ref:`RING_HASH<envoy_api_enum_value_Cluster.LbPolicy.RING_HASH>` |
|
|
|
|
// will generate an error at runtime. |
|
|
|
|
oneof lb_config { |
|
|
|
|
// Optional configuration for the Ring Hash load balancing policy. |
|
|
|
@ -339,7 +353,7 @@ message Cluster { |
|
|
|
|
|
|
|
|
|
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.Cluster.http2_protocol_options>` are |
|
|
|
|
// 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. |