Move E/C/R/LDS service definitions to prevent breaking existing management servers (#438)

Signed-off-by: Kuat Yessenov <kuat@google.com>
pull/419/merge
Kuat 7 years ago committed by Matt Klein
parent 6f0d5ee428
commit 8345af596d
  1. 8
      docs/build.sh
  2. 8
      docs/root/api-v2/api.rst
  3. 2
      docs/root/configuration/http_conn_man/headers.rst
  4. 2
      docs/root/configuration/listeners/listeners.rst
  5. 20
      docs/root/configuration/overview/v2_overview.rst
  6. 2
      docs/root/intro/arch_overview/dynamic_configuration.rst
  7. 2
      docs/root/intro/arch_overview/load_balancing.rst
  8. 4
      docs/root/intro/version_history.rst
  9. 4
      envoy/BUILD
  10. 119
      envoy/api/v2/BUILD
  11. 66
      envoy/api/v2/cds.proto
  12. 30
      envoy/api/v2/cluster/BUILD
  13. 1
      envoy/api/v2/cluster/circuit_breaker.proto
  14. 5
      envoy/api/v2/discovery.proto
  15. 15
      envoy/api/v2/eds.proto
  16. 2
      envoy/api/v2/filter/network/BUILD
  17. 4
      envoy/api/v2/filter/network/http_connection_manager.proto
  18. 4
      envoy/api/v2/grpc_service.proto
  19. 122
      envoy/api/v2/lds.proto
  20. 91
      envoy/api/v2/listener/listener.proto
  21. 79
      envoy/api/v2/rds.proto
  22. 61
      envoy/api/v2/route/route.proto
  23. 8
      envoy/config/bootstrap/v2/BUILD
  24. 14
      envoy/config/bootstrap/v2/bootstrap.proto
  25. 13
      envoy/service/discovery/BUILD
  26. 96
      envoy/service/discovery/v2/BUILD
  27. 11
      envoy/service/discovery/v2/ads.proto
  28. 25
      envoy/service/discovery/v2/cds.proto
  29. 5
      envoy/service/discovery/v2/hds.proto
  30. 28
      envoy/service/discovery/v2/lds.proto
  31. 29
      envoy/service/discovery/v2/rds.proto
  32. 7
      envoy/service/discovery/v2/sds.proto
  33. 16
      test/build/BUILD
  34. 16
      test/build/build_test.cc
  35. 8
      test/validate/BUILD
  36. 10
      test/validate/pgv_test.cc
  37. 2
      tools/BUILD
  38. 4
      tools/generate_listeners.py

@ -29,11 +29,14 @@ PROTO_RST="
/envoy/api/v2/address/envoy/api/v2/address.proto.rst
/envoy/api/v2/base/envoy/api/v2/base.proto.rst
/envoy/api/v2/auth/cert/envoy/api/v2/auth/cert.proto.rst
/envoy/api/v2/eds/envoy/api/v2/eds.proto.rst
/envoy/api/v2/endpoint/endpoint/envoy/api/v2/endpoint/endpoint.proto.rst
/envoy/api/v2/cluster/cluster/envoy/api/v2/cluster/cluster.proto.rst
/envoy/api/v2/cds/envoy/api/v2/cds.proto.rst
/envoy/api/v2/cluster/outlier_detection/envoy/api/v2/cluster/outlier_detection.proto.rst
/envoy/api/v2/cluster/circuit_breaker/envoy/api/v2/cluster/circuit_breaker.proto.rst
/envoy/api/v2/rds/envoy/api/v2/rds.proto.rst
/envoy/api/v2/route/route/envoy/api/v2/route/route.proto.rst
/envoy/api/v2/lds/envoy/api/v2/lds.proto.rst
/envoy/api/v2/listener/listener/envoy/api/v2/listener/listener.proto.rst
/envoy/api/v2/config_source/envoy/api/v2/config_source.proto.rst
/envoy/api/v2/grpc_service/envoy/api/v2/grpc_service.proto.rst
@ -41,8 +44,7 @@ PROTO_RST="
/envoy/api/v2/protocol/envoy/api/v2/protocol.proto.rst
/envoy/api/v2/ratelimit/ratelimit/envoy/api/v2/ratelimit/ratelimit.proto.rst
/envoy/config/bootstrap/v2/bootstrap/envoy/config/bootstrap/v2/bootstrap.proto.rst
/envoy/service/discovery/v2/common/envoy/service/discovery/v2/common.proto.rst
/envoy/service/discovery/v2/eds/envoy/service/discovery/v2/eds.proto.rst
/envoy/api/v2/discovery/envoy/api/v2/discovery.proto.rst
/envoy/config/ratelimit/v2/rls/envoy/config/ratelimit/v2/rls.proto.rst
/envoy/config/metrics/v2/metrics_service/envoy/config/metrics/v2/metrics_service.proto.rst
/envoy/config/metrics/v2/stats/envoy/config/metrics/v2/stats.proto.rst

@ -10,14 +10,16 @@ v2 API reference
config/bootstrap/v2/bootstrap.proto
api/v2/config_source.proto
api/v2/grpc_service.proto
api/v2/lds.proto
api/v2/listener/listener.proto
api/v2/cluster/cluster.proto
api/v2/cds.proto
api/v2/cluster/outlier_detection.proto
api/v2/cluster/circuit_breaker.proto
api/v2/endpoint/endpoint.proto
service/discovery/v2/eds.proto
api/v2/eds.proto
api/v2/health_check.proto
api/v2/route/route.proto
api/v2/rds.proto
api/v2/auth/cert.proto
config/metrics/v2/stats.proto
config/metrics/v2/metrics_service.proto
@ -25,7 +27,7 @@ v2 API reference
api/v2/base.proto
api/v2/address.proto
api/v2/protocol.proto
service/discovery/v2/common.proto
api/v2/discovery.proto
api/v2/ratelimit/ratelimit.proto
config/ratelimit/v2/rls.proto
api/v2/filter/filter

@ -283,7 +283,7 @@ Custom request/response headers
Custom request/response headers can be added to a request/response that matches a specific route at
the route, virtual host, and global route configuration level. See the relevant :ref:`v1
<config_http_conn_man_route_table>` and :ref:`v2 <envoy_api_msg_route.RouteConfiguration>` API
<config_http_conn_man_route_table>` and :ref:`v2 <envoy_api_msg_RouteConfiguration>` API
documentation.
Headers are appended to requests/responses in the following order: route level headers,

@ -7,7 +7,7 @@ The top level Envoy configuration contains a list of :ref:`listeners <arch_overv
Each individual listener configuration has the following format:
* :ref:`v1 API reference <config_listeners_v1>`
* :ref:`v2 API reference <envoy_api_msg_listener.Listener>`
* :ref:`v2 API reference <envoy_api_msg_Listener>`
.. toctree::
:hidden:

@ -47,8 +47,8 @@ debug experience when configuration parsing fails.
The :ref:`Bootstrap <envoy_api_msg_config.bootstrap.v2.Bootstrap>` message is the root of the
configuration. A key concept in the :ref:`Bootstrap <envoy_api_msg_config.bootstrap.v2.Bootstrap>`
message is the distinction between static and dynamic resouces. Resources such
as a :ref:`Listener <envoy_api_msg_listener.Listener>` or :ref:`Cluster
<envoy_api_msg_cluster.Cluster>` may be supplied either statically in
as a :ref:`Listener <envoy_api_msg_Listener>` or :ref:`Cluster
<envoy_api_msg_Cluster>` may be supplied either statically in
:ref:`static_resources <envoy_api_field_config.bootstrap.v2.Bootstrap.static_resources>` or have
an xDS service such as :ref:`LDS
<config_listeners_lds>` or :ref:`CDS <config_cluster_manager_cds>` configured in
@ -105,7 +105,7 @@ Mostly static with dynamic EDS
A bootstrap config that continues from the above example with :ref:`dynamic endpoint
discovery <arch_overview_dynamic_config_sds>` via an
:ref:`EDS<envoy_api_file_envoy/service/discovery/v2/eds.proto>` gRPC management server listening
:ref:`EDS<envoy_api_file_envoy/api/v2/eds.proto>` gRPC management server listening
on 127.0.0.3:5678 is provided below:
.. code-block:: yaml
@ -158,7 +158,7 @@ an otherwise completely dynamic configurations, some static resources need to
be defined to point Envoy at its xDS management server(s).
In the above example, the EDS management server could then return a proto encoding of a
:ref:`DiscoveryResponse <envoy_api_msg_service.discovery.v2.DiscoveryResponse>`:
:ref:`DiscoveryResponse <envoy_api_msg_DiscoveryResponse>`:
.. code-block:: yaml
@ -293,8 +293,8 @@ Management server
A v2 xDS management server will implement the below endpoints as required for
gRPC and/or REST serving. In both streaming gRPC and
REST-JSON cases, a :ref:`DiscoveryRequest <envoy_api_msg_service.discovery.v2.DiscoveryRequest>` is sent and a
:ref:`DiscoveryResponse <envoy_api_msg_service.discovery.v2.DiscoveryResponse>` received following the
REST-JSON cases, a :ref:`DiscoveryRequest <envoy_api_msg_DiscoveryRequest>` is sent and a
:ref:`DiscoveryResponse <envoy_api_msg_DiscoveryResponse>` received following the
`xDS protocol <https://github.com/envoyproxy/data-plane-api/blob/master/XDS_PROTOCOL.md>`_.
.. _v2_grpc_streaming_endpoints:
@ -333,8 +333,8 @@ for the service definition. This is used by Envoy as a client when
cluster_names: [some_xds_cluster]
is set in the :ref:`eds_cluster_config
<envoy_api_field_cluster.Cluster.eds_cluster_config>` field of the :ref:`Cluster
<envoy_api_msg_cluster.Cluster>` config.
<envoy_api_field_Cluster.eds_cluster_config>` field of the :ref:`Cluster
<envoy_api_msg_Cluster>` config.
.. http:post:: /envoy.api.v2.ListenerDiscoveryService/StreamListeners
@ -405,8 +405,8 @@ for the service definition. This is used by Envoy as a client when
cluster_names: [some_xds_cluster]
is set in the :ref:`eds_cluster_config
<envoy_api_field_cluster.Cluster.eds_cluster_config>` field of the :ref:`Cluster
<envoy_api_msg_cluster.Cluster>` config.
<envoy_api_field_Cluster.eds_cluster_config>` field of the :ref:`Cluster
<envoy_api_msg_Cluster>` config.
.. http:post:: /v2/discovery:listeners

@ -34,7 +34,7 @@ SDS/EDS only
The :ref:`service discovery service (SDS) API <config_cluster_manager_sds>` provides a more advanced
mechanism by which Envoy can discover members of an upstream cluster. SDS has been renamed to :ref:`Endpoint
Discovery Service (EDS)<envoy_api_file_envoy/service/discovery/v2/eds.proto>` in the
Discovery Service (EDS)<envoy_api_file_envoy/api/v2/eds.proto>` in the
:ref:`v2 API <config_overview_v2>`. Layered on top of a static
configuration, SDS allows an Envoy deployment to circumvent the limitations of DNS (maximum records
in a response, etc.) as well as consume more information used in load balancing and routing (e.g.,

@ -240,7 +240,7 @@ not be used with subsets because the upstream hosts are not known in advance. Su
with zone aware routing, but be aware that the use of subsets may easily violate the minimum hosts
condition described above.
If subsets are :ref:`configured <envoy_api_field_cluster.Cluster.lb_subset_config>` and a route
If subsets are :ref:`configured <envoy_api_field_Cluster.lb_subset_config>` and a route
specifies no metadata or no subset matching the metadata exists, the subset load balancer initiates
its fallback policy. The default policy is ``NO_ENDPOINT``, in which case the request fails as if
the cluster had no hosts. Conversely, the ``ANY_ENDPOINT`` fallback policy load balances across all

@ -20,11 +20,11 @@ Version history
* http: end-to-end HTTP flow control is now complete across both connections, streams, and filters.
* load balancer: added :ref:`subset load balancer <arch_overview_load_balancer_subsets>`.
* load balancer: added ring size and hash :ref:`configuration options
<envoy_api_msg_cluster.Cluster.RingHashLbConfig>`. This used to be configurable via runtime. The runtime
<envoy_api_msg_Cluster.RingHashLbConfig>`. This used to be configurable via runtime. The runtime
configuration was deleted without deprecation as we are fairly certain no one is using it.
* log: added the ability to optionally log to a file instead of stderr via the
:option:`--log-path` option.
* listeners: added :ref:`drain_type <envoy_api_field_listener.Listener.drain_type>` option.
* listeners: added :ref:`drain_type <envoy_api_field_Listener.drain_type>` option.
* lua: added experimental :ref:`Lua filter <config_http_filters_lua>`.
* mongo filter: added :ref:`fault injection <config_network_filters_mongo_proxy_fault_injection>`.
* mongo filter: added :ref:`"drain close" <arch_overview_draining>` support.

@ -6,7 +6,7 @@ proto_library(
name = "envoy",
deps = [
"//envoy/api/v2",
"//envoy/api/v2/cluster",
"//envoy/api/v2:cds",
"//envoy/api/v2/cluster:circuit_breaker",
"//envoy/api/v2/cluster:outlier_detection",
"//envoy/api/v2/filter/accesslog",
@ -20,7 +20,7 @@ proto_library(
"//envoy/config/metrics/v2:stats",
"//envoy/config/ratelimit/v2:rls",
"//envoy/config/trace/v2:trace",
"//envoy/service/discovery",
"//envoy/service/discovery/v2:ads",
"//envoy/service/load_stats",
"//envoy/service/metrics",
],

@ -76,10 +76,129 @@ api_go_proto_library(
proto = ":protocol",
)
api_proto_library(
name = "discovery",
srcs = ["discovery.proto"],
deps = ["//envoy/api/v2:base"],
)
api_go_proto_library(
name = "discovery",
proto = ":discovery",
deps = ["//envoy/api/v2:base_go_proto"],
)
api_proto_library(
name = "eds",
srcs = ["eds.proto"],
has_services = 1,
deps = [
":address",
":base",
":discovery",
":health_check",
"//envoy/api/v2/endpoint",
],
)
api_go_grpc_library(
name = "eds",
proto = ":eds",
deps = [
":address_go_proto",
":base_go_proto",
":discovery_go_proto",
":health_check_go_proto",
"//envoy/api/v2/endpoint:endpoint_go_proto",
],
)
api_proto_library(
name = "cds",
srcs = ["cds.proto"],
has_services = 1,
deps = [
":address",
":base",
":config_source",
":discovery",
":health_check",
":protocol",
"//envoy/api/v2/auth:cert",
"//envoy/api/v2/cluster:circuit_breaker",
"//envoy/api/v2/cluster:outlier_detection",
],
)
api_go_grpc_library(
name = "cds",
proto = ":cds",
deps = [
":base_go_proto",
":config_source_go_proto",
":discovery_go_proto",
":health_check_go_proto",
":protocol_go_proto",
"//envoy/api/v2:address_go_proto",
"//envoy/api/v2/auth:cert_go_proto",
"//envoy/api/v2/cluster:circuit_breaker_go_proto",
"//envoy/api/v2/cluster:outlier_detection_go_proto",
],
)
api_proto_library(
name = "lds",
srcs = ["lds.proto"],
has_services = 1,
deps = [
":address",
":base",
":discovery",
"//envoy/api/v2/listener",
],
)
api_go_grpc_library(
name = "lds",
proto = ":lds",
deps = [
":address_go_proto",
":base_go_proto",
":discovery_go_proto",
"//envoy/api/v2/listener:listener_go_proto",
],
)
api_proto_library(
name = "rds",
srcs = ["rds.proto"],
has_services = 1,
deps = [
":base",
":discovery",
"//envoy/api/v2/route",
],
)
api_go_grpc_library(
name = "rds",
proto = ":rds",
deps = [
":base_go_proto",
":discovery_go_proto",
"//envoy/api/v2/route:route_go_proto",
],
)
proto_library(
name = "v2",
visibility = ["//envoy:__pkg__"],
deps = [
":cds",
":discovery",
":eds",
":lds",
":protocol",
":rds",
],
)

@ -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 clusters 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 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.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.

@ -27,33 +27,3 @@ 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",
],
)

@ -1,6 +1,7 @@
syntax = "proto3";
package envoy.api.v2.cluster;
option go_package = "cluster";
import "envoy/api/v2/base.proto";

@ -1,7 +1,6 @@
syntax = "proto3";
package envoy.service.discovery.v2;
option go_package = "discovery";
package envoy.api.v2;
import "envoy/api/v2/base.proto";
@ -22,7 +21,7 @@ message DiscoveryRequest {
string version_info = 1;
// The node making the request.
envoy.api.v2.Node node = 2;
Node node = 2;
// List of resources to subscribe to, e.g. list of cluster names or a route
// configuration name. If this is empty, all resources for the API are

@ -1,8 +1,8 @@
syntax = "proto3";
package envoy.service.discovery.v2;
package envoy.api.v2;
import "envoy/service/discovery/v2/common.proto";
import "envoy/api/v2/discovery.proto";
import "envoy/api/v2/endpoint/endpoint.proto";
import "google/api/annotations.proto";
@ -11,11 +11,6 @@ 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.
@ -40,13 +35,13 @@ service EndpointDiscoveryService {
// 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
// <envoy_api_field_Cluster.EdsClusterConfig.service_name>` value if specified
// in the cluster :ref:`EdsClusterConfig
// <envoy_api_msg_cluster.Cluster.EdsClusterConfig>`.
// <envoy_api_msg_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;
repeated endpoint.LocalityLbEndpoints endpoints = 2;
// Load balancing policy settings.
message Policy {

@ -9,8 +9,8 @@ api_proto_library(
"//envoy/api/v2:base",
"//envoy/api/v2:config_source",
"//envoy/api/v2:protocol",
"//envoy/api/v2:rds",
"//envoy/api/v2/filter/accesslog",
"//envoy/api/v2/route",
],
)

@ -6,7 +6,7 @@ option go_package = "network";
import "envoy/api/v2/config_source.proto";
import "envoy/api/v2/protocol.proto";
import "envoy/api/v2/filter/accesslog/accesslog.proto";
import "envoy/api/v2/route/route.proto";
import "envoy/api/v2/rds.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
@ -51,7 +51,7 @@ message HttpConnectionManager {
Rds rds = 3;
// The route table for the connection manager is static and is specified in this property.
route.RouteConfiguration route_config = 4;
RouteConfiguration route_config = 4;
}
// A list of individual HTTP filters that make up the filter chain for

@ -16,8 +16,8 @@ import "validate/validate.proto";
message GrpcService {
message EnvoyGrpc {
// The name of the upstream gRPC cluster. SSL credentials will be supplied
// in the :ref:`Cluster <envoy_api_msg_cluster.Cluster>` :ref:`tls_context
// <envoy_api_field_cluster.Cluster.tls_context>`.
// in the :ref:`Cluster <envoy_api_msg_Cluster>` :ref:`tls_context
// <envoy_api_field_Cluster.tls_context>`.
string cluster_name = 1 [(validate.rules).string.min_bytes = 1];
}

@ -0,0 +1,122 @@
syntax = "proto3";
package envoy.api.v2;
import "envoy/api/v2/address.proto";
import "envoy/api/v2/base.proto";
import "envoy/api/v2/discovery.proto";
import "envoy/api/v2/listener/listener.proto";
import "google/api/annotations.proto";
import "google/protobuf/wrappers.proto";
import "validate/validate.proto";
// [#protodoc-title: LDS]
// 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: "*"
};
}
}
message Listener {
// The unique name by which this listener is known. If no name is provided,
// Envoy will allocate an internal UUID for the listener. If the listener is to be dynamically
// updated or removed via :ref:`LDS <config_listeners_lds>` a unique name must be provided.
// By default, the maximum length of a listener's name is limited to 60 characters. This limit can
// be increased by setting the :option:`--max-obj-name-len` command line argument to the desired
// value.
string name = 1;
// The address that the listener should listen on. In general, the address must be unique, though
// that is governed by the bind rules of the OS. E.g., multiple listeners can listen on port 0 on
// Linux as the actual port will be allocated by the OS.
Address address = 2 [(validate.rules).message.required = true];
// A list of filter chains to consider for this listener. The
// :ref:`FilterChain <envoy_api_msg_listener.FilterChain>` with the most specific
// :ref:`FilterChainMatch <envoy_api_msg_listener.FilterChainMatch>` criteria is used on a
// connection.
//
// .. attention::
//
// In the current version, multiple filter chains are supported **only** so that SNI can be
// configured. See the :ref:`FAQ entry <faq_how_to_setup_sni>` on how to configure SNI for more
// information. When multiple filter chains are configured, each filter chain must have an
// **identical** set of :ref:`filters <envoy_api_field_listener.FilterChain.filters>`. If the
// filters differ, the configuration will fail to load. In the future, this limitation will be
// relaxed such that different filters can be used depending on which filter chain matches
// (based on SNI or some other parameter).
repeated listener.FilterChain filter_chains = 3 [(validate.rules).repeated .min_items = 1];
// If a connection is redirected using *iptables*, the port on which the proxy
// receives it might be different from the original destination address. When this flag is set to
// true, the listener hands off redirected connections to the listener associated with the
// original destination address. If there is no listener associated with the original destination
// address, the connection is handled by the listener that receives it. Defaults to false.
//
// .. attention::
//
// This field is deprecated. Use :ref:`an original_dst <config_listener_filters_original_dst>`
// :ref:`listener filter <envoy_api_field_Listener.listener_filters>` instead.
//
// Note that hand off to another listener is *NOT* performed without this flag. Once
// :ref:`FilterChainMatch <envoy_api_msg_listener.FilterChainMatch>` is implemented this flag
// will be removed, as filter chain matching can be used to select a filter chain based on the
// restored destination address.
google.protobuf.BoolValue use_original_dst = 4 [deprecated = true];
// Soft limit on size of the listeners new connection read and write buffers.
// If unspecified, an implementation defined default is applied (1MiB).
google.protobuf.UInt32Value per_connection_buffer_limit_bytes = 5;
// Listener metadata.
Metadata metadata = 6;
// [#not-implemented-hide:]
message DeprecatedV1 {
// Whether the listener should bind to the port. A listener that doesnt
// bind can only receive connections redirected from other listeners that
// set use_original_dst parameter to true. Default is true.
//
// [V2-API-DIFF] This is deprecated in v2, all Listeners will bind to their
// port. An additional filter chain must be created for every original
// destination port this listener may redirect to in v2, with the original
// port specified in the FilterChainMatch destination_port field.
google.protobuf.BoolValue bind_to_port = 1;
}
// [#not-implemented-hide:]
DeprecatedV1 deprecated_v1 = 7;
enum DrainType {
// Drain in response to calling /healthcheck/fail admin endpoint (along with the health check
// filter), listener removal/modification, and hot restart.
DEFAULT = 0;
// Drain in response to listener removal/modification and hot restart. This setting does not
// include /healthcheck/fail. This setting may be desirable if Envoy is hosting both ingress
// and egress listeners.
MODIFY_ONLY = 1;
}
// The type of draining to perform at a listener-wide level.
DrainType drain_type = 8;
// Listener filters have the opportunity to manipulate and augment the connection metadata that
// is used in connection filter chain matching, for example. These filters are run before any in
// :ref:`filter_chains <envoy_api_field_Listener.filter_chains>`. Order matters as the
// filters are processed sequentially right after a socket has been accepted by the listener, and
// before a connection is created.
repeated listener.ListenerFilter listener_filters = 9;
}

@ -15,97 +15,6 @@ import "validate/validate.proto";
// [#protodoc-title: Listeners]
// Listener :ref:`configuration overview <config_listeners>`
message Listener {
// The unique name by which this listener is known. If no name is provided,
// Envoy will allocate an internal UUID for the listener. If the listener is to be dynamically
// updated or removed via :ref:`LDS <config_listeners_lds>` a unique name must be provided.
// By default, the maximum length of a listener's name is limited to 60 characters. This limit can
// be increased by setting the :option:`--max-obj-name-len` command line argument to the desired
// value.
string name = 1;
// The address that the listener should listen on. In general, the address must be unique, though
// that is governed by the bind rules of the OS. E.g., multiple listeners can listen on port 0 on
// Linux as the actual port will be allocated by the OS.
Address address = 2 [(validate.rules).message.required = true];
// A list of filter chains to consider for this listener. The
// :ref:`FilterChain <envoy_api_msg_listener.FilterChain>` with the most specific
// :ref:`FilterChainMatch <envoy_api_msg_listener.FilterChainMatch>` criteria is used on a
// connection.
//
// .. attention::
//
// In the current version, multiple filter chains are supported **only** so that SNI can be
// configured. See the :ref:`FAQ entry <faq_how_to_setup_sni>` on how to configure SNI for more
// information. When multiple filter chains are configured, each filter chain must have an
// **identical** set of :ref:`filters <envoy_api_field_listener.FilterChain.filters>`. If the
// filters differ, the configuration will fail to load. In the future, this limitation will be
// relaxed such that different filters can be used depending on which filter chain matches
// (based on SNI or some other parameter).
repeated FilterChain filter_chains = 3 [(validate.rules).repeated .min_items = 1];
// If a connection is redirected using *iptables*, the port on which the proxy
// receives it might be different from the original destination address. When this flag is set to
// true, the listener hands off redirected connections to the listener associated with the
// original destination address. If there is no listener associated with the original destination
// address, the connection is handled by the listener that receives it. Defaults to false.
//
// .. attention::
//
// This field is deprecated. Use :ref:`an original_dst <config_listener_filters_original_dst>`
// :ref:`listener filter <envoy_api_field_listener.Listener.listener_filters>` instead.
//
// Note that hand off to another listener is *NOT* performed without this flag. Once
// :ref:`FilterChainMatch <envoy_api_msg_listener.FilterChainMatch>` is implemented this flag
// will be removed, as filter chain matching can be used to select a filter chain based on the
// restored destination address.
google.protobuf.BoolValue use_original_dst = 4 [deprecated = true];
// Soft limit on size of the listeners new connection read and write buffers.
// If unspecified, an implementation defined default is applied (1MiB).
google.protobuf.UInt32Value per_connection_buffer_limit_bytes = 5;
// Listener metadata.
Metadata metadata = 6;
// [#not-implemented-hide:]
message DeprecatedV1 {
// Whether the listener should bind to the port. A listener that doesnt
// bind can only receive connections redirected from other listeners that
// set use_original_dst parameter to true. Default is true.
//
// [V2-API-DIFF] This is deprecated in v2, all Listeners will bind to their
// port. An additional filter chain must be created for every original
// destination port this listener may redirect to in v2, with the original
// port specified in the FilterChainMatch destination_port field.
google.protobuf.BoolValue bind_to_port = 1;
}
// [#not-implemented-hide:]
DeprecatedV1 deprecated_v1 = 7;
enum DrainType {
// Drain in response to calling /healthcheck/fail admin endpoint (along with the health check
// filter), listener removal/modification, and hot restart.
DEFAULT = 0;
// Drain in response to listener removal/modification and hot restart. This setting does not
// include /healthcheck/fail. This setting may be desirable if Envoy is hosting both ingress
// and egress listeners.
MODIFY_ONLY = 1;
}
// The type of draining to perform at a listener-wide level.
DrainType drain_type = 8;
// Listener filters have the opportunity to manipulate and augment the connection metadata that
// is used in connection filter chain matching, for example. These filters are run before any in
// :ref:`filter_chains <envoy_api_field_listener.Listener.filter_chains>`. Order matters as the
// filters are processed sequentially right after a socket has been accepted by the listener, and
// before a connection is created.
repeated ListenerFilter listener_filters = 9;
}
message Filter {
// The name of the filter to instantiate. The name must match a supported
// filter. The built-in filters are:

@ -0,0 +1,79 @@
syntax = "proto3";
package envoy.api.v2;
import "envoy/api/v2/base.proto";
import "envoy/api/v2/discovery.proto";
import "envoy/api/v2/route/route.proto";
import "google/api/annotations.proto";
import "google/protobuf/wrappers.proto";
// [#protodoc-title: RDS]
// The resource_names field in DiscoveryRequest specifies a route configuration.
// This allows an Envoy configuration with multiple HTTP listeners (and
// associated HTTP connection manager filters) to use different route
// configurations. Each listener will bind its HTTP connection manager filter to
// a route table via this identifier.
service RouteDiscoveryService {
rpc StreamRoutes(stream DiscoveryRequest) returns (stream DiscoveryResponse) {
}
rpc FetchRoutes(DiscoveryRequest) returns (DiscoveryResponse) {
option (google.api.http) = {
post: "/v2/discovery:routes"
body: "*"
};
}
}
message RouteConfiguration {
// The name of the route configuration. For example, it might match
// :ref:`route_config_name <envoy_api_field_filter.network.Rds.route_config_name>` in
// :ref:`envoy_api_msg_filter.network.Rds`.
string name = 1;
// An array of virtual hosts that make up the route table.
repeated route.VirtualHost virtual_hosts = 2;
// 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 HeaderValueOption response_headers_to_add = 4;
// 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 HeaderValueOption request_headers_to_add = 6;
// 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_filter.network.HttpConnectionManager.route_config>` option. This setting
// default to false if the route table is loaded dynamically via the :ref:`rds
// <envoy_api_field_filter.network.HttpConnectionManager.rds>` option. Users
// may which to override the default behavior in certain cases (for example
// when using CDS with a static route table).
google.protobuf.BoolValue validate_clusters = 7;
}

@ -16,55 +16,6 @@ import "gogoproto/gogo.proto";
// * Routing :ref:`architecture overview <arch_overview_http_routing>`
// * HTTP :ref:`router filter <config_http_filters_router>`
message RouteConfiguration {
// The name of the route configuration. For example, it might match
// :ref:`route_config_name <envoy_api_field_filter.network.Rds.route_config_name>` in
// :ref:`envoy_api_msg_filter.network.Rds`.
string name = 1;
// An array of virtual hosts that make up the route table.
repeated VirtualHost virtual_hosts = 2;
// 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 HeaderValueOption response_headers_to_add = 4;
// 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 HeaderValueOption request_headers_to_add = 6;
// 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_filter.network.HttpConnectionManager.route_config>` option. This setting
// default to false if the route table is loaded dynamically via the :ref:`rds
// <envoy_api_field_filter.network.HttpConnectionManager.rds>` option. Users
// may which to override the default behavior in certain cases (for example
// when using CDS with a static route table).
google.protobuf.BoolValue validate_clusters = 7;
}
// The top level element in the routing configuration is a virtual host. Each virtual host has
// a logical name as well as a set of domains that get routed to it based on the incoming request's
@ -122,7 +73,7 @@ message VirtualHost {
// Specifies a list of HTTP headers that should be added to each request
// handled by this virtual host. Headers specified at this level are applied
// after headers from enclosed :ref:`envoy_api_msg_route.RouteAction` and before headers from the
// enclosing :ref:`envoy_api_msg_route.RouteConfiguration`. For more information, including
// enclosing :ref:`envoy_api_msg_RouteConfiguration`. 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 HeaderValueOption request_headers_to_add = 7;
@ -130,7 +81,7 @@ message VirtualHost {
// Specifies a list of HTTP headers that should be added to each response
// handled by this virtual host. Headers specified at this level are applied
// after headers from enclosed :ref:`envoy_api_msg_route.RouteAction` and before headers from the
// enclosing :ref:`envoy_api_msg_route.RouteConfiguration`. For more information, including
// enclosing :ref:`envoy_api_msg_RouteConfiguration`. 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 HeaderValueOption response_headers_to_add = 10;
@ -442,7 +393,7 @@ message RouteAction {
// Specifies a set of headers that will be added to requests matching this
// route. Headers specified at this level are applied before headers from the
// enclosing :ref:`envoy_api_msg_route.VirtualHost` and
// :ref:`envoy_api_msg_route.RouteConfiguration`. For more information, including details on
// :ref:`envoy_api_msg_RouteConfiguration`. 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 HeaderValueOption request_headers_to_add = 12;
@ -450,7 +401,7 @@ message RouteAction {
// Specifies a set of headers that will be added to responses to requests
// matching this route. Headers specified at this level are applied before
// headers from the enclosing :ref:`envoy_api_msg_route.VirtualHost` and
// :ref:`envoy_api_msg_route.RouteConfiguration`. For more information, including
// :ref:`envoy_api_msg_RouteConfiguration`. 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 HeaderValueOption response_headers_to_add = 18;
@ -598,7 +549,7 @@ message DirectResponseAction {
// .. note::
//
// Headers can be specified using *response_headers_to_add* in
// :ref:`envoy_api_msg_route.RouteConfiguration`.
// :ref:`envoy_api_msg_RouteConfiguration`.
DataSource body = 2;
}
@ -687,7 +638,7 @@ message RateLimit {
// ("destination_cluster", "<routed target cluster>")
//
// Once a request matches against a route table rule, a routed cluster is determined by one of
// the following :ref:`route table configuration <envoy_api_msg_route.RouteConfiguration>`
// the following :ref:`route table configuration <envoy_api_msg_RouteConfiguration>`
// settings:
//
// * :ref:`cluster <envoy_api_field_route.RouteAction.cluster>` indicates the upstream cluster

@ -8,10 +8,10 @@ api_proto_library(
deps = [
"//envoy/api/v2:address",
"//envoy/api/v2:base",
"//envoy/api/v2:cds",
"//envoy/api/v2:config_source",
"//envoy/api/v2:lds",
"//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",
@ -25,10 +25,10 @@ api_go_proto_library(
deps = [
"//envoy/api/v2:address_go_proto",
"//envoy/api/v2:base_go_proto",
"//envoy/api/v2:cds_go_grpc",
"//envoy/api/v2:config_source_go_proto",
"//envoy/api/v2:lds_go_grpc",
"//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",

@ -12,8 +12,8 @@ import "envoy/api/v2/address.proto";
import "envoy/api/v2/base.proto";
import "envoy/api/v2/auth/cert.proto";
import "envoy/api/v2/config_source.proto";
import "envoy/api/v2/cluster/cluster.proto";
import "envoy/api/v2/listener/listener.proto";
import "envoy/api/v2/cds.proto";
import "envoy/api/v2/lds.proto";
import "envoy/config/trace/v2/trace.proto";
import "envoy/config/metrics/v2/stats.proto";
import "envoy/config/ratelimit/v2/rls.proto";
@ -30,9 +30,9 @@ message Bootstrap {
envoy.api.v2.Node node = 1;
message StaticResources {
// Static :ref:`Listeners <envoy_api_msg_listener.Listener>`. These listeners are
// Static :ref:`Listeners <envoy_api_msg_Listener>`. These listeners are
// available regardless of LDS configuration.
repeated envoy.api.v2.listener.Listener listeners = 1;
repeated envoy.api.v2.Listener listeners = 1;
// If a network based configuration source is specified for :ref:`cds_config
// <envoy_api_field_config.bootstrap.v2.Bootstrap.DynamicResources.cds_config>`, it's necessary
@ -40,7 +40,7 @@ message Bootstrap {
// how to speak to the management server. These cluster definitions may not
// use :ref:`EDS <arch_overview_dynamic_config_sds>` (i.e. they should be static
// IP or DNS-based).
repeated envoy.api.v2.cluster.Cluster clusters = 2;
repeated envoy.api.v2.Cluster clusters = 2;
// [#not-implemented-hide:]
repeated envoy.api.v2.auth.Secret secrets = 3;
@ -49,11 +49,11 @@ message Bootstrap {
StaticResources static_resources = 2;
message DynamicResources {
// All :ref:`Listeners <envoy_api_msg_listener.Listener>` are provided by a single
// All :ref:`Listeners <envoy_api_msg_Listener>` are provided by a single
// :ref:`LDS <arch_overview_dynamic_config_lds>` configuration source.
envoy.api.v2.ConfigSource lds_config = 1;
// All post-bootstrap :ref:`Cluster <envoy_api_msg_cluster.Cluster>` definitions are
// All post-bootstrap :ref:`Cluster <envoy_api_msg_Cluster>` definitions are
// provided by a single :ref:`CDS <arch_overview_dynamic_config_cds>`
// configuration source.
envoy.api.v2.ConfigSource cds_config = 2;

@ -1,13 +0,0 @@
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",
],
)

@ -2,24 +2,12 @@ load("//bazel:api_build_system.bzl", "api_proto_library", "api_go_proto_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",
"//envoy/api/v2:discovery",
],
)
@ -27,66 +15,7 @@ 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",
"//envoy/api/v2:discovery_go_proto",
],
)
@ -111,29 +40,12 @@ api_go_grpc_library(
],
)
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",
"//envoy/api/v2:discovery",
],
)
@ -141,6 +53,6 @@ api_go_grpc_library(
name = "sds",
proto = ":sds",
deps = [
":common_go_proto",
"//envoy/api/v2:discovery_go_proto",
],
)

@ -1,14 +1,20 @@
syntax = "proto3";
package envoy.service.discovery.v2;
option go_package = "discovery";
import "envoy/service/discovery/v2/common.proto";
import "envoy/api/v2/discovery.proto";
// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing
// services: https://github.com/google/protobuf/issues/4221
message AdsDummy {
}
// [#not-implemented-hide:] Discovery services for endpoints, clusters, routes,
// and listeners are retained in the package `envoy.api.v2` for backwards
// compatibility with existing management servers. New development in discovery
// services should proceed in the package `envoy.service.discovery.v2`.
// 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
@ -17,6 +23,7 @@ message AdsDummy {
// 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) {
rpc StreamAggregatedResources(stream envoy.api.v2.DiscoveryRequest)
returns (stream envoy.api.v2.DiscoveryResponse) {
}
}

@ -1,25 +0,0 @@
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: "*"
};
}
}

@ -9,11 +9,6 @@ import "envoy/api/v2/endpoint/endpoint.proto";
import "google/api/annotations.proto";
import "google/protobuf/duration.proto";
// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing
// services: https://github.com/google/protobuf/issues/4221
message HdsDummy {
}
// [#proto-status: experimental]
// HDS is Health Discovery Service. It compliments Envoys health checking
// service by designating this Envoy to be a healthchecker for a subset of hosts

@ -1,28 +0,0 @@
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: "*"
};
}
}

@ -1,29 +0,0 @@
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 RdsDummy {
}
// The resource_names field in DiscoveryRequest specifies a route configuration.
// This allows an Envoy configuration with multiple HTTP listeners (and
// associated HTTP connection manager filters) to use different route
// configurations. Each listener will bind its HTTP connection manager filter to
// a route table via this identifier.
service RouteDiscoveryService {
rpc StreamRoutes(stream DiscoveryRequest) returns (stream DiscoveryResponse) {
}
rpc FetchRoutes(DiscoveryRequest) returns (DiscoveryResponse) {
option (google.api.http) = {
post: "/v2/discovery:routes"
body: "*"
};
}
}

@ -2,7 +2,7 @@ syntax = "proto3";
package envoy.service.discovery.v2;
import "envoy/service/discovery/v2/common.proto";
import "envoy/api/v2/discovery.proto";
import "google/api/annotations.proto";
@ -12,10 +12,11 @@ message SdsDummy {
}
service SecretDiscoveryService {
rpc StreamSecrets(stream DiscoveryRequest) returns (stream DiscoveryResponse) {
rpc StreamSecrets(stream envoy.api.v2.DiscoveryRequest)
returns (stream envoy.api.v2.DiscoveryResponse) {
}
rpc FetchSecrets(DiscoveryRequest) returns (DiscoveryResponse) {
rpc FetchSecrets(envoy.api.v2.DiscoveryRequest) returns (envoy.api.v2.DiscoveryResponse) {
option (google.api.http) = {
post: "/v2/discovery:secrets"
body: "*"

@ -6,13 +6,13 @@ api_cc_test(
name = "build_test",
srcs = ["build_test.cc"],
proto_deps = [
"//envoy/api/v2:cds",
"//envoy/api/v2:eds",
"//envoy/api/v2:lds",
"//envoy/api/v2:rds",
"//envoy/service/accesslog/v2:als",
"//envoy/service/discovery/v2:ads",
"//envoy/service/discovery/v2:cds",
"//envoy/service/discovery/v2:eds",
"//envoy/service/discovery/v2:hds",
"//envoy/service/discovery/v2:lds",
"//envoy/service/discovery/v2:rds",
"//envoy/service/metrics/v2:metrics_service",
"//envoy/service/ratelimit/v2:rls",
],
@ -24,14 +24,14 @@ api_go_test(
srcs = ["go_build_test.go"],
importpath = "go_build_test",
deps = [
"//envoy/api/v2:cds_go_grpc",
"//envoy/api/v2:eds_go_grpc",
"//envoy/api/v2:lds_go_grpc",
"//envoy/api/v2:rds_go_grpc",
"//envoy/api/v2/auth:cert_go_proto",
"//envoy/config/bootstrap/v2:bootstrap_go_proto",
"//envoy/service/discovery/v2:ads_go_grpc",
"//envoy/service/discovery/v2:cds_go_grpc",
"//envoy/service/discovery/v2:eds_go_grpc",
"//envoy/service/discovery/v2:hds_go_grpc",
"//envoy/service/discovery/v2:lds_go_grpc",
"//envoy/service/discovery/v2:rds_go_grpc",
"//envoy/service/discovery/v2:sds_go_grpc",
"//envoy/service/ratelimit/v2:rls_go_grpc",
],

@ -6,17 +6,17 @@
// Basic C++ build/link validation for the v2 xDS APIs.
int main(int argc, char* argv[]) {
const auto methods = {
"envoy.api.v2.ClusterDiscoveryService.FetchClusters",
"envoy.api.v2.ClusterDiscoveryService.StreamClusters",
"envoy.api.v2.EndpointDiscoveryService.FetchEndpoints",
"envoy.api.v2.EndpointDiscoveryService.StreamEndpoints",
"envoy.api.v2.ListenerDiscoveryService.FetchListeners",
"envoy.api.v2.ListenerDiscoveryService.StreamListeners",
"envoy.api.v2.RouteDiscoveryService.FetchRoutes",
"envoy.api.v2.RouteDiscoveryService.StreamRoutes",
"envoy.service.discovery.v2.AggregatedDiscoveryService.StreamAggregatedResources",
"envoy.service.discovery.v2.ClusterDiscoveryService.FetchClusters",
"envoy.service.discovery.v2.ClusterDiscoveryService.StreamClusters",
"envoy.service.discovery.v2.EndpointDiscoveryService.FetchEndpoints",
"envoy.service.discovery.v2.EndpointDiscoveryService.StreamEndpoints",
"envoy.service.discovery.v2.HealthDiscoveryService.FetchHealthCheck",
"envoy.service.discovery.v2.HealthDiscoveryService.StreamHealthCheck",
"envoy.service.discovery.v2.ListenerDiscoveryService.FetchListeners",
"envoy.service.discovery.v2.ListenerDiscoveryService.StreamListeners",
"envoy.service.discovery.v2.RouteDiscoveryService.FetchRoutes",
"envoy.service.discovery.v2.RouteDiscoveryService.StreamRoutes",
"envoy.service.accesslog.v2.AccessLogService.StreamAccessLogs",
"envoy.service.metrics.v2.MetricsService.StreamMetrics",
"envoy.service.ratelimit.v2.RateLimitService.ShouldRateLimit",

@ -6,7 +6,11 @@ api_cc_test(
name = "pgv_test",
srcs = ["pgv_test.cc"],
proto_deps = [
"//envoy/api/v2:cds",
"//envoy/api/v2:eds",
"//envoy/api/v2:lds",
"//envoy/api/v2:protocol",
"//envoy/api/v2:rds",
"//envoy/api/v2/filter/accesslog",
"//envoy/api/v2/filter/http:buffer",
"//envoy/api/v2/filter/http:fault",
@ -21,9 +25,5 @@ api_cc_test(
"//envoy/api/v2/filter/network:redis_proxy",
"//envoy/api/v2/filter/network:tcp_proxy",
"//envoy/config/bootstrap/v2:bootstrap",
"//envoy/service/discovery/v2:cds",
"//envoy/service/discovery/v2:eds",
"//envoy/service/discovery/v2:lds",
"//envoy/service/discovery/v2:rds",
],
)

@ -4,7 +4,7 @@
// 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/protocol.pb.validate.h"
#include "envoy/api/v2/cluster/cluster.pb.validate.h"
#include "envoy/api/v2/cds.pb.validate.h"
#include "envoy/api/v2/filter/accesslog/accesslog.pb.validate.h"
#include "envoy/api/v2/filter/http/buffer.pb.validate.h"
#include "envoy/api/v2/filter/http/fault.pb.validate.h"
@ -21,10 +21,10 @@
#include "envoy/api/v2/listener/listener.pb.validate.h"
#include "envoy/api/v2/route/route.pb.validate.h"
#include "envoy/config/bootstrap/v2/bootstrap.pb.validate.h"
#include "envoy/service/discovery/v2/cds.pb.validate.h"
#include "envoy/service/discovery/v2/eds.pb.validate.h"
#include "envoy/service/discovery/v2/lds.pb.validate.h"
#include "envoy/service/discovery/v2/rds.pb.validate.h"
#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 "google/protobuf/text_format.h"

@ -6,8 +6,8 @@ py_binary(
licenses = ["notice"], # Apache 2
visibility = ["//visibility:public"],
deps = [
"//envoy/api/v2:lds_py",
"//envoy/api/v2/filter/network:http_connection_manager_py",
"//envoy/api/v2/listener:listener_py",
],
)

@ -16,7 +16,7 @@ from google.protobuf import json_format
from google.protobuf import struct_pb2
from google.protobuf import text_format
from envoy.api.v2.listener import listener_pb2
from envoy.api.v2 import lds_pb2
from envoy.api.v2.filter.network import http_connection_manager_pb2
@ -43,7 +43,7 @@ def ParseProto(path, filter_name):
def GenerateListeners(listeners_pb_path, output_pb_path, output_json_path,
fragments):
listener = listener_pb2.Listener()
listener = lds_pb2.Listener()
with open(listeners_pb_path, 'r') as f:
text_format.Merge(f.read(), listener)

Loading…
Cancel
Save