Split base API package into sub-packages (#421)
Signed-off-by: Kuat Yessenov <kuat@google.com>pull/433/head^2
parent
5aa0208c3b
commit
a66448b203
121 changed files with 2002 additions and 1453 deletions
@ -1,371 +0,0 @@ |
||||
load("//bazel:api_build_system.bzl", "api_proto_library", "api_go_proto_library", "api_go_grpc_library") |
||||
|
||||
licenses(["notice"]) # Apache 2 |
||||
|
||||
api_proto_library( |
||||
name = "address", |
||||
srcs = ["address.proto"], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "address", |
||||
proto = ":address", |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "base", |
||||
srcs = ["base.proto"], |
||||
deps = [":address"], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "base", |
||||
proto = ":base", |
||||
deps = [":address_go_proto"], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "bootstrap", |
||||
srcs = ["bootstrap.proto"], |
||||
deps = [ |
||||
":address", |
||||
":base", |
||||
":cds", |
||||
":config_source", |
||||
":grpc_service", |
||||
":lds", |
||||
":sds", |
||||
":stats", |
||||
":trace", |
||||
], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "bootstrap", |
||||
proto = ":bootstrap", |
||||
deps = [ |
||||
":address_go_proto", |
||||
":base_go_proto", |
||||
":cds_go_grpc", |
||||
":config_source_go_proto", |
||||
":grpc_service_go_proto", |
||||
":lds_go_grpc", |
||||
":sds_go_grpc", |
||||
":stats_go_proto", |
||||
":trace_go_proto", |
||||
], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "health_check", |
||||
srcs = ["health_check.proto"], |
||||
deps = [":base"], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "health_check", |
||||
proto = ":health_check", |
||||
deps = [":base_go_proto"], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "cds", |
||||
srcs = ["cds.proto"], |
||||
has_services = 1, |
||||
deps = [ |
||||
":address", |
||||
":base", |
||||
":config_source", |
||||
":discovery", |
||||
":health_check", |
||||
":protocol", |
||||
":sds", |
||||
], |
||||
) |
||||
|
||||
api_go_grpc_library( |
||||
name = "cds", |
||||
proto = ":cds", |
||||
deps = [ |
||||
":address_go_proto", |
||||
":base_go_proto", |
||||
":config_source_go_proto", |
||||
":discovery_go_grpc", |
||||
":health_check_go_proto", |
||||
":protocol_go_proto", |
||||
":sds_go_grpc", |
||||
], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "config_source", |
||||
srcs = ["config_source.proto"], |
||||
deps = [ |
||||
":base", |
||||
":grpc_service", |
||||
], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "config_source", |
||||
proto = ":config_source", |
||||
deps = [ |
||||
":base_go_proto", |
||||
":grpc_service_go_proto", |
||||
], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "discovery", |
||||
srcs = ["discovery.proto"], |
||||
has_services = 1, |
||||
deps = [":base"], |
||||
) |
||||
|
||||
api_go_grpc_library( |
||||
name = "discovery", |
||||
proto = ":discovery", |
||||
deps = [":base_go_proto"], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "eds", |
||||
srcs = ["eds.proto"], |
||||
has_services = 1, |
||||
deps = [ |
||||
":address", |
||||
":base", |
||||
":discovery", |
||||
":health_check", |
||||
], |
||||
) |
||||
|
||||
api_go_grpc_library( |
||||
name = "eds", |
||||
proto = ":eds", |
||||
deps = [ |
||||
":address_go_proto", |
||||
":base_go_proto", |
||||
":discovery_go_grpc", |
||||
":health_check_go_proto", |
||||
], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "grpc_service", |
||||
srcs = ["grpc_service.proto"], |
||||
deps = [":base"], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "grpc_service", |
||||
proto = ":grpc_service", |
||||
deps = [":base_go_proto"], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "hds", |
||||
srcs = ["hds.proto"], |
||||
has_services = 1, |
||||
deps = [ |
||||
":base", |
||||
":health_check", |
||||
], |
||||
) |
||||
|
||||
api_go_grpc_library( |
||||
name = "hds", |
||||
proto = ":hds", |
||||
deps = [ |
||||
":base_go_proto", |
||||
":health_check_go_proto", |
||||
], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "lds", |
||||
srcs = ["lds.proto"], |
||||
has_services = 1, |
||||
deps = [ |
||||
":address", |
||||
":base", |
||||
":discovery", |
||||
":sds", |
||||
], |
||||
) |
||||
|
||||
api_go_grpc_library( |
||||
name = "lds", |
||||
proto = ":lds", |
||||
deps = [ |
||||
":address_go_proto", |
||||
":base_go_proto", |
||||
":discovery_go_grpc", |
||||
":sds_go_grpc", |
||||
], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "metrics", |
||||
srcs = ["metrics_service.proto"], |
||||
has_services = 1, |
||||
require_py = 0, |
||||
deps = [ |
||||
":base", |
||||
":grpc_service", |
||||
"@promotheus_metrics_model//:client_model", |
||||
], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "protocol", |
||||
srcs = ["protocol.proto"], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "protocol", |
||||
proto = ":protocol", |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "rls", |
||||
srcs = ["rls.proto"], |
||||
has_services = 1, |
||||
) |
||||
|
||||
api_go_grpc_library( |
||||
name = "rls", |
||||
proto = ":rls", |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "rds", |
||||
srcs = ["rds.proto"], |
||||
has_services = 1, |
||||
deps = [ |
||||
":auth", |
||||
":base", |
||||
":discovery", |
||||
], |
||||
) |
||||
|
||||
api_go_grpc_library( |
||||
name = "rds", |
||||
proto = ":rds", |
||||
deps = [ |
||||
":auth_go_proto", |
||||
":base_go_proto", |
||||
":discovery_go_grpc", |
||||
], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "sds", |
||||
srcs = ["sds.proto"], |
||||
has_services = 1, |
||||
deps = [ |
||||
":base", |
||||
":config_source", |
||||
":discovery", |
||||
], |
||||
) |
||||
|
||||
api_go_grpc_library( |
||||
name = "sds", |
||||
proto = ":sds", |
||||
deps = [ |
||||
":base_go_proto", |
||||
":config_source_go_proto", |
||||
":discovery_go_grpc", |
||||
], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "stats", |
||||
srcs = ["stats.proto"], |
||||
deps = [ |
||||
":address", |
||||
], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "stats", |
||||
proto = ":stats", |
||||
deps = [ |
||||
":address_go_proto", |
||||
], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "trace", |
||||
srcs = ["trace.proto"], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "trace", |
||||
proto = ":trace", |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "auth", |
||||
srcs = ["auth.proto"], |
||||
deps = [ |
||||
":sds", |
||||
], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "auth", |
||||
proto = ":auth", |
||||
deps = [ |
||||
"//api:address_go_proto", |
||||
"//api:sds_go_grpc", |
||||
"@googleapis//:rpc_status_go_proto", |
||||
], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "trace_service", |
||||
srcs = ["trace_service.proto"], |
||||
has_services = 1, |
||||
require_py = 0, |
||||
deps = [ |
||||
":base", |
||||
":grpc_service", |
||||
"@io_opencensus_trace//:trace_model", |
||||
], |
||||
) |
||||
|
||||
# TODO(htuch): Grow this to cover everything we want to generate docs for, so we can just invoke |
||||
# bazel build //api --aspects tools/protodoc/protodoc.bzl%proto_doc_aspect --output_groups=rst |
||||
proto_library( |
||||
name = "api", |
||||
deps = [ |
||||
":bootstrap", |
||||
":cds", |
||||
":eds", |
||||
":lds", |
||||
":metrics", |
||||
":protocol", |
||||
":rds", |
||||
":rls", |
||||
"//api/filter/accesslog", |
||||
"//api/filter/http:buffer", |
||||
"//api/filter/http:ext_authz", |
||||
"//api/filter/http:fault", |
||||
"//api/filter/http:gzip", |
||||
"//api/filter/http:health_check", |
||||
"//api/filter/http:lua", |
||||
"//api/filter/http:rate_limit", |
||||
"//api/filter/http:router", |
||||
"//api/filter/http:squash", |
||||
"//api/filter/http:transcoder", |
||||
"//api/filter/network:client_ssl_auth", |
||||
"//api/filter/network:ext_authz", |
||||
"//api/filter/network:http_connection_manager", |
||||
"//api/filter/network:mongo_proxy", |
||||
"//api/filter/network:rate_limit", |
||||
"//api/filter/network:redis_proxy", |
||||
"//api/filter/network:tcp_proxy", |
||||
], |
||||
) |
@ -1,278 +0,0 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.api.v2; |
||||
|
||||
import "api/base.proto"; |
||||
import "api/discovery.proto"; |
||||
import "api/health_check.proto"; |
||||
|
||||
import "google/api/annotations.proto"; |
||||
import "google/protobuf/duration.proto"; |
||||
import "google/protobuf/wrappers.proto"; |
||||
|
||||
import "validate/validate.proto"; |
||||
|
||||
// [#protodoc-title: Endpoints and EDS] |
||||
|
||||
service EndpointDiscoveryService { |
||||
// The resource_names field in DiscoveryRequest specifies a list of clusters |
||||
// to subscribe to updates for. |
||||
rpc StreamEndpoints(stream DiscoveryRequest) returns (stream DiscoveryResponse) { |
||||
} |
||||
|
||||
rpc FetchEndpoints(DiscoveryRequest) returns (DiscoveryResponse) { |
||||
option (google.api.http) = { |
||||
post: "/v2/discovery:endpoints" |
||||
body: "*" |
||||
}; |
||||
} |
||||
|
||||
// Advanced API to allow for multi-dimensional load balancing by remote |
||||
// server. For receiving LB assignments, the steps are: |
||||
// 1, The management server is configured with per cluster/zone/load metric |
||||
// capacity configuration. The capacity configuration definition is |
||||
// outside of the scope of this document. |
||||
// 2. Envoy issues a standard {Stream,Fetch}Endpoints request for the clusters |
||||
// to balance. |
||||
// |
||||
// Independently, Envoy will initiate a StreamLoadStats bidi stream with a |
||||
// management server: |
||||
// 1. Once a connection establishes, the management server publishes a |
||||
// LoadStatsResponse for all clusters it is interested in learning load |
||||
// stats about. |
||||
// 2. For each cluster, Envoy load balances incoming traffic to upstream hosts |
||||
// based on per-zone weights and/or per-instance weights (if specified) |
||||
// based on intra-zone LbPolicy. This information comes from the above |
||||
// {Stream,Fetch}Endpoints. |
||||
// 3. When upstream hosts reply, they optionally add header <define header |
||||
// name> with ASCII representation of EndpointLoadMetricStats. |
||||
// 4. Envoy aggregates load reports over the period of time given to it in |
||||
// LoadStatsResponse.load_reporting_interval. This includes aggregation |
||||
// stats Envoy maintains by itself (total_requests, rpc_errors etc.) as |
||||
// well as load metrics from upstream hosts. |
||||
// 5. When the timer of load_reporting_interval expires, Envoy sends new |
||||
// LoadStatsRequest filled with load reports for each cluster. |
||||
// 6. The management server uses the load reports from all reported Envoys |
||||
// from around the world, computes global assignment and prepares traffic |
||||
// assignment destined for each zone Envoys are located in. Goto 2. |
||||
rpc StreamLoadStats(stream LoadStatsRequest) returns (stream LoadStatsResponse) { |
||||
} |
||||
} |
||||
|
||||
// An Endpoint that Envoy can route traffic to. |
||||
message LbEndpoint { |
||||
// Upstream host identifier |
||||
Endpoint endpoint = 1; |
||||
|
||||
// [#not-implemented-hide:] Optional health status when known and supplied by |
||||
// EDS server. |
||||
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 ForwardAction metadata_match field |
||||
// to subset the endpoints considered in cluster load balancing. |
||||
Metadata metadata = 3; |
||||
|
||||
// The optional load balancing weight of the upstream host, in the range 1 - |
||||
// 128. 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. |
||||
// |
||||
// .. attention:: |
||||
// |
||||
// The limit of 128 is somewhat arbitrary, but is applied due to performance |
||||
// concerns with the current implementation and can be removed when |
||||
// `this issue <https://github.com/envoyproxy/envoy/issues/1285>`_ is fixed. |
||||
google.protobuf.UInt32Value load_balancing_weight = 4 |
||||
[(validate.rules).uint32 = {gte: 1, lte: 128}]; |
||||
} |
||||
|
||||
// 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. |
||||
message LocalityLbEndpoints { |
||||
// Identifies location of where the upstream hosts run. |
||||
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 - range 1-128. 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. |
||||
// |
||||
// Weights must be specified for either all localities in a given priority |
||||
// level or none. |
||||
// |
||||
// If unspecified, each locality is presumed to have equal weight in a |
||||
// cluster. |
||||
// |
||||
// .. attention:: |
||||
// |
||||
// The limit of 128 is somewhat arbitrary, but is applied due to performance |
||||
// concerns with the current implementation and can be removed when |
||||
// `this issue <https://github.com/envoyproxy/envoy/issues/1285>`_ is fixed. |
||||
google.protobuf.UInt32Value load_balancing_weight = 3 |
||||
[(validate.rules).uint32 = {gte: 1, lte: 128}]; |
||||
|
||||
// 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; |
||||
} |
||||
|
||||
// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. |
||||
message EndpointLoadMetricStats { |
||||
// Name of the metric; may be empty. |
||||
string metric_name = 1; |
||||
|
||||
// Number of calls that finished and included this metric. |
||||
uint64 num_requests_finished_with_metric = 2; |
||||
|
||||
// Sum of metric values across all calls that finished with this metric for |
||||
// load_reporting_interval. |
||||
double total_metric_value = 3; |
||||
} |
||||
|
||||
// These are stats Envoy reports to GLB every so often. Report frequency is |
||||
// defined by |
||||
// :ref:`LoadStatsResponse.load_reporting_interval<envoy_api_field_LoadStatsResponse.load_reporting_interval>`. |
||||
// Stats per upstream region/zone and optionally per subzone. |
||||
// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. |
||||
message UpstreamLocalityStats { |
||||
// Name of zone, region and optionally endpoint group these metrics were |
||||
// collected from. Zone and region names could be empty if unknown. |
||||
Locality locality = 1; |
||||
|
||||
// The total number of requests sent by this Envoy since the last report. A |
||||
// single HTTP or gRPC request or stream is counted as one request. A TCP |
||||
// connection is also treated as one request. There is no explicit |
||||
// total_requests field below for a locality, but it may be inferred from: |
||||
// |
||||
// .. code-block:: none |
||||
// |
||||
// total_requests = total_successful_requests + total_requests_in_progress + |
||||
// total_error_requests |
||||
// |
||||
// The total number of requests successfully completed by the endpoints in the |
||||
// locality. These include non-5xx responses for HTTP, where errors |
||||
// originate at the client and the endpoint responded successfuly. For gRPC, |
||||
// the grpc-status values are those not covered by total_error_requests below. |
||||
uint64 total_successful_requests = 2; |
||||
|
||||
// The total number of unfinished requests |
||||
uint64 total_requests_in_progress = 3; |
||||
|
||||
// The total number of requests that failed due to errors at the endpoint. |
||||
// For HTTP these are responses with 5xx status codes and for gRPC the |
||||
// grpc-status values: |
||||
// |
||||
// - DeadlineExceeded |
||||
// - Unimplemented |
||||
// - Internal |
||||
// - Unavailable |
||||
// - Unknown |
||||
// - DataLoss |
||||
uint64 total_error_requests = 4; |
||||
|
||||
// Stats for multi-dimensional load balancing. |
||||
repeated EndpointLoadMetricStats load_metric_stats = 5; |
||||
|
||||
// [#not-implemented-hide:] The priority of the endpoint group these metrics |
||||
// were collected from. |
||||
uint32 priority = 6; |
||||
} |
||||
|
||||
// Per cluster load stats. Envoy reports these stats a management server in a |
||||
// :ref:`LoadStatsRequest<envoy_api_msg_LoadStatsRequest>` |
||||
// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. |
||||
message ClusterStats { |
||||
// The name of the cluster. |
||||
string cluster_name = 1 [(validate.rules).string.min_bytes = 1]; |
||||
|
||||
// Need at least one. |
||||
repeated UpstreamLocalityStats upstream_locality_stats = 2 |
||||
[(validate.rules).repeated .min_items = 1]; |
||||
|
||||
// Cluster-level stats such as total_successful_requests may be computed by |
||||
// summing upstream_locality_stats. In addition, below there are additional |
||||
// cluster-wide stats. The following total_requests equality holds at the |
||||
// cluster-level: |
||||
// |
||||
// .. code-block:: none |
||||
// |
||||
// sum_locality(total_successful_requests) + sum_locality(total_requests_in_progress) + |
||||
// sum_locality(total_error_requests) + total_dropped_requests` |
||||
// |
||||
// The total number of dropped requests. This covers requests |
||||
// deliberately dropped by the drop_overload policy and circuit breaking. |
||||
uint64 total_dropped_requests = 3; |
||||
} |
||||
|
||||
// A load report Envoy sends to the management server. |
||||
// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. |
||||
message LoadStatsRequest { |
||||
// Node identifier for Envoy instance. |
||||
Node node = 1; |
||||
|
||||
// A list of load stats to report. |
||||
repeated ClusterStats cluster_stats = 2; |
||||
} |
||||
|
||||
// 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. For a given cluster, the |
||||
// effective weight of a host is its load_balancing_weight multiplied by the |
||||
// load_balancing_weight of its Locality. |
||||
message ClusterLoadAssignment { |
||||
// 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 LocalityLbEndpoints endpoints = 2; |
||||
|
||||
// Load balancing policy settings. |
||||
message Policy { |
||||
// Percentage of traffic (0-100) that should be dropped. This |
||||
// action allows protection of upstream hosts should they unable to |
||||
// recover from an outage or should they be unable to autoscale and hence |
||||
// overall incoming traffic volume need to be trimmed to protect them. |
||||
// [#v2-api-diff: This is known as maintenance mode in v1.] |
||||
double drop_overload = 1 [(validate.rules).double = {gte: 0, lte: 100}]; |
||||
} |
||||
|
||||
// Load balancing policy settings. |
||||
Policy policy = 4; |
||||
} |
||||
|
||||
// The management server sends envoy a LoadStatsResponse with all clusters it |
||||
// is interested in learning load stats about. |
||||
// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. |
||||
message LoadStatsResponse { |
||||
// Clusters to report stats for. |
||||
repeated string clusters = 1 [(validate.rules).repeated .min_items = 1]; |
||||
|
||||
// The interval of time to collect stats. The default is 10 seconds. |
||||
google.protobuf.Duration load_reporting_interval = 2; |
||||
} |
@ -0,0 +1,27 @@ |
||||
licenses(["notice"]) # Apache 2 |
||||
|
||||
# TODO(htuch): Grow this to cover everything we want to generate docs for, so we can just invoke |
||||
# bazel build //envoy/api --aspects tools/protodoc/protodoc.bzl%proto_doc_aspect --output_groups=rst |
||||
proto_library( |
||||
name = "envoy", |
||||
deps = [ |
||||
"//envoy/api/v2", |
||||
"//envoy/api/v2/cluster", |
||||
"//envoy/api/v2/cluster:circuit_breaker", |
||||
"//envoy/api/v2/cluster:outlier_detection", |
||||
"//envoy/api/v2/filter/accesslog", |
||||
"//envoy/api/v2/filter/http", |
||||
"//envoy/api/v2/filter/network", |
||||
"//envoy/api/v2/listener", |
||||
"//envoy/api/v2/ratelimit", |
||||
"//envoy/api/v2/route", |
||||
"//envoy/config/bootstrap/v2:bootstrap", |
||||
"//envoy/config/metrics/v2:metrics_service", |
||||
"//envoy/config/metrics/v2:stats", |
||||
"//envoy/config/ratelimit/v2:rls", |
||||
"//envoy/config/trace/v2:trace", |
||||
"//envoy/service/discovery", |
||||
"//envoy/service/load_stats", |
||||
"//envoy/service/metrics", |
||||
], |
||||
) |
@ -0,0 +1,85 @@ |
||||
load("//bazel:api_build_system.bzl", "api_proto_library", "api_go_proto_library", "api_go_grpc_library") |
||||
|
||||
licenses(["notice"]) # Apache 2 |
||||
|
||||
api_proto_library( |
||||
name = "address", |
||||
srcs = ["address.proto"], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "address", |
||||
proto = ":address", |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "base", |
||||
srcs = ["base.proto"], |
||||
deps = [":address"], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "base", |
||||
proto = ":base", |
||||
deps = [":address_go_proto"], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "health_check", |
||||
srcs = ["health_check.proto"], |
||||
deps = [":base"], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "health_check", |
||||
proto = ":health_check", |
||||
deps = [":base_go_proto"], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "config_source", |
||||
srcs = ["config_source.proto"], |
||||
deps = [ |
||||
":base", |
||||
":grpc_service", |
||||
], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "config_source", |
||||
proto = ":config_source", |
||||
deps = [ |
||||
":base_go_proto", |
||||
":grpc_service_go_proto", |
||||
], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "grpc_service", |
||||
srcs = ["grpc_service.proto"], |
||||
deps = [":base"], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "grpc_service", |
||||
proto = ":grpc_service", |
||||
deps = [":base_go_proto"], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "protocol", |
||||
srcs = ["protocol.proto"], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "protocol", |
||||
proto = ":protocol", |
||||
) |
||||
|
||||
proto_library( |
||||
name = "v2", |
||||
visibility = ["//envoy:__pkg__"], |
||||
deps = [ |
||||
":protocol", |
||||
], |
||||
) |
@ -0,0 +1,38 @@ |
||||
load("//bazel:api_build_system.bzl", "api_proto_library", "api_go_proto_library") |
||||
|
||||
licenses(["notice"]) # Apache 2 |
||||
|
||||
api_proto_library( |
||||
name = "auth", |
||||
srcs = ["auth.proto"], |
||||
deps = [ |
||||
":cert", |
||||
], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "auth", |
||||
proto = ":auth", |
||||
deps = [ |
||||
":cert_go_proto", |
||||
"@googleapis//:rpc_status_go_proto", |
||||
], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "cert", |
||||
srcs = ["cert.proto"], |
||||
deps = [ |
||||
"//envoy/api/v2:base", |
||||
"//envoy/api/v2:config_source", |
||||
], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "cert", |
||||
proto = ":cert", |
||||
deps = [ |
||||
"//envoy/api/v2:base_go_proto", |
||||
"//envoy/api/v2:config_source_go_proto", |
||||
], |
||||
) |
@ -0,0 +1,59 @@ |
||||
load("//bazel:api_build_system.bzl", "api_proto_library", "api_go_proto_library") |
||||
|
||||
licenses(["notice"]) # Apache 2 |
||||
|
||||
api_proto_library( |
||||
name = "circuit_breaker", |
||||
srcs = ["circuit_breaker.proto"], |
||||
deps = [ |
||||
"//envoy/api/v2:base", |
||||
], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "circuit_breaker", |
||||
proto = ":circuit_breaker", |
||||
deps = [ |
||||
"//envoy/api/v2:base_go_proto", |
||||
], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "outlier_detection", |
||||
srcs = ["outlier_detection.proto"], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "outlier_detection", |
||||
proto = ":outlier_detection", |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "cluster", |
||||
srcs = ["cluster.proto"], |
||||
deps = [ |
||||
":circuit_breaker", |
||||
":outlier_detection", |
||||
"//envoy/api/v2:address", |
||||
"//envoy/api/v2:base", |
||||
"//envoy/api/v2:config_source", |
||||
"//envoy/api/v2:health_check", |
||||
"//envoy/api/v2:protocol", |
||||
"//envoy/api/v2/auth:cert", |
||||
], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "cluster", |
||||
proto = ":cluster", |
||||
deps = [ |
||||
":circuit_breaker_go_proto", |
||||
":outlier_detection_go_proto", |
||||
"//envoy/api/v2:address_go_proto", |
||||
"//envoy/api/v2:base_go_proto", |
||||
"//envoy/api/v2:config_source_go_proto", |
||||
"//envoy/api/v2:health_check_go_proto", |
||||
"//envoy/api/v2:protocol_go_proto", |
||||
"//envoy/api/v2/auth:cert_go_proto", |
||||
], |
||||
) |
@ -0,0 +1,47 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.api.v2.cluster; |
||||
|
||||
import "envoy/api/v2/base.proto"; |
||||
|
||||
import "google/protobuf/wrappers.proto"; |
||||
|
||||
// [#protodoc-title: Circuit breakers] |
||||
|
||||
// :ref:`Circuit breaking<arch_overview_circuit_break>` settings can be |
||||
// specified individually for each defined priority. |
||||
message CircuitBreakers { |
||||
|
||||
// A Thresholds defines CircuitBreaker settings for a |
||||
// :ref:`RoutingPriority<envoy_api_enum_RoutingPriority>`. |
||||
message Thresholds { |
||||
// The :ref:`RoutingPriority<envoy_api_enum_RoutingPriority>` |
||||
// the specified CircuitBreaker settings apply to. |
||||
// [#comment:TODO(htuch): add (validate.rules).enum.defined_only = true once |
||||
// https://github.com/lyft/protoc-gen-validate/issues/42 is resolved.] |
||||
RoutingPriority priority = 1; |
||||
|
||||
// The maximum number of connections that Envoy will make to the upstream |
||||
// cluster. If not specified, the default is 1024. |
||||
google.protobuf.UInt32Value max_connections = 2; |
||||
|
||||
// The maximum number of pending requests that Envoy will allow to the |
||||
// upstream cluster. If not specified, the default is 1024. |
||||
google.protobuf.UInt32Value max_pending_requests = 3; |
||||
|
||||
// The maximum number of parallel requests that Envoy will make to the |
||||
// upstream cluster. If not specified, the default is 1024. |
||||
google.protobuf.UInt32Value max_requests = 4; |
||||
|
||||
// The maximum number of parallel retries that Envoy will allow to the |
||||
// upstream cluster. If not specified, the default is 3. |
||||
google.protobuf.UInt32Value max_retries = 5; |
||||
} |
||||
|
||||
// If multiple :ref:`Thresholds<envoy_api_msg_cluster.CircuitBreakers.Thresholds>` |
||||
// are defined with the same :ref:`RoutingPriority<envoy_api_enum_RoutingPriority>`, |
||||
// the first one in the list is used. If no Thresholds is defined for a given |
||||
// :ref:`RoutingPriority<envoy_api_enum_RoutingPriority>`, the default values |
||||
// are used. |
||||
repeated Thresholds thresholds = 1; |
||||
} |
@ -0,0 +1,75 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.api.v2.cluster; |
||||
|
||||
import "google/protobuf/duration.proto"; |
||||
import "google/protobuf/wrappers.proto"; |
||||
|
||||
import "validate/validate.proto"; |
||||
|
||||
// [#protodoc-title: Outlier detection] |
||||
|
||||
// See the :ref:`architecture overview <arch_overview_outlier_detection>` for |
||||
// more information on outlier detection. |
||||
message OutlierDetection { |
||||
// The number of consecutive 5xx responses before a consecutive 5xx ejection |
||||
// occurs. Defaults to 5. |
||||
google.protobuf.UInt32Value consecutive_5xx = 1; |
||||
|
||||
// The time interval between ejection analysis sweeps. This can result in |
||||
// both new ejections as well as hosts being returned to service. Defaults |
||||
// to 10000ms or 10s. |
||||
google.protobuf.Duration interval = 2 [(validate.rules).duration.gt = {}]; |
||||
|
||||
// The base time that a host is ejected for. The real time is equal to the |
||||
// base time multiplied by the number of times the host has been ejected. |
||||
// Defaults to 30000ms or 30s. |
||||
google.protobuf.Duration base_ejection_time = 3 [(validate.rules).duration.gt = {}]; |
||||
|
||||
// The maximum % of an upstream cluster that can be ejected due to outlier |
||||
// detection. Defaults to 10%. |
||||
google.protobuf.UInt32Value max_ejection_percent = 4 [(validate.rules).uint32.lte = 100]; |
||||
|
||||
// The % chance that a host will be actually ejected when an outlier status |
||||
// is detected through consecutive 5xx. This setting can be used to disable |
||||
// ejection or to ramp it up slowly. Defaults to 100. |
||||
google.protobuf.UInt32Value enforcing_consecutive_5xx = 5 [(validate.rules).uint32.lte = 100]; |
||||
|
||||
// The % chance that a host will be actually ejected when an outlier status |
||||
// is detected through success rate statistics. This setting can be used to |
||||
// disable ejection or to ramp it up slowly. Defaults to 100. |
||||
google.protobuf.UInt32Value enforcing_success_rate = 6 [(validate.rules).uint32.lte = 100]; |
||||
|
||||
// The number of hosts in a cluster that must have enough request volume to |
||||
// detect success rate outliers. If the number of hosts is less than this |
||||
// setting, outlier detection via success rate statistics is not performed |
||||
// for any host in the cluster. Defaults to 5. |
||||
google.protobuf.UInt32Value success_rate_minimum_hosts = 7; |
||||
|
||||
// The minimum number of total requests that must be collected in one |
||||
// interval (as defined by the interval duration above) to include this host |
||||
// in success rate based outlier detection. If the volume is lower than this |
||||
// setting, outlier detection via success rate statistics is not performed |
||||
// for that host. Defaults to 100. |
||||
google.protobuf.UInt32Value success_rate_request_volume = 8; |
||||
|
||||
// This factor is used to determine the ejection threshold for success rate |
||||
// outlier ejection. The ejection threshold is the difference between the |
||||
// mean success rate, and the product of this factor and the standard |
||||
// deviation of the mean success rate: mean - (stdev * |
||||
// success_rate_stdev_factor). This factor is divided by a thousand to get a |
||||
// double. That is, if the desired factor is 1.9, the runtime value should |
||||
// be 1900. Defaults to 1900. |
||||
google.protobuf.UInt32Value success_rate_stdev_factor = 9; |
||||
|
||||
// The number of consecutive gateway failures (502, 503, 504 status or |
||||
// connection errors that are mapped to one of those status codes) before a |
||||
// consecutive gateway failure ejection occurs. Defaults to 5. |
||||
google.protobuf.UInt32Value consecutive_gateway_failure = 10; |
||||
|
||||
// The % chance that a host will be actually ejected when an outlier status |
||||
// is detected through consecutive gateway failures. This setting can be |
||||
// used to disable ejection or to ramp it up slowly. Defaults to 0. |
||||
google.protobuf.UInt32Value enforcing_consecutive_gateway_failure = 11 |
||||
[(validate.rules).uint32.lte = 100]; |
||||
} |
@ -0,0 +1,45 @@ |
||||
load("//bazel:api_build_system.bzl", "api_proto_library", "api_go_proto_library") |
||||
|
||||
licenses(["notice"]) # Apache 2 |
||||
|
||||
api_proto_library( |
||||
name = "endpoint", |
||||
srcs = ["endpoint.proto"], |
||||
deps = [ |
||||
"//envoy/api/v2:address", |
||||
"//envoy/api/v2:base", |
||||
"//envoy/api/v2:config_source", |
||||
"//envoy/api/v2:health_check", |
||||
"//envoy/api/v2:protocol", |
||||
"//envoy/api/v2/auth:cert", |
||||
], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "endpoint", |
||||
proto = ":endpoint", |
||||
deps = [ |
||||
"//envoy/api/v2:address_go_proto", |
||||
"//envoy/api/v2:base_go_proto", |
||||
"//envoy/api/v2:config_source_go_proto", |
||||
"//envoy/api/v2:health_check_go_proto", |
||||
"//envoy/api/v2:protocol_go_proto", |
||||
"//envoy/api/v2/auth:cert_go_proto", |
||||
], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "load_report", |
||||
srcs = ["load_report.proto"], |
||||
deps = [ |
||||
"//envoy/api/v2:base", |
||||
], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "load_report", |
||||
proto = ":load_report", |
||||
deps = [ |
||||
"//envoy/api/v2:base_go_proto", |
||||
], |
||||
) |
@ -0,0 +1,97 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.api.v2.endpoint; |
||||
option go_package = "endpoint"; |
||||
|
||||
import "envoy/api/v2/address.proto"; |
||||
import "envoy/api/v2/base.proto"; |
||||
import "envoy/api/v2/health_check.proto"; |
||||
|
||||
import "google/protobuf/wrappers.proto"; |
||||
|
||||
import "validate/validate.proto"; |
||||
import "gogoproto/gogo.proto"; |
||||
|
||||
// [#protodoc-title: Endpoints] |
||||
|
||||
// Upstream host identifier. |
||||
message Endpoint { |
||||
Address address = 1; |
||||
} |
||||
|
||||
// An Endpoint that Envoy can route traffic to. |
||||
message LbEndpoint { |
||||
// Upstream host identifier |
||||
Endpoint endpoint = 1; |
||||
|
||||
// [#not-implemented-hide:] Optional health status when known and supplied by |
||||
// EDS server. |
||||
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 ForwardAction metadata_match field |
||||
// to subset the endpoints considered in cluster load balancing. |
||||
Metadata metadata = 3; |
||||
|
||||
// The optional load balancing weight of the upstream host, in the range 1 - |
||||
// 128. 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. |
||||
// |
||||
// .. attention:: |
||||
// |
||||
// The limit of 128 is somewhat arbitrary, but is applied due to performance |
||||
// concerns with the current implementation and can be removed when |
||||
// `this issue <https://github.com/envoyproxy/envoy/issues/1285>`_ is fixed. |
||||
google.protobuf.UInt32Value load_balancing_weight = 4 |
||||
[(validate.rules).uint32 = {gte: 1, lte: 128}]; |
||||
} |
||||
|
||||
// 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. |
||||
message LocalityLbEndpoints { |
||||
// Identifies location of where the upstream hosts run. |
||||
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 - range 1-128. 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. |
||||
// |
||||
// Weights must be specified for either all localities in a given priority |
||||
// level or none. |
||||
// |
||||
// If unspecified, each locality is presumed to have equal weight in a |
||||
// cluster. |
||||
// |
||||
// .. attention:: |
||||
// |
||||
// The limit of 128 is somewhat arbitrary, but is applied due to performance |
||||
// concerns with the current implementation and can be removed when |
||||
// `this issue <https://github.com/envoyproxy/envoy/issues/1285>`_ is fixed. |
||||
google.protobuf.UInt32Value load_balancing_weight = 3 |
||||
[(validate.rules).uint32 = {gte: 1, lte: 128}]; |
||||
|
||||
// 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; |
||||
} |
@ -0,0 +1,96 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.api.v2.endpoint; |
||||
|
||||
import "envoy/api/v2/base.proto"; |
||||
|
||||
import "validate/validate.proto"; |
||||
import "gogoproto/gogo.proto"; |
||||
|
||||
// These are stats Envoy reports to GLB every so often. Report frequency is |
||||
// defined by |
||||
// :ref:`LoadStatsResponse.load_reporting_interval<envoy_api_field_load_stats.LoadStatsResponse.load_reporting_interval>`. |
||||
// Stats per upstream region/zone and optionally per subzone. |
||||
// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. |
||||
message UpstreamLocalityStats { |
||||
// Name of zone, region and optionally endpoint group these metrics were |
||||
// collected from. Zone and region names could be empty if unknown. |
||||
envoy.api.v2.Locality locality = 1; |
||||
|
||||
// The total number of requests sent by this Envoy since the last report. A |
||||
// single HTTP or gRPC request or stream is counted as one request. A TCP |
||||
// connection is also treated as one request. There is no explicit |
||||
// total_requests field below for a locality, but it may be inferred from: |
||||
// |
||||
// .. code-block:: none |
||||
// |
||||
// total_requests = total_successful_requests + total_requests_in_progress + |
||||
// total_error_requests |
||||
// |
||||
// The total number of requests successfully completed by the endpoints in the |
||||
// locality. These include non-5xx responses for HTTP, where errors |
||||
// originate at the client and the endpoint responded successfuly. For gRPC, |
||||
// the grpc-status values are those not covered by total_error_requests below. |
||||
uint64 total_successful_requests = 2; |
||||
|
||||
// The total number of unfinished requests |
||||
uint64 total_requests_in_progress = 3; |
||||
|
||||
// The total number of requests that failed due to errors at the endpoint. |
||||
// For HTTP these are responses with 5xx status codes and for gRPC the |
||||
// grpc-status values: |
||||
// |
||||
// - DeadlineExceeded |
||||
// - Unimplemented |
||||
// - Internal |
||||
// - Unavailable |
||||
// - Unknown |
||||
// - DataLoss |
||||
uint64 total_error_requests = 4; |
||||
|
||||
// Stats for multi-dimensional load balancing. |
||||
repeated EndpointLoadMetricStats load_metric_stats = 5; |
||||
|
||||
// [#not-implemented-hide:] The priority of the endpoint group these metrics |
||||
// were collected from. |
||||
uint32 priority = 6; |
||||
} |
||||
|
||||
// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. |
||||
message EndpointLoadMetricStats { |
||||
// Name of the metric; may be empty. |
||||
string metric_name = 1; |
||||
|
||||
// Number of calls that finished and included this metric. |
||||
uint64 num_requests_finished_with_metric = 2; |
||||
|
||||
// Sum of metric values across all calls that finished with this metric for |
||||
// load_reporting_interval. |
||||
double total_metric_value = 3; |
||||
} |
||||
|
||||
// Per cluster load stats. Envoy reports these stats a management server in a |
||||
// :ref:`LoadStatsRequest<envoy_api_msg_load_stats.LoadStatsRequest>` |
||||
// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. |
||||
message ClusterStats { |
||||
// The name of the cluster. |
||||
string cluster_name = 1 [(validate.rules).string.min_bytes = 1]; |
||||
|
||||
// Need at least one. |
||||
repeated UpstreamLocalityStats upstream_locality_stats = 2 |
||||
[(validate.rules).repeated .min_items = 1]; |
||||
|
||||
// Cluster-level stats such as total_successful_requests may be computed by |
||||
// summing upstream_locality_stats. In addition, below there are additional |
||||
// cluster-wide stats. The following total_requests equality holds at the |
||||
// cluster-level: |
||||
// |
||||
// .. code-block:: none |
||||
// |
||||
// sum_locality(total_successful_requests) + sum_locality(total_requests_in_progress) + |
||||
// sum_locality(total_error_requests) + total_dropped_requests` |
||||
// |
||||
// The total number of dropped requests. This covers requests |
||||
// deliberately dropped by the drop_overload policy and circuit breaking. |
||||
uint64 total_dropped_requests = 3; |
||||
} |
@ -1,8 +1,9 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.api.v2.filter.http; |
||||
option go_package = "http"; |
||||
|
||||
import "api/filter/accesslog/accesslog.proto"; |
||||
import "envoy/api/v2/filter/accesslog/accesslog.proto"; |
||||
|
||||
import "google/protobuf/wrappers.proto"; |
||||
|
@ -0,0 +1,23 @@ |
||||
load("//bazel:api_build_system.bzl", "api_proto_library", "api_go_proto_library") |
||||
|
||||
licenses(["notice"]) # Apache 2 |
||||
|
||||
api_proto_library( |
||||
name = "listener", |
||||
srcs = ["listener.proto"], |
||||
deps = [ |
||||
"//envoy/api/v2:address", |
||||
"//envoy/api/v2:base", |
||||
"//envoy/api/v2/auth:cert", |
||||
], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "listener", |
||||
proto = ":listener", |
||||
deps = [ |
||||
"//envoy/api/v2:address_go_proto", |
||||
"//envoy/api/v2:base_go_proto", |
||||
"//envoy/api/v2/auth:cert_go_proto", |
||||
], |
||||
) |
@ -0,0 +1,13 @@ |
||||
load("//bazel:api_build_system.bzl", "api_proto_library", "api_go_proto_library") |
||||
|
||||
licenses(["notice"]) # Apache 2 |
||||
|
||||
api_proto_library( |
||||
name = "ratelimit", |
||||
srcs = ["ratelimit.proto"], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "ratelimit", |
||||
proto = ":ratelimit", |
||||
) |
@ -0,0 +1,62 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.api.v2.ratelimit; |
||||
option go_package = "ratelimit"; |
||||
|
||||
import "validate/validate.proto"; |
||||
|
||||
// [#protodoc-title: Common rate limit components] |
||||
|
||||
// A RateLimitDescriptor is a list of hierarchical entries that are used by the service to |
||||
// determine the final rate limit key and overall allowed limit. Here are some examples of how |
||||
// they might be used for the domain "envoy". |
||||
// |
||||
// .. code-block:: cpp |
||||
// |
||||
// ["authenticated": "false"], ["remote_address": "10.0.0.1"] |
||||
// |
||||
// What it does: Limits all unauthenticated traffic for the IP address 10.0.0.1. The |
||||
// configuration supplies a default limit for the *remote_address* key. If there is a desire to |
||||
// raise the limit for 10.0.0.1 or block it entirely it can be specified directly in the |
||||
// configuration. |
||||
// |
||||
// .. code-block:: cpp |
||||
// |
||||
// ["authenticated": "false"], ["path": "/foo/bar"] |
||||
// |
||||
// What it does: Limits all unauthenticated traffic globally for a specific path (or prefix if |
||||
// configured that way in the service). |
||||
// |
||||
// .. code-block:: cpp |
||||
// |
||||
// ["authenticated": "false"], ["path": "/foo/bar"], ["remote_address": "10.0.0.1"] |
||||
// |
||||
// What it does: Limits unauthenticated traffic to a specific path for a specific IP address. |
||||
// Like (1) we can raise/block specific IP addresses if we want with an override configuration. |
||||
// |
||||
// .. code-block:: cpp |
||||
// |
||||
// ["authenticated": "true"], ["client_id": "foo"] |
||||
// |
||||
// What it does: Limits all traffic for an authenticated client "foo" |
||||
// |
||||
// .. code-block:: cpp |
||||
// |
||||
// ["authenticated": "true"], ["client_id": "foo"], ["path": "/foo/bar"] |
||||
// |
||||
// What it does: Limits traffic to a specific path for an authenticated client "foo" |
||||
// |
||||
// The idea behind the API is that (1)/(2)/(3) and (4)/(5) can be sent in 1 request if desired. |
||||
// This enables building complex application scenarios with a generic backend. |
||||
message RateLimitDescriptor { |
||||
message Entry { |
||||
// Descriptor key. |
||||
string key = 1 [(validate.rules).string.min_bytes = 1]; |
||||
|
||||
// Descriptor value. |
||||
string value = 2 [(validate.rules).string.min_bytes = 1]; |
||||
} |
||||
|
||||
// Descriptor entries. |
||||
repeated Entry entries = 1 [(validate.rules).repeated .min_items = 1]; |
||||
} |
@ -0,0 +1,21 @@ |
||||
load("//bazel:api_build_system.bzl", "api_proto_library", "api_go_proto_library") |
||||
|
||||
licenses(["notice"]) # Apache 2 |
||||
|
||||
api_proto_library( |
||||
name = "route", |
||||
srcs = ["route.proto"], |
||||
deps = [ |
||||
"//envoy/api/v2:base", |
||||
"//envoy/api/v2/auth", |
||||
], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "route", |
||||
proto = ":route", |
||||
deps = [ |
||||
"//envoy/api/v2:base_go_proto", |
||||
"//envoy/api/v2/auth:auth_go_proto", |
||||
], |
||||
) |
@ -0,0 +1,9 @@ |
||||
load("//bazel:api_build_system.bzl", "api_proto_library") |
||||
|
||||
api_proto_library( |
||||
name = "als", |
||||
srcs = ["als.proto"], |
||||
deps = [ |
||||
"//envoy/api/v2:grpc_service", |
||||
], |
||||
) |
@ -0,0 +1,42 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.config.accesslog.v2; |
||||
option go_package = "accesslog"; |
||||
|
||||
import "envoy/api/v2/grpc_service.proto"; |
||||
|
||||
import "validate/validate.proto"; |
||||
|
||||
// Configuration for the built-in *envoy.tcp_grpc_access_log* type. This configuration will |
||||
// populate *StreamAccessLogsMessage.tcp_logs*. |
||||
// [#not-implemented-hide:] |
||||
// [#comment:TODO(mattklein123): Block type in non-tcp proxy cases?] |
||||
message TcpGrpcAccessLogConfig { |
||||
CommonGrpcAccessLogConfig common_config = 1 [(validate.rules).message.required = true]; |
||||
} |
||||
|
||||
// Configuration for the built-in *envoy.http_grpc_access_log* type. This configuration will |
||||
// populate *StreamAccessLogsMessage.http_logs*. |
||||
// [#not-implemented-hide:] |
||||
// [#comment:TODO(mattklein123): Block type in non-http/router proxy cases?] |
||||
message HttpGrpcAccessLogConfig { |
||||
CommonGrpcAccessLogConfig common_config = 1 [(validate.rules).message.required = true]; |
||||
|
||||
// Additional request headers to log in *HTTPRequestProperties.request_headers*. |
||||
repeated string additional_request_headers_to_log = 2; |
||||
|
||||
// Additional response headers to log in *HTTPResponseProperties.response_headers*. |
||||
repeated string additional_response_headers_to_log = 3; |
||||
} |
||||
|
||||
// Common configuration for gRPC access logs. |
||||
// [#not-implemented-hide:] |
||||
message CommonGrpcAccessLogConfig { |
||||
// The friendly name of the access log to be returned in StreamAccessLogsMessage.Identifier. This |
||||
// allows the access log server to differentiate between different access logs coming from the |
||||
// same Envoy. |
||||
string log_name = 1 [(validate.rules).string.min_bytes = 1]; |
||||
|
||||
// The gRPC service for the access log service. |
||||
envoy.api.v2.GrpcService grpc_service = 2 [(validate.rules).message.required = true]; |
||||
} |
@ -0,0 +1,37 @@ |
||||
load("//bazel:api_build_system.bzl", "api_proto_library", "api_go_proto_library") |
||||
|
||||
licenses(["notice"]) # Apache 2 |
||||
|
||||
api_proto_library( |
||||
name = "bootstrap", |
||||
srcs = ["bootstrap.proto"], |
||||
deps = [ |
||||
"//envoy/api/v2:address", |
||||
"//envoy/api/v2:base", |
||||
"//envoy/api/v2:config_source", |
||||
"//envoy/api/v2/auth:cert", |
||||
"//envoy/api/v2/cluster", |
||||
"//envoy/api/v2/listener", |
||||
"//envoy/config/metrics/v2:metrics_service", |
||||
"//envoy/config/metrics/v2:stats", |
||||
"//envoy/config/ratelimit/v2:rls", |
||||
"//envoy/config/trace/v2:trace", |
||||
], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "bootstrap", |
||||
proto = ":bootstrap", |
||||
deps = [ |
||||
"//envoy/api/v2:address_go_proto", |
||||
"//envoy/api/v2:base_go_proto", |
||||
"//envoy/api/v2:config_source_go_proto", |
||||
"//envoy/api/v2/auth:cert_go_proto", |
||||
"//envoy/api/v2/cluster:cluster_go_proto", |
||||
"//envoy/api/v2/listener:listener_go_proto", |
||||
"//envoy/config/metrics/v2:metrics_service_go_proto", |
||||
"//envoy/config/metrics/v2:stats_go_proto", |
||||
"//envoy/config/ratelimit/v2:rls_go_grpc", |
||||
"//envoy/config/trace/v2:trace_go_proto", |
||||
], |
||||
) |
@ -0,0 +1,35 @@ |
||||
load("//bazel:api_build_system.bzl", "api_proto_library", "api_go_proto_library", "api_go_grpc_library") |
||||
|
||||
licenses(["notice"]) # Apache 2 |
||||
|
||||
api_proto_library( |
||||
name = "metrics_service", |
||||
srcs = ["metrics_service.proto"], |
||||
deps = [ |
||||
"//envoy/api/v2:grpc_service", |
||||
], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "metrics_service", |
||||
proto = ":metrics_service", |
||||
deps = [ |
||||
"//envoy/api/v2:grpc_service_go_proto", |
||||
], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "stats", |
||||
srcs = ["stats.proto"], |
||||
deps = [ |
||||
"//envoy/api/v2:address", |
||||
], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "stats", |
||||
proto = ":stats", |
||||
deps = [ |
||||
"//envoy/api/v2:address_go_proto", |
||||
], |
||||
) |
@ -0,0 +1,19 @@ |
||||
syntax = "proto3"; |
||||
|
||||
// [#proto-status: draft] |
||||
|
||||
// [#protodoc-title: Metrics Service] |
||||
|
||||
package envoy.config.metrics.v2; |
||||
|
||||
import "envoy/api/v2/grpc_service.proto"; |
||||
|
||||
import "validate/validate.proto"; |
||||
|
||||
// Metrics Service is configured as a built-in *envoy.metrics_service* :ref:`StatsSink |
||||
// <envoy_api_msg_config.metrics.v2.StatsSink>`. This opaque configuration will be used to create |
||||
// Metrics Service. |
||||
message MetricsServiceConfig { |
||||
// The upstream gRPC cluster that hosts the metrics service. |
||||
envoy.api.v2.GrpcService grpc_service = 1 [(validate.rules).message.required = true]; |
||||
} |
@ -0,0 +1,19 @@ |
||||
load("//bazel:api_build_system.bzl", "api_proto_library", "api_go_grpc_library") |
||||
|
||||
licenses(["notice"]) # Apache 2 |
||||
|
||||
api_proto_library( |
||||
name = "rls", |
||||
srcs = ["rls.proto"], |
||||
deps = [ |
||||
"//envoy/api/v2:grpc_service", |
||||
], |
||||
) |
||||
|
||||
api_go_grpc_library( |
||||
name = "rls", |
||||
proto = ":rls", |
||||
deps = [ |
||||
"//envoy/api/v2:grpc_service_go_proto", |
||||
], |
||||
) |
@ -0,0 +1,30 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.config.ratelimit.v2; |
||||
option go_package = "ratelimit"; |
||||
|
||||
import "envoy/api/v2/grpc_service.proto"; |
||||
|
||||
import "validate/validate.proto"; |
||||
|
||||
// [#protodoc-title: Rate limit service configuration] |
||||
|
||||
// Rate limit :ref:`configuration overview <config_rate_limit_service>`. |
||||
message RateLimitServiceConfig { |
||||
oneof service_specifier { |
||||
option (validate.required) = true; |
||||
|
||||
// Specifies the cluster manager cluster name that hosts the rate limit |
||||
// service. The client will connect to this cluster when it needs to make |
||||
// rate limit service requests. This field is deprecated and `grpc_service` |
||||
// should be used instead. The :ref:`Envoy gRPC client |
||||
// <envoy_api_field_GrpcService.envoy_grpc>` will be used when this field is |
||||
// specified. |
||||
string cluster_name = 1 [(validate.rules).string.min_bytes = 1, deprecated = true]; |
||||
|
||||
// Specifies the gRPC service that hosts the rate limit service. The client |
||||
// will connect to this cluster when it needs to make rate limit service |
||||
// requests. |
||||
envoy.api.v2.GrpcService grpc_service = 2; |
||||
} |
||||
} |
@ -0,0 +1,19 @@ |
||||
load("//bazel:api_build_system.bzl", "api_proto_library", "api_go_proto_library", "api_go_grpc_library") |
||||
|
||||
licenses(["notice"]) # Apache 2 |
||||
|
||||
api_proto_library( |
||||
name = "trace", |
||||
srcs = ["trace.proto"], |
||||
deps = [ |
||||
"//envoy/api/v2:grpc_service", |
||||
], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "trace", |
||||
proto = ":trace", |
||||
deps = [ |
||||
"//envoy/api/v2:grpc_service_go_proto", |
||||
], |
||||
) |
@ -0,0 +1,12 @@ |
||||
load("//bazel:api_build_system.bzl", "api_proto_library") |
||||
|
||||
api_proto_library( |
||||
name = "als", |
||||
srcs = ["als.proto"], |
||||
has_services = 1, |
||||
deps = [ |
||||
"//envoy/api/v2:base", |
||||
"//envoy/api/v2:grpc_service", |
||||
"//envoy/api/v2/filter/accesslog", |
||||
], |
||||
) |
@ -0,0 +1,65 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.service.accesslog.v2; |
||||
option go_package = "accesslog"; |
||||
|
||||
import "envoy/api/v2/base.proto"; |
||||
import "envoy/api/v2/filter/accesslog/accesslog.proto"; |
||||
|
||||
import "validate/validate.proto"; |
||||
|
||||
// Service for streaming access logs from Envoy to an access log server. |
||||
service AccessLogService { |
||||
// Envoy will connect and send StreamAccessLogsMessage messages forever. It does not expect any |
||||
// response to be sent as nothing would be done in the case of failure. The server should |
||||
// disconnect if it expects Envoy to reconnect. In the future we may decide to add a different |
||||
// API for "critical" access logs in which Envoy will buffer access logs for some period of time |
||||
// until it gets an ACK so it could then retry. This API is designed for high throughput with the |
||||
// expectation that it might be lossy. |
||||
rpc StreamAccessLogs(stream StreamAccessLogsMessage) returns (StreamAccessLogsResponse) { |
||||
} |
||||
} |
||||
|
||||
// Empty response for the StreamAccessLogs API. Will never be sent. See below. |
||||
// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. |
||||
message StreamAccessLogsResponse { |
||||
} |
||||
|
||||
// [#proto-status: experimental] |
||||
// [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs. |
||||
// Stream message for the StreamAccessLogs API. Envoy will open a stream to the server and stream |
||||
// access logs without ever expecting a response. |
||||
message StreamAccessLogsMessage { |
||||
message Identifier { |
||||
// The node sending the access log messages over the stream. |
||||
envoy.api.v2.Node node = 1 [(validate.rules).message.required = true]; |
||||
|
||||
// The friendly name of the log configured in AccessLogServiceConfig. |
||||
string log_name = 2 [(validate.rules).string.min_bytes = 1]; |
||||
} |
||||
|
||||
// Identifier data that will only be sent in the first message on the stream. This is effectively |
||||
// structured metadata and is a performance optimization. |
||||
Identifier identifier = 1; |
||||
|
||||
// Wrapper for batches of HTTP access log entries. |
||||
message HTTPAccessLogEntries { |
||||
repeated envoy.api.v2.filter.accesslog.HTTPAccessLogEntry log_entry = 1 |
||||
[(validate.rules).repeated .min_items = 1]; |
||||
} |
||||
|
||||
// Wrapper for batches of TCP access log entries. |
||||
message TCPAccessLogEntries { |
||||
repeated envoy.api.v2.filter.accesslog.TCPAccessLogEntry log_entry = 1 |
||||
[(validate.rules).repeated .min_items = 1]; |
||||
} |
||||
|
||||
// Batches of log entries of a single type. Generally speaking, a given stream should only |
||||
// ever incude one type of log entry. |
||||
oneof log_entries { |
||||
option (validate.required) = true; |
||||
|
||||
HTTPAccessLogEntries http_logs = 2; |
||||
TCPAccessLogEntries tcp_logs = 3; |
||||
} |
||||
} |
@ -1,14 +1,14 @@ |
||||
load("//bazel:api_build_system.bzl", "api_proto_library") |
||||
load("//bazel:api_build_system.bzl", "api_proto_library", "api_go_proto_library") |
||||
|
||||
licenses(["notice"]) # Apache 2 |
||||
|
||||
api_proto_library( |
||||
name = "auth", |
||||
name = "external_auth", |
||||
srcs = [ |
||||
"external_auth.proto", |
||||
], |
||||
has_services = 1, |
||||
deps = [ |
||||
"//api:address", |
||||
"//envoy/api/v2:address", |
||||
], |
||||
) |
@ -0,0 +1,13 @@ |
||||
proto_library( |
||||
name = "discovery", |
||||
visibility = ["//envoy:__pkg__"], |
||||
deps = [ |
||||
"//envoy/service/discovery/v2:ads", |
||||
"//envoy/service/discovery/v2:cds", |
||||
"//envoy/service/discovery/v2:common", |
||||
"//envoy/service/discovery/v2:eds", |
||||
"//envoy/service/discovery/v2:lds", |
||||
"//envoy/service/discovery/v2:rds", |
||||
"//envoy/service/discovery/v2:sds", |
||||
], |
||||
) |
@ -0,0 +1,146 @@ |
||||
load("//bazel:api_build_system.bzl", "api_proto_library", "api_go_proto_library", "api_go_grpc_library") |
||||
|
||||
licenses(["notice"]) # Apache 2 |
||||
|
||||
api_proto_library( |
||||
name = "common", |
||||
srcs = ["common.proto"], |
||||
deps = ["//envoy/api/v2:base"], |
||||
) |
||||
|
||||
api_go_proto_library( |
||||
name = "common", |
||||
proto = ":common", |
||||
deps = ["//envoy/api/v2:base_go_proto"], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "ads", |
||||
srcs = ["ads.proto"], |
||||
has_services = 1, |
||||
deps = [ |
||||
":common", |
||||
], |
||||
) |
||||
|
||||
api_go_grpc_library( |
||||
name = "ads", |
||||
proto = ":ads", |
||||
deps = [ |
||||
":common_go_proto", |
||||
], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "eds", |
||||
srcs = ["eds.proto"], |
||||
has_services = 1, |
||||
deps = [ |
||||
":common", |
||||
"//envoy/api/v2:address", |
||||
"//envoy/api/v2:base", |
||||
"//envoy/api/v2:health_check", |
||||
"//envoy/api/v2/endpoint", |
||||
], |
||||
) |
||||
|
||||
api_go_grpc_library( |
||||
name = "eds", |
||||
proto = ":eds", |
||||
deps = [ |
||||
":common_go_proto", |
||||
"//envoy/api/v2:address_go_proto", |
||||
"//envoy/api/v2:base_go_proto", |
||||
"//envoy/api/v2:health_check_go_proto", |
||||
"//envoy/api/v2/endpoint:endpoint_go_proto", |
||||
], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "cds", |
||||
srcs = ["cds.proto"], |
||||
has_services = 1, |
||||
deps = [ |
||||
":common", |
||||
], |
||||
) |
||||
|
||||
api_go_grpc_library( |
||||
name = "cds", |
||||
proto = ":cds", |
||||
deps = [ |
||||
":common_go_proto", |
||||
], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "lds", |
||||
srcs = ["lds.proto"], |
||||
has_services = 1, |
||||
deps = [ |
||||
":common", |
||||
], |
||||
) |
||||
|
||||
api_go_grpc_library( |
||||
name = "lds", |
||||
proto = ":lds", |
||||
deps = [ |
||||
":common_go_proto", |
||||
], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "hds", |
||||
srcs = ["hds.proto"], |
||||
has_services = 1, |
||||
deps = [ |
||||
"//envoy/api/v2:base", |
||||
"//envoy/api/v2:health_check", |
||||
"//envoy/api/v2/endpoint", |
||||
], |
||||
) |
||||
|
||||
api_go_grpc_library( |
||||
name = "hds", |
||||
proto = ":hds", |
||||
deps = [ |
||||
"//envoy/api/v2:base_go_proto", |
||||
"//envoy/api/v2:health_check_go_proto", |
||||
"//envoy/api/v2/endpoint:endpoint_go_proto", |
||||
], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "rds", |
||||
srcs = ["rds.proto"], |
||||
has_services = 1, |
||||
deps = [ |
||||
":common", |
||||
], |
||||
) |
||||
|
||||
api_go_grpc_library( |
||||
name = "rds", |
||||
proto = ":rds", |
||||
deps = [ |
||||
":common_go_proto", |
||||
], |
||||
) |
||||
|
||||
api_proto_library( |
||||
name = "sds", |
||||
srcs = ["sds.proto"], |
||||
has_services = 1, |
||||
deps = [ |
||||
":common", |
||||
], |
||||
) |
||||
|
||||
api_go_grpc_library( |
||||
name = "sds", |
||||
proto = ":sds", |
||||
deps = [ |
||||
":common_go_proto", |
||||
], |
||||
) |
@ -0,0 +1,22 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.service.discovery.v2; |
||||
|
||||
import "envoy/service/discovery/v2/common.proto"; |
||||
|
||||
// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing |
||||
// services: https://github.com/google/protobuf/issues/4221 |
||||
message AdsDummy { |
||||
} |
||||
|
||||
// See https://github.com/lyft/envoy-api#apis for a description of the role of |
||||
// ADS and how it is intended to be used by a management server. ADS requests |
||||
// have the same structure as their singleton xDS counterparts, but can |
||||
// multiplex many resource types on a single stream. The type_url in the |
||||
// DiscoveryRequest/DiscoveryResponse provides sufficient information to recover |
||||
// the multiplexed singleton APIs at the Envoy instance and management server. |
||||
service AggregatedDiscoveryService { |
||||
// This is a gRPC-only API. |
||||
rpc StreamAggregatedResources(stream DiscoveryRequest) returns (stream DiscoveryResponse) { |
||||
} |
||||
} |
@ -0,0 +1,25 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.service.discovery.v2; |
||||
|
||||
import "envoy/service/discovery/v2/common.proto"; |
||||
|
||||
import "google/api/annotations.proto"; |
||||
|
||||
// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing |
||||
// services: https://github.com/google/protobuf/issues/4221 |
||||
message CdsDummy { |
||||
} |
||||
|
||||
// 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: "*" |
||||
}; |
||||
} |
||||
} |
@ -0,0 +1,63 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.service.discovery.v2; |
||||
|
||||
import "envoy/service/discovery/v2/common.proto"; |
||||
import "envoy/api/v2/endpoint/endpoint.proto"; |
||||
|
||||
import "google/api/annotations.proto"; |
||||
|
||||
import "validate/validate.proto"; |
||||
|
||||
// [#protodoc-title: EDS] |
||||
|
||||
// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing |
||||
// services: https://github.com/google/protobuf/issues/4221 |
||||
message EdsDummy { |
||||
} |
||||
|
||||
service EndpointDiscoveryService { |
||||
// The resource_names field in DiscoveryRequest specifies a list of clusters |
||||
// to subscribe to updates for. |
||||
rpc StreamEndpoints(stream DiscoveryRequest) returns (stream DiscoveryResponse) { |
||||
} |
||||
|
||||
rpc FetchEndpoints(DiscoveryRequest) returns (DiscoveryResponse) { |
||||
option (google.api.http) = { |
||||
post: "/v2/discovery:endpoints" |
||||
body: "*" |
||||
}; |
||||
} |
||||
} |
||||
|
||||
// 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. For a given cluster, the |
||||
// effective weight of a host is its load_balancing_weight multiplied by the |
||||
// load_balancing_weight of its Locality. |
||||
message ClusterLoadAssignment { |
||||
// Name of the cluster. This will be the :ref:`service_name |
||||
// <envoy_api_field_cluster.Cluster.EdsClusterConfig.service_name>` value if specified |
||||
// in the cluster :ref:`EdsClusterConfig |
||||
// <envoy_api_msg_cluster.Cluster.EdsClusterConfig>`. |
||||
string cluster_name = 1 [(validate.rules).string.min_bytes = 1]; |
||||
|
||||
// List of endpoints to load balance to. |
||||
repeated envoy.api.v2.endpoint.LocalityLbEndpoints endpoints = 2; |
||||
|
||||
// Load balancing policy settings. |
||||
message Policy { |
||||
// Percentage of traffic (0-100) that should be dropped. This |
||||
// action allows protection of upstream hosts should they unable to |
||||
// recover from an outage or should they be unable to autoscale and hence |
||||
// overall incoming traffic volume need to be trimmed to protect them. |
||||
// [#v2-api-diff: This is known as maintenance mode in v1.] |
||||
double drop_overload = 1 [(validate.rules).double = {gte: 0, lte: 100}]; |
||||
} |
||||
|
||||
// Load balancing policy settings. |
||||
Policy policy = 4; |
||||
} |
@ -0,0 +1,28 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.service.discovery.v2; |
||||
|
||||
import "envoy/service/discovery/v2/common.proto"; |
||||
|
||||
import "google/api/annotations.proto"; |
||||
|
||||
// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing |
||||
// services: https://github.com/google/protobuf/issues/4221 |
||||
message LdsDummy { |
||||
} |
||||
|
||||
// The Envoy instance initiates an RPC at startup to discover a list of |
||||
// listeners. Updates are delivered via streaming from the LDS server and |
||||
// consist of a complete update of all listeners. Existing connections will be |
||||
// allowed to drain from listeners that are no longer present. |
||||
service ListenerDiscoveryService { |
||||
rpc StreamListeners(stream DiscoveryRequest) returns (stream DiscoveryResponse) { |
||||
} |
||||
|
||||
rpc FetchListeners(DiscoveryRequest) returns (DiscoveryResponse) { |
||||
option (google.api.http) = { |
||||
post: "/v2/discovery:listeners" |
||||
body: "*" |
||||
}; |
||||
} |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue