From 7a112103756c4b863bb8e74d1424d8bb482273b7 Mon Sep 17 00:00:00 2001 From: Yanjun Xiang Date: Wed, 21 Apr 2021 23:05:10 +0000 Subject: [PATCH 01/11] Allow http route and cluster metadata to contain typed metadata in Any in addition to Struct format #13986. Also adding GTEST code for the new field. Signed-off-by: Yanjun Xiang --- api/envoy/config/core/v3/base.proto | 2 + api/envoy/config/core/v4alpha/base.proto | 2 + generated_api_shadow/BUILD | 2 + .../envoy/config/core/v3/base.proto | 2 + .../envoy/config/core/v4alpha/base.proto | 2 + include/envoy/config/typed_metadata.h | 10 ++++ source/common/config/metadata.h | 13 +++-- test/common/config/metadata_test.cc | 51 +++++++++++++++++++ 8 files changed, 81 insertions(+), 3 deletions(-) diff --git a/api/envoy/config/core/v3/base.proto b/api/envoy/config/core/v3/base.proto index c1f2a913aa5bd..b2271d743fb04 100644 --- a/api/envoy/config/core/v3/base.proto +++ b/api/envoy/config/core/v3/base.proto @@ -226,6 +226,8 @@ message Metadata { // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. map filter_metadata = 1; + + map typed_filter_metadata = 2; } // Runtime derived uint32 with a default when not specified. diff --git a/api/envoy/config/core/v4alpha/base.proto b/api/envoy/config/core/v4alpha/base.proto index c7037a0d3bf13..a1ea9ee43f257 100644 --- a/api/envoy/config/core/v4alpha/base.proto +++ b/api/envoy/config/core/v4alpha/base.proto @@ -218,6 +218,8 @@ message Metadata { // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. map filter_metadata = 1; + + map typed_filter_metadata = 2; } // Runtime derived uint32 with a default when not specified. diff --git a/generated_api_shadow/BUILD b/generated_api_shadow/BUILD index 300420c002385..daee0fd944263 100644 --- a/generated_api_shadow/BUILD +++ b/generated_api_shadow/BUILD @@ -165,6 +165,8 @@ proto_library( "//envoy/extensions/common/matching/v3:pkg", "//envoy/extensions/common/ratelimit/v3:pkg", "//envoy/extensions/common/tap/v3:pkg", + "//envoy/extensions/compression/brotli/compressor/v3:pkg", + "//envoy/extensions/compression/brotli/decompressor/v3:pkg", "//envoy/extensions/compression/gzip/compressor/v3:pkg", "//envoy/extensions/compression/gzip/decompressor/v3:pkg", "//envoy/extensions/filters/common/dependency/v3:pkg", diff --git a/generated_api_shadow/envoy/config/core/v3/base.proto b/generated_api_shadow/envoy/config/core/v3/base.proto index c4c0b8e3a5c0b..7ee8a922bec2f 100644 --- a/generated_api_shadow/envoy/config/core/v3/base.proto +++ b/generated_api_shadow/envoy/config/core/v3/base.proto @@ -224,6 +224,8 @@ message Metadata { // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. map filter_metadata = 1; + + map typed_filter_metadata = 2; } // Runtime derived uint32 with a default when not specified. diff --git a/generated_api_shadow/envoy/config/core/v4alpha/base.proto b/generated_api_shadow/envoy/config/core/v4alpha/base.proto index a3e2c37831863..60a3912d3d8ef 100644 --- a/generated_api_shadow/envoy/config/core/v4alpha/base.proto +++ b/generated_api_shadow/envoy/config/core/v4alpha/base.proto @@ -225,6 +225,8 @@ message Metadata { // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. map filter_metadata = 1; + + map typed_filter_metadata = 2; } // Runtime derived uint32 with a default when not specified. diff --git a/include/envoy/config/typed_metadata.h b/include/envoy/config/typed_metadata.h index a05ca8235d645..285b10a11a127 100644 --- a/include/envoy/config/typed_metadata.h +++ b/include/envoy/config/typed_metadata.h @@ -65,6 +65,16 @@ class TypedMetadataFactory : public UntypedFactory { virtual std::unique_ptr parse(const ProtobufWkt::Struct& data) const PURE; + // Subclass has to override and implement this function so that Envoy will be + // able to parse and use `typed_filter_metadata` field. Otherwise, + // `typed_filter_metadata` will be ignored. + // This is not pure virtual because we do not want to break any existing + // subclasses, who have not yet had a override on this function. + virtual std::unique_ptr parse(const ProtobufWkt::Any& data) const { + (void)data; // avoid the unused parameter error + return nullptr; + } + std::string category() const override { return "envoy.typed_metadata"; } }; diff --git a/source/common/config/metadata.h b/source/common/config/metadata.h index efac4eff7e59d..8b6a523953823 100644 --- a/source/common/config/metadata.h +++ b/source/common/config/metadata.h @@ -116,11 +116,18 @@ template class TypedMetadataImpl : public TypedMetadata */ void populateFrom(const envoy::config::core::v3::Metadata& metadata) { auto& data_by_key = metadata.filter_metadata(); + auto& typed_data_by_key = metadata.typed_filter_metadata(); for (const auto& [factory_name, factory] : Registry::FactoryRegistry::factories()) { - const auto& meta_iter = data_by_key.find(factory_name); - if (meta_iter != data_by_key.end()) { - data_[factory->name()] = factory->parse(meta_iter->second); + const auto& typed_meta_iter = typed_data_by_key.find(factory_name); + // Struct is deprecated in favor of Any. + if (typed_meta_iter != typed_data_by_key.end()) { + data_[factory->name()] = factory->parse(typed_meta_iter->second); + } else { + const auto& meta_iter = data_by_key.find(factory_name); + if (meta_iter != data_by_key.end()) { + data_[factory->name()] = factory->parse(meta_iter->second); + } } } } diff --git a/test/common/config/metadata_test.cc b/test/common/config/metadata_test.cc index 9cfae351d9cda..17b93e7263e8d 100644 --- a/test/common/config/metadata_test.cc +++ b/test/common/config/metadata_test.cc @@ -49,6 +49,57 @@ TEST(MetadataTest, MetadataValuePath) { ProtobufWkt::Value::KindCase::KIND_NOT_SET); } +// Test case for typed metadata: original Any data in metadata field +TEST(MetadataTest, OriginalTypedMetadataValue) { + // create an any data and set its type_url and value + ProtobufWkt::Any any; + any.set_type_url("type.googleapis.com/foo"); + any.set_value("bar"); + + // Put the data into metadata typed_filter_metadata field with the key : baz. + envoy::config::core::v3::Metadata metadata; + (*(metadata.mutable_typed_filter_metadata()))["baz"] = any; + + // Verify the data is setup correctly in the metadata + EXPECT_EQ(metadata.typed_filter_metadata().find("test"), metadata.typed_filter_metadata().end()); + EXPECT_NE(metadata.typed_filter_metadata().find("baz"), metadata.typed_filter_metadata().end()); + EXPECT_EQ((*(metadata.mutable_typed_filter_metadata()))["baz"].type_url(), + "type.googleapis.com/foo"); + EXPECT_EQ((*(metadata.mutable_typed_filter_metadata()))["baz"].value(), "bar"); +} + +// Test case for typed metadata: Pack the Any data in metadata field +TEST(MetadataTest, PackedTypedMetadataValue) { + // create an any_source data and set its type_url and value + ProtobufWkt::Any any_source; + any_source.set_type_url("type.googleapis.com/foo"); + any_source.set_value("bar"); + + // Pack this any_source data into metadata typed_filter_metadata + // field with the key : baz. + envoy::config::core::v3::Metadata metadata; + (*(metadata.mutable_typed_filter_metadata()))["baz"].PackFrom(any_source); + + // Verify the data is setup correctly in the metadata + EXPECT_EQ(metadata.typed_filter_metadata().find("test"), metadata.typed_filter_metadata().end()); + EXPECT_NE(metadata.typed_filter_metadata().find("baz"), metadata.typed_filter_metadata().end()); + EXPECT_EQ((*(metadata.mutable_typed_filter_metadata()))["baz"].ShortDebugString(), + "[type.googleapis.com/google.protobuf.Any] { type_url: \"type.googleapis.com/foo\" " + "value: \"bar\" }"); + EXPECT_EQ((*(metadata.mutable_typed_filter_metadata()))["baz"].type_url(), + "type.googleapis.com/google.protobuf.Any"); + EXPECT_EQ((*(metadata.mutable_typed_filter_metadata()))["baz"].value(), + "\n\x17type.googleapis.com/foo\x12\x3" + "bar"); + + // Unpack the metadata type_filter_metadata field into any_destination + // and verity the type_url and value are expected. + ProtobufWkt::Any any_destination; + (*(metadata.mutable_typed_filter_metadata()))["baz"].UnpackTo(&any_destination); + EXPECT_EQ(any_destination.type_url(), "type.googleapis.com/foo"); + EXPECT_EQ(any_destination.value(), "bar"); +} + class TypedMetadataTest : public testing::Test { public: TypedMetadataTest() : registered_factory_(foo_factory_) {} From c997e15fdde5ea02eb932665a2c54f9da0ddc7e6 Mon Sep 17 00:00:00 2001 From: Yanjun Xiang Date: Fri, 30 Apr 2021 19:03:53 +0000 Subject: [PATCH 02/11] Update PR based on comments Signed-off-by: Yanjun Xiang --- api/envoy/config/cluster/v4alpha/BUILD | 2 +- .../config/cluster/v4alpha/cluster.proto | 8 +- api/envoy/config/core/v3/base.proto | 5 +- api/envoy/config/core/v4alpha/base.proto | 9 +- .../config/core/v4alpha/health_check.proto | 6 +- api/envoy/config/endpoint/v4alpha/BUILD | 14 + .../config/endpoint/v4alpha/endpoint.proto | 119 +++++ .../v4alpha/endpoint_components.proto | 158 +++++++ .../config/endpoint/v4alpha/load_report.proto | 168 +++++++ api/envoy/data/accesslog/v4alpha/BUILD | 13 + .../data/accesslog/v4alpha/accesslog.proto | 425 ++++++++++++++++++ .../access_loggers/grpc/v4alpha/als.proto | 8 +- .../host/omit_host_metadata/v4alpha/BUILD | 13 + .../v4alpha/omit_host_metadata_config.proto | 29 ++ api/envoy/service/accesslog/v4alpha/BUILD | 2 +- api/envoy/service/accesslog/v4alpha/als.proto | 6 +- api/envoy/service/health/v4alpha/BUILD | 2 +- api/envoy/service/health/v4alpha/hds.proto | 6 +- api/envoy/service/load_stats/v4alpha/BUILD | 2 +- .../service/load_stats/v4alpha/lrs.proto | 4 +- .../envoy/config/cluster/v4alpha/BUILD | 2 +- .../config/cluster/v4alpha/cluster.proto | 8 +- .../envoy/config/core/v3/base.proto | 5 +- .../envoy/config/core/v4alpha/base.proto | 8 +- .../config/core/v4alpha/health_check.proto | 6 +- .../envoy/config/endpoint/v4alpha/BUILD | 14 + .../config/endpoint/v4alpha/endpoint.proto | 119 +++++ .../v4alpha/endpoint_components.proto | 158 +++++++ .../config/endpoint/v4alpha/load_report.proto | 168 +++++++ .../envoy/data/accesslog/v4alpha/BUILD | 13 + .../data/accesslog/v4alpha/accesslog.proto | 425 ++++++++++++++++++ .../access_loggers/grpc/v4alpha/als.proto | 8 +- .../host/omit_host_metadata/v4alpha/BUILD | 13 + .../v4alpha/omit_host_metadata_config.proto | 29 ++ .../envoy/service/accesslog/v4alpha/BUILD | 2 +- .../envoy/service/accesslog/v4alpha/als.proto | 6 +- .../envoy/service/health/v4alpha/BUILD | 2 +- .../envoy/service/health/v4alpha/hds.proto | 6 +- .../envoy/service/load_stats/v4alpha/BUILD | 2 +- .../service/load_stats/v4alpha/lrs.proto | 4 +- include/envoy/config/typed_metadata.h | 14 +- source/common/config/metadata.h | 17 +- test/common/config/metadata_test.cc | 222 ++++++--- test/common/router/config_impl_test.cc | 5 + test/common/upstream/upstream_impl_test.cc | 5 + 45 files changed, 2123 insertions(+), 137 deletions(-) create mode 100644 api/envoy/config/endpoint/v4alpha/BUILD create mode 100644 api/envoy/config/endpoint/v4alpha/endpoint.proto create mode 100644 api/envoy/config/endpoint/v4alpha/endpoint_components.proto create mode 100644 api/envoy/config/endpoint/v4alpha/load_report.proto create mode 100644 api/envoy/data/accesslog/v4alpha/BUILD create mode 100644 api/envoy/data/accesslog/v4alpha/accesslog.proto create mode 100644 api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD create mode 100644 api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto create mode 100644 generated_api_shadow/envoy/config/endpoint/v4alpha/BUILD create mode 100644 generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint.proto create mode 100644 generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint_components.proto create mode 100644 generated_api_shadow/envoy/config/endpoint/v4alpha/load_report.proto create mode 100644 generated_api_shadow/envoy/data/accesslog/v4alpha/BUILD create mode 100644 generated_api_shadow/envoy/data/accesslog/v4alpha/accesslog.proto create mode 100644 generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD create mode 100644 generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto diff --git a/api/envoy/config/cluster/v4alpha/BUILD b/api/envoy/config/cluster/v4alpha/BUILD index 02eb1b1917251..b5db8055b8d1e 100644 --- a/api/envoy/config/cluster/v4alpha/BUILD +++ b/api/envoy/config/cluster/v4alpha/BUILD @@ -8,7 +8,7 @@ api_proto_package( deps = [ "//envoy/config/cluster/v3:pkg", "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v3:pkg", + "//envoy/config/endpoint/v4alpha:pkg", "//envoy/type/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", "@com_github_cncf_udpa//xds/core/v3:pkg", diff --git a/api/envoy/config/cluster/v4alpha/cluster.proto b/api/envoy/config/cluster/v4alpha/cluster.proto index 4e6015b815958..dd32fde0c9d58 100644 --- a/api/envoy/config/cluster/v4alpha/cluster.proto +++ b/api/envoy/config/cluster/v4alpha/cluster.proto @@ -10,7 +10,7 @@ import "envoy/config/core/v4alpha/base.proto"; import "envoy/config/core/v4alpha/config_source.proto"; import "envoy/config/core/v4alpha/extension.proto"; import "envoy/config/core/v4alpha/health_check.proto"; -import "envoy/config/endpoint/v3/endpoint.proto"; +import "envoy/config/endpoint/v4alpha/endpoint.proto"; import "envoy/type/v3/percent.proto"; import "google/protobuf/any.proto"; @@ -636,7 +636,7 @@ message Cluster { // Configuration to use different transport sockets for different endpoints. // The entry of *envoy.transport_socket_match* in the - // :ref:`LbEndpoint.Metadata ` + // :ref:`LbEndpoint.Metadata ` // is used to match against the transport sockets as they appear in the list. The first // :ref:`match ` is used. // For example, with the following match @@ -732,9 +732,9 @@ message Cluster { // .. attention:: // // Setting this allows non-EDS cluster types to contain embedded EDS equivalent - // :ref:`endpoint assignments`. + // :ref:`endpoint assignments`. // - endpoint.v3.ClusterLoadAssignment load_assignment = 33; + endpoint.v4alpha.ClusterLoadAssignment load_assignment = 33; // Optional :ref:`active health checking ` // configuration for the cluster. If no diff --git a/api/envoy/config/core/v3/base.proto b/api/envoy/config/core/v3/base.proto index b2271d743fb04..647d8737bf5ff 100644 --- a/api/envoy/config/core/v3/base.proto +++ b/api/envoy/config/core/v3/base.proto @@ -225,8 +225,11 @@ message Metadata { // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. - map filter_metadata = 1; + map filter_metadata = 1 [deprecated = true]; + // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* + // namespace is reserved for Envoy's built-in filters. + // The value is encoded as google.protobuf.Any. map typed_filter_metadata = 2; } diff --git a/api/envoy/config/core/v4alpha/base.proto b/api/envoy/config/core/v4alpha/base.proto index a1ea9ee43f257..d45a6c71ff2fb 100644 --- a/api/envoy/config/core/v4alpha/base.proto +++ b/api/envoy/config/core/v4alpha/base.proto @@ -69,7 +69,7 @@ message Locality { // Defines the local service zone where Envoy is running. Though optional, it // should be set if discovery service routing is used and the discovery - // service exposes :ref:`zone data `, + // service exposes :ref:`zone data `, // either in this message or via :option:`--service-zone`. The meaning of zone // is context dependent, e.g. `Availability Zone (AZ) // `_ @@ -215,10 +215,13 @@ message Node { message Metadata { option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.Metadata"; + reserved 1; + + reserved "filter_metadata"; + // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. - map filter_metadata = 1; - + // The value is encoded as google.protobuf.Any. map typed_filter_metadata = 2; } diff --git a/api/envoy/config/core/v4alpha/health_check.proto b/api/envoy/config/core/v4alpha/health_check.proto index 8d870680a466d..987793280857f 100644 --- a/api/envoy/config/core/v4alpha/health_check.proto +++ b/api/envoy/config/core/v4alpha/health_check.proto @@ -85,7 +85,7 @@ message HealthCheck { // The value of the host header in the HTTP health check request. If // left empty (default value), the name of the cluster this health check is associated // with will be used. The host header can be customized for a specific endpoint by setting the - // :ref:`hostname ` field. + // :ref:`hostname ` field. string host = 1 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; // Specifies the HTTP path that will be requested during health checking. For example @@ -170,7 +170,7 @@ message HealthCheck { // The value of the :authority header in the gRPC health check request. If // left empty (default value), the name of the cluster this health check is associated // with will be used. The authority header can be customized for a specific endpoint by setting - // the :ref:`hostname ` field. + // the :ref:`hostname ` field. string authority = 2 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; } @@ -359,7 +359,7 @@ message HealthCheck { // config: { ... } # tls socket configuration // // If this field is set, then for health checks it will supersede an entry of *envoy.transport_socket* in the - // :ref:`LbEndpoint.Metadata `. + // :ref:`LbEndpoint.Metadata `. // This allows using different transport socket capabilities for health checking versus proxying to the // endpoint. // diff --git a/api/envoy/config/endpoint/v4alpha/BUILD b/api/envoy/config/endpoint/v4alpha/BUILD new file mode 100644 index 0000000000000..79d52ad4cfbc6 --- /dev/null +++ b/api/envoy/config/endpoint/v4alpha/BUILD @@ -0,0 +1,14 @@ +# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") + +licenses(["notice"]) # Apache 2 + +api_proto_package( + deps = [ + "//envoy/config/core/v4alpha:pkg", + "//envoy/config/endpoint/v3:pkg", + "//envoy/type/v3:pkg", + "@com_github_cncf_udpa//udpa/annotations:pkg", + ], +) diff --git a/api/envoy/config/endpoint/v4alpha/endpoint.proto b/api/envoy/config/endpoint/v4alpha/endpoint.proto new file mode 100644 index 0000000000000..0d4d4684d2c10 --- /dev/null +++ b/api/envoy/config/endpoint/v4alpha/endpoint.proto @@ -0,0 +1,119 @@ +syntax = "proto3"; + +package envoy.config.endpoint.v4alpha; + +import "envoy/config/endpoint/v4alpha/endpoint_components.proto"; +import "envoy/type/v3/percent.proto"; + +import "google/protobuf/duration.proto"; +import "google/protobuf/wrappers.proto"; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; +option java_outer_classname = "EndpointProto"; +option java_multiple_files = true; +option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; + +// [#protodoc-title: Endpoint configuration] +// Endpoint discovery :ref:`architecture overview ` + +// Each route from RDS will map to a single cluster or traffic split across +// clusters using weights expressed in the RDS WeightedCluster. +// +// With EDS, each cluster is treated independently from a LB perspective, with +// LB taking place between the Localities within a cluster and at a finer +// granularity between the hosts within a locality. The percentage of traffic +// for each endpoint is determined by both its load_balancing_weight, and the +// load_balancing_weight of its locality. First, a locality will be selected, +// then an endpoint within that locality will be chose based on its weight. +// [#next-free-field: 6] +message ClusterLoadAssignment { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.ClusterLoadAssignment"; + + // Load balancing policy settings. + // [#next-free-field: 6] + message Policy { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.ClusterLoadAssignment.Policy"; + + // [#not-implemented-hide:] + message DropOverload { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload"; + + // Identifier for the policy specifying the drop. + string category = 1 [(validate.rules).string = {min_len: 1}]; + + // Percentage of traffic that should be dropped for the category. + type.v3.FractionalPercent drop_percentage = 2; + } + + reserved 1, 5; + + reserved "disable_overprovisioning"; + + // Action to trim the overall incoming traffic to protect the upstream + // hosts. This action allows protection in case the hosts are unable to + // recover from an outage, or unable to autoscale or unable to handle + // incoming traffic volume for any reason. + // + // At the client each category is applied one after the other to generate + // the 'actual' drop percentage on all outgoing traffic. For example: + // + // .. code-block:: json + // + // { "drop_overloads": [ + // { "category": "throttle", "drop_percentage": 60 } + // { "category": "lb", "drop_percentage": 50 } + // ]} + // + // The actual drop percentages applied to the traffic at the clients will be + // "throttle"_drop = 60% + // "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%. + // actual_outgoing_load = 20% // remaining after applying all categories. + // [#not-implemented-hide:] + repeated DropOverload drop_overloads = 2; + + // Priority levels and localities are considered overprovisioned with this + // factor (in percentage). This means that we don't consider a priority + // level or locality unhealthy until the fraction of healthy hosts + // multiplied by the overprovisioning factor drops below 100. + // With the default value 140(1.4), Envoy doesn't consider a priority level + // or a locality unhealthy until their percentage of healthy hosts drops + // below 72%. For example: + // + // .. code-block:: json + // + // { "overprovisioning_factor": 100 } + // + // Read more at :ref:`priority levels ` and + // :ref:`localities `. + google.protobuf.UInt32Value overprovisioning_factor = 3 [(validate.rules).uint32 = {gt: 0}]; + + // The max time until which the endpoints from this assignment can be used. + // If no new assignments are received before this time expires the endpoints + // are considered stale and should be marked unhealthy. + // Defaults to 0 which means endpoints never go stale. + google.protobuf.Duration endpoint_stale_after = 4 [(validate.rules).duration = {gt {}}]; + } + + // Name of the cluster. This will be the :ref:`service_name + // ` value if specified + // in the cluster :ref:`EdsClusterConfig + // `. + string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; + + // List of endpoints to load balance to. + repeated LocalityLbEndpoints endpoints = 2; + + // Map of named endpoints that can be referenced in LocalityLbEndpoints. + // [#not-implemented-hide:] + map named_endpoints = 5; + + // Load balancing policy settings. + Policy policy = 4; +} diff --git a/api/envoy/config/endpoint/v4alpha/endpoint_components.proto b/api/envoy/config/endpoint/v4alpha/endpoint_components.proto new file mode 100644 index 0000000000000..246d569d28464 --- /dev/null +++ b/api/envoy/config/endpoint/v4alpha/endpoint_components.proto @@ -0,0 +1,158 @@ +syntax = "proto3"; + +package envoy.config.endpoint.v4alpha; + +import "envoy/config/core/v4alpha/address.proto"; +import "envoy/config/core/v4alpha/base.proto"; +import "envoy/config/core/v4alpha/health_check.proto"; + +import "google/protobuf/wrappers.proto"; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; +option java_outer_classname = "EndpointComponentsProto"; +option java_multiple_files = true; +option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; + +// [#protodoc-title: Endpoints] + +// Upstream host identifier. +message Endpoint { + option (udpa.annotations.versioning).previous_message_type = "envoy.config.endpoint.v3.Endpoint"; + + // The optional health check configuration. + message HealthCheckConfig { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.Endpoint.HealthCheckConfig"; + + // Optional alternative health check port value. + // + // By default the health check address port of an upstream host is the same + // as the host's serving address port. This provides an alternative health + // check port. Setting this with a non-zero value allows an upstream host + // to have different health check address port. + uint32 port_value = 1 [(validate.rules).uint32 = {lte: 65535}]; + + // By default, the host header for L7 health checks is controlled by cluster level configuration + // (see: :ref:`host ` and + // :ref:`authority `). Setting this + // to a non-empty value allows overriding the cluster level configuration for a specific + // endpoint. + string hostname = 2; + } + + // The upstream host address. + // + // .. attention:: + // + // The form of host address depends on the given cluster type. For STATIC or EDS, + // it is expected to be a direct IP address (or something resolvable by the + // specified :ref:`resolver ` + // in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname, + // and will be resolved via DNS. + core.v4alpha.Address address = 1; + + // The optional health check configuration is used as configuration for the + // health checker to contact the health checked host. + // + // .. attention:: + // + // This takes into effect only for upstream clusters with + // :ref:`active health checking ` enabled. + HealthCheckConfig health_check_config = 2; + + // The hostname associated with this endpoint. This hostname is not used for routing or address + // resolution. If provided, it will be associated with the endpoint, and can be used for features + // that require a hostname, like + // :ref:`auto_host_rewrite `. + string hostname = 3; +} + +// An Endpoint that Envoy can route traffic to. +// [#next-free-field: 6] +message LbEndpoint { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.LbEndpoint"; + + // Upstream host identifier or a named reference. + oneof host_identifier { + Endpoint endpoint = 1; + + // [#not-implemented-hide:] + string endpoint_name = 5; + } + + // Optional health status when known and supplied by EDS server. + core.v4alpha.HealthStatus health_status = 2; + + // The endpoint metadata specifies values that may be used by the load + // balancer to select endpoints in a cluster for a given request. The filter + // name should be specified as *envoy.lb*. An example boolean key-value pair + // is *canary*, providing the optional canary status of the upstream host. + // This may be matched against in a route's + // :ref:`RouteAction ` metadata_match field + // to subset the endpoints considered in cluster load balancing. + core.v4alpha.Metadata metadata = 3; + + // The optional load balancing weight of the upstream host; at least 1. + // Envoy uses the load balancing weight in some of the built in load + // balancers. The load balancing weight for an endpoint is divided by the sum + // of the weights of all endpoints in the endpoint's locality to produce a + // percentage of traffic for the endpoint. This percentage is then further + // weighted by the endpoint's locality's load balancing weight from + // LocalityLbEndpoints. If unspecified, each host is presumed to have equal + // weight in a locality. The sum of the weights of all endpoints in the + // endpoint's locality must not exceed uint32_t maximal value (4294967295). + google.protobuf.UInt32Value load_balancing_weight = 4 [(validate.rules).uint32 = {gte: 1}]; +} + +// A group of endpoints belonging to a Locality. +// One can have multiple LocalityLbEndpoints for a locality, but this is +// generally only done if the different groups need to have different load +// balancing weights or different priorities. +// [#next-free-field: 7] +message LocalityLbEndpoints { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.LocalityLbEndpoints"; + + // Identifies location of where the upstream hosts run. + core.v4alpha.Locality locality = 1; + + // The group of endpoints belonging to the locality specified. + repeated LbEndpoint lb_endpoints = 2; + + // Optional: Per priority/region/zone/sub_zone weight; at least 1. The load + // balancing weight for a locality is divided by the sum of the weights of all + // localities at the same priority level to produce the effective percentage + // of traffic for the locality. The sum of the weights of all localities at + // the same priority level must not exceed uint32_t maximal value (4294967295). + // + // Locality weights are only considered when :ref:`locality weighted load + // balancing ` is + // configured. These weights are ignored otherwise. If no weights are + // specified when locality weighted load balancing is enabled, the locality is + // assigned no load. + google.protobuf.UInt32Value load_balancing_weight = 3 [(validate.rules).uint32 = {gte: 1}]; + + // Optional: the priority for this LocalityLbEndpoints. If unspecified this will + // default to the highest priority (0). + // + // Under usual circumstances, Envoy will only select endpoints for the highest + // priority (0). In the event all endpoints for a particular priority are + // unavailable/unhealthy, Envoy will fail over to selecting endpoints for the + // next highest priority group. + // + // Priorities should range from 0 (highest) to N (lowest) without skipping. + uint32 priority = 5 [(validate.rules).uint32 = {lte: 128}]; + + // Optional: Per locality proximity value which indicates how close this + // locality is from the source locality. This value only provides ordering + // information (lower the value, closer it is to the source locality). + // This will be consumed by load balancing schemes that need proximity order + // to determine where to route the requests. + // [#not-implemented-hide:] + google.protobuf.UInt32Value proximity = 6; +} diff --git a/api/envoy/config/endpoint/v4alpha/load_report.proto b/api/envoy/config/endpoint/v4alpha/load_report.proto new file mode 100644 index 0000000000000..80be59041d742 --- /dev/null +++ b/api/envoy/config/endpoint/v4alpha/load_report.proto @@ -0,0 +1,168 @@ +syntax = "proto3"; + +package envoy.config.endpoint.v4alpha; + +import "envoy/config/core/v4alpha/address.proto"; +import "envoy/config/core/v4alpha/base.proto"; + +import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; +option java_outer_classname = "LoadReportProto"; +option java_multiple_files = true; +option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; + +// [#protodoc-title: Load Report] + +// These are stats Envoy reports to the management server at a frequency defined by +// :ref:`LoadStatsResponse.load_reporting_interval`. +// Stats per upstream region/zone and optionally per subzone. +// [#next-free-field: 9] +message UpstreamLocalityStats { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.UpstreamLocalityStats"; + + // Name of zone, region and optionally endpoint group these metrics were + // collected from. Zone and region names could be empty if unknown. + core.v4alpha.Locality locality = 1; + + // The total number of requests successfully completed by the endpoints in the + // locality. + 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, + // aggregated over all endpoints in the locality. + uint64 total_error_requests = 4; + + // The total number of requests that were issued by this Envoy since + // the last report. This information is aggregated over all the + // upstream endpoints in the locality. + uint64 total_issued_requests = 8; + + // Stats for multi-dimensional load balancing. + repeated EndpointLoadMetricStats load_metric_stats = 5; + + // Endpoint granularity stats information for this locality. This information + // is populated if the Server requests it by setting + // :ref:`LoadStatsResponse.report_endpoint_granularity`. + repeated UpstreamEndpointStats upstream_endpoint_stats = 7; + + // [#not-implemented-hide:] The priority of the endpoint group these metrics + // were collected from. + uint32 priority = 6; +} + +// [#next-free-field: 8] +message UpstreamEndpointStats { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.UpstreamEndpointStats"; + + // Upstream host address. + core.v4alpha.Address address = 1; + + // Opaque and implementation dependent metadata of the + // endpoint. Envoy will pass this directly to the management server. + google.protobuf.Struct metadata = 6; + + // 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 successfully. 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 for this endpoint. + 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; + + // The total number of requests that were issued to this endpoint + // since the last report. A single TCP connection, HTTP or gRPC + // request or stream is counted as one request. + uint64 total_issued_requests = 7; + + // Stats for multi-dimensional load balancing. + repeated EndpointLoadMetricStats load_metric_stats = 5; +} + +message EndpointLoadMetricStats { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.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` +// Next ID: 7 +// [#next-free-field: 7] +message ClusterStats { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.ClusterStats"; + + message DroppedRequests { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.ClusterStats.DroppedRequests"; + + // Identifier for the policy specifying the drop. + string category = 1 [(validate.rules).string = {min_len: 1}]; + + // Total number of deliberately dropped requests for the category. + uint64 dropped_count = 2; + } + + // The name of the cluster. + string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; + + // The eds_cluster_config service_name of the cluster. + // It's possible that two clusters send the same service_name to EDS, + // in that case, the management server is supposed to do aggregation on the load reports. + string cluster_service_name = 6; + + // 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 total number of dropped requests. This covers requests + // deliberately dropped by the drop_overload policy and circuit breaking. + uint64 total_dropped_requests = 3; + + // Information about deliberately dropped requests for each category specified + // in the DropOverload policy. + repeated DroppedRequests dropped_requests = 5; + + // Period over which the actual load report occurred. This will be guaranteed to include every + // request reported. Due to system load and delays between the *LoadStatsRequest* sent from Envoy + // and the *LoadStatsResponse* message sent from the management server, this may be longer than + // the requested load reporting interval in the *LoadStatsResponse*. + google.protobuf.Duration load_report_interval = 4; +} diff --git a/api/envoy/data/accesslog/v4alpha/BUILD b/api/envoy/data/accesslog/v4alpha/BUILD new file mode 100644 index 0000000000000..c02cec9d67f6c --- /dev/null +++ b/api/envoy/data/accesslog/v4alpha/BUILD @@ -0,0 +1,13 @@ +# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") + +licenses(["notice"]) # Apache 2 + +api_proto_package( + deps = [ + "//envoy/config/core/v4alpha:pkg", + "//envoy/data/accesslog/v3:pkg", + "@com_github_cncf_udpa//udpa/annotations:pkg", + ], +) diff --git a/api/envoy/data/accesslog/v4alpha/accesslog.proto b/api/envoy/data/accesslog/v4alpha/accesslog.proto new file mode 100644 index 0000000000000..1845017200266 --- /dev/null +++ b/api/envoy/data/accesslog/v4alpha/accesslog.proto @@ -0,0 +1,425 @@ +syntax = "proto3"; + +package envoy.data.accesslog.v4alpha; + +import "envoy/config/core/v4alpha/address.proto"; +import "envoy/config/core/v4alpha/base.proto"; + +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.data.accesslog.v4alpha"; +option java_outer_classname = "AccesslogProto"; +option java_multiple_files = true; +option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; + +// [#protodoc-title: gRPC access logs] +// Envoy access logs describe incoming interaction with Envoy over a fixed +// period of time, and typically cover a single request/response exchange, +// (e.g. HTTP), stream (e.g. over HTTP/gRPC), or proxied connection (e.g. TCP). +// Access logs contain fields defined in protocol-specific protobuf messages. +// +// Except where explicitly declared otherwise, all fields describe +// *downstream* interaction between Envoy and a connected client. +// Fields describing *upstream* interaction will explicitly include ``upstream`` +// in their name. + +message TCPAccessLogEntry { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.TCPAccessLogEntry"; + + // Common properties shared by all Envoy access logs. + AccessLogCommon common_properties = 1; + + // Properties of the TCP connection. + ConnectionProperties connection_properties = 2; +} + +message HTTPAccessLogEntry { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.HTTPAccessLogEntry"; + + // HTTP version + enum HTTPVersion { + PROTOCOL_UNSPECIFIED = 0; + HTTP10 = 1; + HTTP11 = 2; + HTTP2 = 3; + HTTP3 = 4; + } + + // Common properties shared by all Envoy access logs. + AccessLogCommon common_properties = 1; + + HTTPVersion protocol_version = 2; + + // Description of the incoming HTTP request. + HTTPRequestProperties request = 3; + + // Description of the outgoing HTTP response. + HTTPResponseProperties response = 4; +} + +// Defines fields for a connection +message ConnectionProperties { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.ConnectionProperties"; + + // Number of bytes received from downstream. + uint64 received_bytes = 1; + + // Number of bytes sent to downstream. + uint64 sent_bytes = 2; +} + +// Defines fields that are shared by all Envoy access logs. +// [#next-free-field: 22] +message AccessLogCommon { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.AccessLogCommon"; + + // [#not-implemented-hide:] + // This field indicates the rate at which this log entry was sampled. + // Valid range is (0.0, 1.0]. + double sample_rate = 1 [(validate.rules).double = {lte: 1.0 gt: 0.0}]; + + // This field is the remote/origin address on which the request from the user was received. + // Note: This may not be the physical peer. E.g, if the remote address is inferred from for + // example the x-forwarder-for header, proxy protocol, etc. + config.core.v4alpha.Address downstream_remote_address = 2; + + // This field is the local/destination address on which the request from the user was received. + config.core.v4alpha.Address downstream_local_address = 3; + + // If the connection is secure,S this field will contain TLS properties. + TLSProperties tls_properties = 4; + + // The time that Envoy started servicing this request. This is effectively the time that the first + // downstream byte is received. + google.protobuf.Timestamp start_time = 5; + + // Interval between the first downstream byte received and the last + // downstream byte received (i.e. time it takes to receive a request). + google.protobuf.Duration time_to_last_rx_byte = 6; + + // Interval between the first downstream byte received and the first upstream byte sent. There may + // by considerable delta between *time_to_last_rx_byte* and this value due to filters. + // Additionally, the same caveats apply as documented in *time_to_last_downstream_tx_byte* about + // not accounting for kernel socket buffer time, etc. + google.protobuf.Duration time_to_first_upstream_tx_byte = 7; + + // Interval between the first downstream byte received and the last upstream byte sent. There may + // by considerable delta between *time_to_last_rx_byte* and this value due to filters. + // Additionally, the same caveats apply as documented in *time_to_last_downstream_tx_byte* about + // not accounting for kernel socket buffer time, etc. + google.protobuf.Duration time_to_last_upstream_tx_byte = 8; + + // Interval between the first downstream byte received and the first upstream + // byte received (i.e. time it takes to start receiving a response). + google.protobuf.Duration time_to_first_upstream_rx_byte = 9; + + // Interval between the first downstream byte received and the last upstream + // byte received (i.e. time it takes to receive a complete response). + google.protobuf.Duration time_to_last_upstream_rx_byte = 10; + + // Interval between the first downstream byte received and the first downstream byte sent. + // There may be a considerable delta between the *time_to_first_upstream_rx_byte* and this field + // due to filters. Additionally, the same caveats apply as documented in + // *time_to_last_downstream_tx_byte* about not accounting for kernel socket buffer time, etc. + google.protobuf.Duration time_to_first_downstream_tx_byte = 11; + + // Interval between the first downstream byte received and the last downstream byte sent. + // Depending on protocol, buffering, windowing, filters, etc. there may be a considerable delta + // between *time_to_last_upstream_rx_byte* and this field. Note also that this is an approximate + // time. In the current implementation it does not include kernel socket buffer time. In the + // current implementation it also does not include send window buffering inside the HTTP/2 codec. + // In the future it is likely that work will be done to make this duration more accurate. + google.protobuf.Duration time_to_last_downstream_tx_byte = 12; + + // The upstream remote/destination address that handles this exchange. This does not include + // retries. + config.core.v4alpha.Address upstream_remote_address = 13; + + // The upstream local/origin address that handles this exchange. This does not include retries. + config.core.v4alpha.Address upstream_local_address = 14; + + // The upstream cluster that *upstream_remote_address* belongs to. + string upstream_cluster = 15; + + // Flags indicating occurrences during request/response processing. + ResponseFlags response_flags = 16; + + // All metadata encountered during request processing, including endpoint + // selection. + // + // This can be used to associate IDs attached to the various configurations + // used to process this request with the access log entry. For example, a + // route created from a higher level forwarding rule with some ID can place + // that ID in this field and cross reference later. It can also be used to + // determine if a canary endpoint was used or not. + config.core.v4alpha.Metadata metadata = 17; + + // If upstream connection failed due to transport socket (e.g. TLS handshake), provides the + // failure reason from the transport socket. The format of this field depends on the configured + // upstream transport socket. Common TLS failures are in + // :ref:`TLS trouble shooting `. + string upstream_transport_failure_reason = 18; + + // The name of the route + string route_name = 19; + + // This field is the downstream direct remote address on which the request from the user was + // received. Note: This is always the physical peer, even if the remote address is inferred from + // for example the x-forwarder-for header, proxy protocol, etc. + config.core.v4alpha.Address downstream_direct_remote_address = 20; + + // Map of filter state in stream info that have been configured to be logged. If the filter + // state serialized to any message other than `google.protobuf.Any` it will be packed into + // `google.protobuf.Any`. + map filter_state_objects = 21; +} + +// Flags indicating occurrences during request/response processing. +// [#next-free-field: 24] +message ResponseFlags { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.ResponseFlags"; + + message Unauthorized { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.ResponseFlags.Unauthorized"; + + // Reasons why the request was unauthorized + enum Reason { + REASON_UNSPECIFIED = 0; + + // The request was denied by the external authorization service. + EXTERNAL_SERVICE = 1; + } + + Reason reason = 1; + } + + // Indicates local server healthcheck failed. + bool failed_local_healthcheck = 1; + + // Indicates there was no healthy upstream. + bool no_healthy_upstream = 2; + + // Indicates an there was an upstream request timeout. + bool upstream_request_timeout = 3; + + // Indicates local codec level reset was sent on the stream. + bool local_reset = 4; + + // Indicates remote codec level reset was received on the stream. + bool upstream_remote_reset = 5; + + // Indicates there was a local reset by a connection pool due to an initial connection failure. + bool upstream_connection_failure = 6; + + // Indicates the stream was reset due to an upstream connection termination. + bool upstream_connection_termination = 7; + + // Indicates the stream was reset because of a resource overflow. + bool upstream_overflow = 8; + + // Indicates no route was found for the request. + bool no_route_found = 9; + + // Indicates that the request was delayed before proxying. + bool delay_injected = 10; + + // Indicates that the request was aborted with an injected error code. + bool fault_injected = 11; + + // Indicates that the request was rate-limited locally. + bool rate_limited = 12; + + // Indicates if the request was deemed unauthorized and the reason for it. + Unauthorized unauthorized_details = 13; + + // Indicates that the request was rejected because there was an error in rate limit service. + bool rate_limit_service_error = 14; + + // Indicates the stream was reset due to a downstream connection termination. + bool downstream_connection_termination = 15; + + // Indicates that the upstream retry limit was exceeded, resulting in a downstream error. + bool upstream_retry_limit_exceeded = 16; + + // Indicates that the stream idle timeout was hit, resulting in a downstream 408. + bool stream_idle_timeout = 17; + + // Indicates that the request was rejected because an envoy request header failed strict + // validation. + bool invalid_envoy_request_headers = 18; + + // Indicates there was an HTTP protocol error on the downstream request. + bool downstream_protocol_error = 19; + + // Indicates there was a max stream duration reached on the upstream request. + bool upstream_max_stream_duration_reached = 20; + + // Indicates the response was served from a cache filter. + bool response_from_cache_filter = 21; + + // Indicates that a filter configuration is not available. + bool no_filter_config_found = 22; + + // Indicates that request or connection exceeded the downstream connection duration. + bool duration_timeout = 23; +} + +// Properties of a negotiated TLS connection. +// [#next-free-field: 7] +message TLSProperties { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.TLSProperties"; + + enum TLSVersion { + VERSION_UNSPECIFIED = 0; + TLSv1 = 1; + TLSv1_1 = 2; + TLSv1_2 = 3; + TLSv1_3 = 4; + } + + message CertificateProperties { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.TLSProperties.CertificateProperties"; + + message SubjectAltName { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.TLSProperties.CertificateProperties.SubjectAltName"; + + oneof san { + string uri = 1; + + // [#not-implemented-hide:] + string dns = 2; + } + } + + // SANs present in the certificate. + repeated SubjectAltName subject_alt_name = 1; + + // The subject field of the certificate. + string subject = 2; + } + + // Version of TLS that was negotiated. + TLSVersion tls_version = 1; + + // TLS cipher suite negotiated during handshake. The value is a + // four-digit hex code defined by the IANA TLS Cipher Suite Registry + // (e.g. ``009C`` for ``TLS_RSA_WITH_AES_128_GCM_SHA256``). + // + // Here it is expressed as an integer. + google.protobuf.UInt32Value tls_cipher_suite = 2; + + // SNI hostname from handshake. + string tls_sni_hostname = 3; + + // Properties of the local certificate used to negotiate TLS. + CertificateProperties local_certificate_properties = 4; + + // Properties of the peer certificate used to negotiate TLS. + CertificateProperties peer_certificate_properties = 5; + + // The TLS session ID. + string tls_session_id = 6; +} + +// [#next-free-field: 14] +message HTTPRequestProperties { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.HTTPRequestProperties"; + + // The request method (RFC 7231/2616). + config.core.v4alpha.RequestMethod request_method = 1 + [(validate.rules).enum = {defined_only: true}]; + + // The scheme portion of the incoming request URI. + string scheme = 2; + + // HTTP/2 ``:authority`` or HTTP/1.1 ``Host`` header value. + string authority = 3; + + // The port of the incoming request URI + // (unused currently, as port is composed onto authority). + google.protobuf.UInt32Value port = 4; + + // The path portion from the incoming request URI. + string path = 5; + + // Value of the ``User-Agent`` request header. + string user_agent = 6; + + // Value of the ``Referer`` request header. + string referer = 7; + + // Value of the ``X-Forwarded-For`` request header. + string forwarded_for = 8; + + // Value of the ``X-Request-Id`` request header + // + // This header is used by Envoy to uniquely identify a request. + // It will be generated for all external requests and internal requests that + // do not already have a request ID. + string request_id = 9; + + // Value of the ``X-Envoy-Original-Path`` request header. + string original_path = 10; + + // Size of the HTTP request headers in bytes. + // + // This value is captured from the OSI layer 7 perspective, i.e. it does not + // include overhead from framing or encoding at other networking layers. + uint64 request_headers_bytes = 11; + + // Size of the HTTP request body in bytes. + // + // This value is captured from the OSI layer 7 perspective, i.e. it does not + // include overhead from framing or encoding at other networking layers. + uint64 request_body_bytes = 12; + + // Map of additional headers that have been configured to be logged. + map request_headers = 13; +} + +// [#next-free-field: 7] +message HTTPResponseProperties { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.HTTPResponseProperties"; + + // The HTTP response code returned by Envoy. + google.protobuf.UInt32Value response_code = 1; + + // Size of the HTTP response headers in bytes. + // + // This value is captured from the OSI layer 7 perspective, i.e. it does not + // include overhead from framing or encoding at other networking layers. + uint64 response_headers_bytes = 2; + + // Size of the HTTP response body in bytes. + // + // This value is captured from the OSI layer 7 perspective, i.e. it does not + // include overhead from framing or encoding at other networking layers. + uint64 response_body_bytes = 3; + + // Map of additional headers configured to be logged. + map response_headers = 4; + + // Map of trailers configured to be logged. + map response_trailers = 5; + + // The HTTP response code details. + string response_code_details = 6; +} diff --git a/api/envoy/extensions/access_loggers/grpc/v4alpha/als.proto b/api/envoy/extensions/access_loggers/grpc/v4alpha/als.proto index c7bf15948b231..9605a05c4128c 100644 --- a/api/envoy/extensions/access_loggers/grpc/v4alpha/als.proto +++ b/api/envoy/extensions/access_loggers/grpc/v4alpha/als.proto @@ -31,15 +31,15 @@ message HttpGrpcAccessLogConfig { CommonGrpcAccessLogConfig common_config = 1 [(validate.rules).message = {required: true}]; // Additional request headers to log in :ref:`HTTPRequestProperties.request_headers - // `. + // `. repeated string additional_request_headers_to_log = 2; // Additional response headers to log in :ref:`HTTPResponseProperties.response_headers - // `. + // `. repeated string additional_response_headers_to_log = 3; // Additional response trailers to log in :ref:`HTTPResponseProperties.response_trailers - // `. + // `. repeated string additional_response_trailers_to_log = 4; } @@ -83,7 +83,7 @@ message CommonGrpcAccessLogConfig { google.protobuf.UInt32Value buffer_size_bytes = 4; // Additional filter state objects to log in :ref:`filter_state_objects - // `. + // `. // Logger will call `FilterState::Object::serializeAsProto` to serialize the filter state object. repeated string filter_state_objects_to_log = 5; } diff --git a/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD b/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD new file mode 100644 index 0000000000000..df5de314366ab --- /dev/null +++ b/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD @@ -0,0 +1,13 @@ +# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") + +licenses(["notice"]) # Apache 2 + +api_proto_package( + deps = [ + "//envoy/config/core/v4alpha:pkg", + "//envoy/extensions/retry/host/omit_host_metadata/v3:pkg", + "@com_github_cncf_udpa//udpa/annotations:pkg", + ], +) diff --git a/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto b/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto new file mode 100644 index 0000000000000..043d5ce3cfa06 --- /dev/null +++ b/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +package envoy.extensions.retry.host.omit_host_metadata.v4alpha; + +import "envoy/config/core/v4alpha/base.proto"; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.retry.host.omit_host_metadata.v4alpha"; +option java_outer_classname = "OmitHostMetadataConfigProto"; +option java_multiple_files = true; +option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; + +// [#protodoc-title: Omit host metadata retry predicate] + +// A retry host predicate that can be used to reject a host based on +// predefined metadata match criteria. +// [#extension: envoy.retry_host_predicates.omit_host_metadata] +message OmitHostMetadataConfig { + option (udpa.annotations.versioning).previous_message_type = + "envoy.extensions.retry.host.omit_host_metadata.v3.OmitHostMetadataConfig"; + + // Retry host predicate metadata match criteria. The hosts in + // the upstream cluster with matching metadata will be omitted while + // attempting a retry of a failed request. The metadata should be specified + // under the *envoy.lb* key. + config.core.v4alpha.Metadata metadata_match = 1; +} diff --git a/api/envoy/service/accesslog/v4alpha/BUILD b/api/envoy/service/accesslog/v4alpha/BUILD index 94c70bc66967b..ef86c64ac7e5f 100644 --- a/api/envoy/service/accesslog/v4alpha/BUILD +++ b/api/envoy/service/accesslog/v4alpha/BUILD @@ -8,7 +8,7 @@ api_proto_package( has_services = True, deps = [ "//envoy/config/core/v4alpha:pkg", - "//envoy/data/accesslog/v3:pkg", + "//envoy/data/accesslog/v4alpha:pkg", "//envoy/service/accesslog/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/api/envoy/service/accesslog/v4alpha/als.proto b/api/envoy/service/accesslog/v4alpha/als.proto index e2c8bbbc80689..3ce1008ec48fb 100644 --- a/api/envoy/service/accesslog/v4alpha/als.proto +++ b/api/envoy/service/accesslog/v4alpha/als.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package envoy.service.accesslog.v4alpha; import "envoy/config/core/v4alpha/base.proto"; -import "envoy/data/accesslog/v3/accesslog.proto"; +import "envoy/data/accesslog/v4alpha/accesslog.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; @@ -58,7 +58,7 @@ message StreamAccessLogsMessage { option (udpa.annotations.versioning).previous_message_type = "envoy.service.accesslog.v3.StreamAccessLogsMessage.HTTPAccessLogEntries"; - repeated data.accesslog.v3.HTTPAccessLogEntry log_entry = 1 + repeated data.accesslog.v4alpha.HTTPAccessLogEntry log_entry = 1 [(validate.rules).repeated = {min_items: 1}]; } @@ -67,7 +67,7 @@ message StreamAccessLogsMessage { option (udpa.annotations.versioning).previous_message_type = "envoy.service.accesslog.v3.StreamAccessLogsMessage.TCPAccessLogEntries"; - repeated data.accesslog.v3.TCPAccessLogEntry log_entry = 1 + repeated data.accesslog.v4alpha.TCPAccessLogEntry log_entry = 1 [(validate.rules).repeated = {min_items: 1}]; } diff --git a/api/envoy/service/health/v4alpha/BUILD b/api/envoy/service/health/v4alpha/BUILD index 60bd19511855e..ed1ef41e94009 100644 --- a/api/envoy/service/health/v4alpha/BUILD +++ b/api/envoy/service/health/v4alpha/BUILD @@ -9,7 +9,7 @@ api_proto_package( deps = [ "//envoy/config/cluster/v4alpha:pkg", "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v3:pkg", + "//envoy/config/endpoint/v4alpha:pkg", "//envoy/service/health/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/api/envoy/service/health/v4alpha/hds.proto b/api/envoy/service/health/v4alpha/hds.proto index 537d20b58cbb3..ee4a7c86f94c6 100644 --- a/api/envoy/service/health/v4alpha/hds.proto +++ b/api/envoy/service/health/v4alpha/hds.proto @@ -5,7 +5,7 @@ package envoy.service.health.v4alpha; import "envoy/config/cluster/v4alpha/cluster.proto"; import "envoy/config/core/v4alpha/base.proto"; import "envoy/config/core/v4alpha/health_check.proto"; -import "envoy/config/endpoint/v3/endpoint_components.proto"; +import "envoy/config/endpoint/v4alpha/endpoint_components.proto"; import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; @@ -103,7 +103,7 @@ message EndpointHealth { option (udpa.annotations.versioning).previous_message_type = "envoy.service.health.v3.EndpointHealth"; - config.endpoint.v3.Endpoint endpoint = 1; + config.endpoint.v4alpha.Endpoint endpoint = 1; config.core.v4alpha.HealthStatus health_status = 2; } @@ -158,7 +158,7 @@ message LocalityEndpoints { config.core.v4alpha.Locality locality = 1; - repeated config.endpoint.v3.Endpoint endpoints = 2; + repeated config.endpoint.v4alpha.Endpoint endpoints = 2; } // The cluster name and locality is provided to Envoy for the endpoints that it diff --git a/api/envoy/service/load_stats/v4alpha/BUILD b/api/envoy/service/load_stats/v4alpha/BUILD index 91d914645041b..870673013a0e6 100644 --- a/api/envoy/service/load_stats/v4alpha/BUILD +++ b/api/envoy/service/load_stats/v4alpha/BUILD @@ -8,7 +8,7 @@ api_proto_package( has_services = True, deps = [ "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v3:pkg", + "//envoy/config/endpoint/v4alpha:pkg", "//envoy/service/load_stats/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/api/envoy/service/load_stats/v4alpha/lrs.proto b/api/envoy/service/load_stats/v4alpha/lrs.proto index 69eb3d707d5e1..344a4ef1094a7 100644 --- a/api/envoy/service/load_stats/v4alpha/lrs.proto +++ b/api/envoy/service/load_stats/v4alpha/lrs.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package envoy.service.load_stats.v4alpha; import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/endpoint/v3/load_report.proto"; +import "envoy/config/endpoint/v4alpha/load_report.proto"; import "google/protobuf/duration.proto"; @@ -68,7 +68,7 @@ message LoadStatsRequest { config.core.v4alpha.Node node = 1; // A list of load stats to report. - repeated config.endpoint.v3.ClusterStats cluster_stats = 2; + repeated config.endpoint.v4alpha.ClusterStats cluster_stats = 2; } // The management server sends envoy a LoadStatsResponse with all clusters it diff --git a/generated_api_shadow/envoy/config/cluster/v4alpha/BUILD b/generated_api_shadow/envoy/config/cluster/v4alpha/BUILD index 02eb1b1917251..b5db8055b8d1e 100644 --- a/generated_api_shadow/envoy/config/cluster/v4alpha/BUILD +++ b/generated_api_shadow/envoy/config/cluster/v4alpha/BUILD @@ -8,7 +8,7 @@ api_proto_package( deps = [ "//envoy/config/cluster/v3:pkg", "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v3:pkg", + "//envoy/config/endpoint/v4alpha:pkg", "//envoy/type/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", "@com_github_cncf_udpa//xds/core/v3:pkg", diff --git a/generated_api_shadow/envoy/config/cluster/v4alpha/cluster.proto b/generated_api_shadow/envoy/config/cluster/v4alpha/cluster.proto index 3ffa88ddde6a6..40524d1993f2e 100644 --- a/generated_api_shadow/envoy/config/cluster/v4alpha/cluster.proto +++ b/generated_api_shadow/envoy/config/cluster/v4alpha/cluster.proto @@ -11,7 +11,7 @@ import "envoy/config/core/v4alpha/config_source.proto"; import "envoy/config/core/v4alpha/extension.proto"; import "envoy/config/core/v4alpha/health_check.proto"; import "envoy/config/core/v4alpha/protocol.proto"; -import "envoy/config/endpoint/v3/endpoint.proto"; +import "envoy/config/endpoint/v4alpha/endpoint.proto"; import "envoy/type/v3/percent.proto"; import "google/protobuf/any.proto"; @@ -635,7 +635,7 @@ message Cluster { // Configuration to use different transport sockets for different endpoints. // The entry of *envoy.transport_socket_match* in the - // :ref:`LbEndpoint.Metadata ` + // :ref:`LbEndpoint.Metadata ` // is used to match against the transport sockets as they appear in the list. The first // :ref:`match ` is used. // For example, with the following match @@ -731,9 +731,9 @@ message Cluster { // .. attention:: // // Setting this allows non-EDS cluster types to contain embedded EDS equivalent - // :ref:`endpoint assignments`. + // :ref:`endpoint assignments`. // - endpoint.v3.ClusterLoadAssignment load_assignment = 33; + endpoint.v4alpha.ClusterLoadAssignment load_assignment = 33; // Optional :ref:`active health checking ` // configuration for the cluster. If no diff --git a/generated_api_shadow/envoy/config/core/v3/base.proto b/generated_api_shadow/envoy/config/core/v3/base.proto index 7ee8a922bec2f..8734bb9821a4b 100644 --- a/generated_api_shadow/envoy/config/core/v3/base.proto +++ b/generated_api_shadow/envoy/config/core/v3/base.proto @@ -223,8 +223,11 @@ message Metadata { // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. - map filter_metadata = 1; + map filter_metadata = 1 [deprecated = true]; + // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* + // namespace is reserved for Envoy's built-in filters. + // The value is encoded as google.protobuf.Any. map typed_filter_metadata = 2; } diff --git a/generated_api_shadow/envoy/config/core/v4alpha/base.proto b/generated_api_shadow/envoy/config/core/v4alpha/base.proto index 60a3912d3d8ef..706328bd9f7fe 100644 --- a/generated_api_shadow/envoy/config/core/v4alpha/base.proto +++ b/generated_api_shadow/envoy/config/core/v4alpha/base.proto @@ -70,7 +70,7 @@ message Locality { // Defines the local service zone where Envoy is running. Though optional, it // should be set if discovery service routing is used and the discovery - // service exposes :ref:`zone data `, + // service exposes :ref:`zone data `, // either in this message or via :option:`--service-zone`. The meaning of zone // is context dependent, e.g. `Availability Zone (AZ) // `_ @@ -224,8 +224,12 @@ message Metadata { // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. - map filter_metadata = 1; + map hidden_envoy_deprecated_filter_metadata = 1 + [deprecated = true]; + // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* + // namespace is reserved for Envoy's built-in filters. + // The value is encoded as google.protobuf.Any. map typed_filter_metadata = 2; } diff --git a/generated_api_shadow/envoy/config/core/v4alpha/health_check.proto b/generated_api_shadow/envoy/config/core/v4alpha/health_check.proto index 8d870680a466d..987793280857f 100644 --- a/generated_api_shadow/envoy/config/core/v4alpha/health_check.proto +++ b/generated_api_shadow/envoy/config/core/v4alpha/health_check.proto @@ -85,7 +85,7 @@ message HealthCheck { // The value of the host header in the HTTP health check request. If // left empty (default value), the name of the cluster this health check is associated // with will be used. The host header can be customized for a specific endpoint by setting the - // :ref:`hostname ` field. + // :ref:`hostname ` field. string host = 1 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; // Specifies the HTTP path that will be requested during health checking. For example @@ -170,7 +170,7 @@ message HealthCheck { // The value of the :authority header in the gRPC health check request. If // left empty (default value), the name of the cluster this health check is associated // with will be used. The authority header can be customized for a specific endpoint by setting - // the :ref:`hostname ` field. + // the :ref:`hostname ` field. string authority = 2 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; } @@ -359,7 +359,7 @@ message HealthCheck { // config: { ... } # tls socket configuration // // If this field is set, then for health checks it will supersede an entry of *envoy.transport_socket* in the - // :ref:`LbEndpoint.Metadata `. + // :ref:`LbEndpoint.Metadata `. // This allows using different transport socket capabilities for health checking versus proxying to the // endpoint. // diff --git a/generated_api_shadow/envoy/config/endpoint/v4alpha/BUILD b/generated_api_shadow/envoy/config/endpoint/v4alpha/BUILD new file mode 100644 index 0000000000000..79d52ad4cfbc6 --- /dev/null +++ b/generated_api_shadow/envoy/config/endpoint/v4alpha/BUILD @@ -0,0 +1,14 @@ +# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") + +licenses(["notice"]) # Apache 2 + +api_proto_package( + deps = [ + "//envoy/config/core/v4alpha:pkg", + "//envoy/config/endpoint/v3:pkg", + "//envoy/type/v3:pkg", + "@com_github_cncf_udpa//udpa/annotations:pkg", + ], +) diff --git a/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint.proto b/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint.proto new file mode 100644 index 0000000000000..0d4d4684d2c10 --- /dev/null +++ b/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint.proto @@ -0,0 +1,119 @@ +syntax = "proto3"; + +package envoy.config.endpoint.v4alpha; + +import "envoy/config/endpoint/v4alpha/endpoint_components.proto"; +import "envoy/type/v3/percent.proto"; + +import "google/protobuf/duration.proto"; +import "google/protobuf/wrappers.proto"; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; +option java_outer_classname = "EndpointProto"; +option java_multiple_files = true; +option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; + +// [#protodoc-title: Endpoint configuration] +// Endpoint discovery :ref:`architecture overview ` + +// Each route from RDS will map to a single cluster or traffic split across +// clusters using weights expressed in the RDS WeightedCluster. +// +// With EDS, each cluster is treated independently from a LB perspective, with +// LB taking place between the Localities within a cluster and at a finer +// granularity between the hosts within a locality. The percentage of traffic +// for each endpoint is determined by both its load_balancing_weight, and the +// load_balancing_weight of its locality. First, a locality will be selected, +// then an endpoint within that locality will be chose based on its weight. +// [#next-free-field: 6] +message ClusterLoadAssignment { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.ClusterLoadAssignment"; + + // Load balancing policy settings. + // [#next-free-field: 6] + message Policy { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.ClusterLoadAssignment.Policy"; + + // [#not-implemented-hide:] + message DropOverload { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload"; + + // Identifier for the policy specifying the drop. + string category = 1 [(validate.rules).string = {min_len: 1}]; + + // Percentage of traffic that should be dropped for the category. + type.v3.FractionalPercent drop_percentage = 2; + } + + reserved 1, 5; + + reserved "disable_overprovisioning"; + + // Action to trim the overall incoming traffic to protect the upstream + // hosts. This action allows protection in case the hosts are unable to + // recover from an outage, or unable to autoscale or unable to handle + // incoming traffic volume for any reason. + // + // At the client each category is applied one after the other to generate + // the 'actual' drop percentage on all outgoing traffic. For example: + // + // .. code-block:: json + // + // { "drop_overloads": [ + // { "category": "throttle", "drop_percentage": 60 } + // { "category": "lb", "drop_percentage": 50 } + // ]} + // + // The actual drop percentages applied to the traffic at the clients will be + // "throttle"_drop = 60% + // "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%. + // actual_outgoing_load = 20% // remaining after applying all categories. + // [#not-implemented-hide:] + repeated DropOverload drop_overloads = 2; + + // Priority levels and localities are considered overprovisioned with this + // factor (in percentage). This means that we don't consider a priority + // level or locality unhealthy until the fraction of healthy hosts + // multiplied by the overprovisioning factor drops below 100. + // With the default value 140(1.4), Envoy doesn't consider a priority level + // or a locality unhealthy until their percentage of healthy hosts drops + // below 72%. For example: + // + // .. code-block:: json + // + // { "overprovisioning_factor": 100 } + // + // Read more at :ref:`priority levels ` and + // :ref:`localities `. + google.protobuf.UInt32Value overprovisioning_factor = 3 [(validate.rules).uint32 = {gt: 0}]; + + // The max time until which the endpoints from this assignment can be used. + // If no new assignments are received before this time expires the endpoints + // are considered stale and should be marked unhealthy. + // Defaults to 0 which means endpoints never go stale. + google.protobuf.Duration endpoint_stale_after = 4 [(validate.rules).duration = {gt {}}]; + } + + // Name of the cluster. This will be the :ref:`service_name + // ` value if specified + // in the cluster :ref:`EdsClusterConfig + // `. + string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; + + // List of endpoints to load balance to. + repeated LocalityLbEndpoints endpoints = 2; + + // Map of named endpoints that can be referenced in LocalityLbEndpoints. + // [#not-implemented-hide:] + map named_endpoints = 5; + + // Load balancing policy settings. + Policy policy = 4; +} diff --git a/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint_components.proto b/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint_components.proto new file mode 100644 index 0000000000000..246d569d28464 --- /dev/null +++ b/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint_components.proto @@ -0,0 +1,158 @@ +syntax = "proto3"; + +package envoy.config.endpoint.v4alpha; + +import "envoy/config/core/v4alpha/address.proto"; +import "envoy/config/core/v4alpha/base.proto"; +import "envoy/config/core/v4alpha/health_check.proto"; + +import "google/protobuf/wrappers.proto"; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; +option java_outer_classname = "EndpointComponentsProto"; +option java_multiple_files = true; +option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; + +// [#protodoc-title: Endpoints] + +// Upstream host identifier. +message Endpoint { + option (udpa.annotations.versioning).previous_message_type = "envoy.config.endpoint.v3.Endpoint"; + + // The optional health check configuration. + message HealthCheckConfig { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.Endpoint.HealthCheckConfig"; + + // Optional alternative health check port value. + // + // By default the health check address port of an upstream host is the same + // as the host's serving address port. This provides an alternative health + // check port. Setting this with a non-zero value allows an upstream host + // to have different health check address port. + uint32 port_value = 1 [(validate.rules).uint32 = {lte: 65535}]; + + // By default, the host header for L7 health checks is controlled by cluster level configuration + // (see: :ref:`host ` and + // :ref:`authority `). Setting this + // to a non-empty value allows overriding the cluster level configuration for a specific + // endpoint. + string hostname = 2; + } + + // The upstream host address. + // + // .. attention:: + // + // The form of host address depends on the given cluster type. For STATIC or EDS, + // it is expected to be a direct IP address (or something resolvable by the + // specified :ref:`resolver ` + // in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname, + // and will be resolved via DNS. + core.v4alpha.Address address = 1; + + // The optional health check configuration is used as configuration for the + // health checker to contact the health checked host. + // + // .. attention:: + // + // This takes into effect only for upstream clusters with + // :ref:`active health checking ` enabled. + HealthCheckConfig health_check_config = 2; + + // The hostname associated with this endpoint. This hostname is not used for routing or address + // resolution. If provided, it will be associated with the endpoint, and can be used for features + // that require a hostname, like + // :ref:`auto_host_rewrite `. + string hostname = 3; +} + +// An Endpoint that Envoy can route traffic to. +// [#next-free-field: 6] +message LbEndpoint { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.LbEndpoint"; + + // Upstream host identifier or a named reference. + oneof host_identifier { + Endpoint endpoint = 1; + + // [#not-implemented-hide:] + string endpoint_name = 5; + } + + // Optional health status when known and supplied by EDS server. + core.v4alpha.HealthStatus health_status = 2; + + // The endpoint metadata specifies values that may be used by the load + // balancer to select endpoints in a cluster for a given request. The filter + // name should be specified as *envoy.lb*. An example boolean key-value pair + // is *canary*, providing the optional canary status of the upstream host. + // This may be matched against in a route's + // :ref:`RouteAction ` metadata_match field + // to subset the endpoints considered in cluster load balancing. + core.v4alpha.Metadata metadata = 3; + + // The optional load balancing weight of the upstream host; at least 1. + // Envoy uses the load balancing weight in some of the built in load + // balancers. The load balancing weight for an endpoint is divided by the sum + // of the weights of all endpoints in the endpoint's locality to produce a + // percentage of traffic for the endpoint. This percentage is then further + // weighted by the endpoint's locality's load balancing weight from + // LocalityLbEndpoints. If unspecified, each host is presumed to have equal + // weight in a locality. The sum of the weights of all endpoints in the + // endpoint's locality must not exceed uint32_t maximal value (4294967295). + google.protobuf.UInt32Value load_balancing_weight = 4 [(validate.rules).uint32 = {gte: 1}]; +} + +// A group of endpoints belonging to a Locality. +// One can have multiple LocalityLbEndpoints for a locality, but this is +// generally only done if the different groups need to have different load +// balancing weights or different priorities. +// [#next-free-field: 7] +message LocalityLbEndpoints { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.LocalityLbEndpoints"; + + // Identifies location of where the upstream hosts run. + core.v4alpha.Locality locality = 1; + + // The group of endpoints belonging to the locality specified. + repeated LbEndpoint lb_endpoints = 2; + + // Optional: Per priority/region/zone/sub_zone weight; at least 1. The load + // balancing weight for a locality is divided by the sum of the weights of all + // localities at the same priority level to produce the effective percentage + // of traffic for the locality. The sum of the weights of all localities at + // the same priority level must not exceed uint32_t maximal value (4294967295). + // + // Locality weights are only considered when :ref:`locality weighted load + // balancing ` is + // configured. These weights are ignored otherwise. If no weights are + // specified when locality weighted load balancing is enabled, the locality is + // assigned no load. + google.protobuf.UInt32Value load_balancing_weight = 3 [(validate.rules).uint32 = {gte: 1}]; + + // Optional: the priority for this LocalityLbEndpoints. If unspecified this will + // default to the highest priority (0). + // + // Under usual circumstances, Envoy will only select endpoints for the highest + // priority (0). In the event all endpoints for a particular priority are + // unavailable/unhealthy, Envoy will fail over to selecting endpoints for the + // next highest priority group. + // + // Priorities should range from 0 (highest) to N (lowest) without skipping. + uint32 priority = 5 [(validate.rules).uint32 = {lte: 128}]; + + // Optional: Per locality proximity value which indicates how close this + // locality is from the source locality. This value only provides ordering + // information (lower the value, closer it is to the source locality). + // This will be consumed by load balancing schemes that need proximity order + // to determine where to route the requests. + // [#not-implemented-hide:] + google.protobuf.UInt32Value proximity = 6; +} diff --git a/generated_api_shadow/envoy/config/endpoint/v4alpha/load_report.proto b/generated_api_shadow/envoy/config/endpoint/v4alpha/load_report.proto new file mode 100644 index 0000000000000..80be59041d742 --- /dev/null +++ b/generated_api_shadow/envoy/config/endpoint/v4alpha/load_report.proto @@ -0,0 +1,168 @@ +syntax = "proto3"; + +package envoy.config.endpoint.v4alpha; + +import "envoy/config/core/v4alpha/address.proto"; +import "envoy/config/core/v4alpha/base.proto"; + +import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; +option java_outer_classname = "LoadReportProto"; +option java_multiple_files = true; +option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; + +// [#protodoc-title: Load Report] + +// These are stats Envoy reports to the management server at a frequency defined by +// :ref:`LoadStatsResponse.load_reporting_interval`. +// Stats per upstream region/zone and optionally per subzone. +// [#next-free-field: 9] +message UpstreamLocalityStats { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.UpstreamLocalityStats"; + + // Name of zone, region and optionally endpoint group these metrics were + // collected from. Zone and region names could be empty if unknown. + core.v4alpha.Locality locality = 1; + + // The total number of requests successfully completed by the endpoints in the + // locality. + 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, + // aggregated over all endpoints in the locality. + uint64 total_error_requests = 4; + + // The total number of requests that were issued by this Envoy since + // the last report. This information is aggregated over all the + // upstream endpoints in the locality. + uint64 total_issued_requests = 8; + + // Stats for multi-dimensional load balancing. + repeated EndpointLoadMetricStats load_metric_stats = 5; + + // Endpoint granularity stats information for this locality. This information + // is populated if the Server requests it by setting + // :ref:`LoadStatsResponse.report_endpoint_granularity`. + repeated UpstreamEndpointStats upstream_endpoint_stats = 7; + + // [#not-implemented-hide:] The priority of the endpoint group these metrics + // were collected from. + uint32 priority = 6; +} + +// [#next-free-field: 8] +message UpstreamEndpointStats { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.UpstreamEndpointStats"; + + // Upstream host address. + core.v4alpha.Address address = 1; + + // Opaque and implementation dependent metadata of the + // endpoint. Envoy will pass this directly to the management server. + google.protobuf.Struct metadata = 6; + + // 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 successfully. 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 for this endpoint. + 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; + + // The total number of requests that were issued to this endpoint + // since the last report. A single TCP connection, HTTP or gRPC + // request or stream is counted as one request. + uint64 total_issued_requests = 7; + + // Stats for multi-dimensional load balancing. + repeated EndpointLoadMetricStats load_metric_stats = 5; +} + +message EndpointLoadMetricStats { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.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` +// Next ID: 7 +// [#next-free-field: 7] +message ClusterStats { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.ClusterStats"; + + message DroppedRequests { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.ClusterStats.DroppedRequests"; + + // Identifier for the policy specifying the drop. + string category = 1 [(validate.rules).string = {min_len: 1}]; + + // Total number of deliberately dropped requests for the category. + uint64 dropped_count = 2; + } + + // The name of the cluster. + string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; + + // The eds_cluster_config service_name of the cluster. + // It's possible that two clusters send the same service_name to EDS, + // in that case, the management server is supposed to do aggregation on the load reports. + string cluster_service_name = 6; + + // 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 total number of dropped requests. This covers requests + // deliberately dropped by the drop_overload policy and circuit breaking. + uint64 total_dropped_requests = 3; + + // Information about deliberately dropped requests for each category specified + // in the DropOverload policy. + repeated DroppedRequests dropped_requests = 5; + + // Period over which the actual load report occurred. This will be guaranteed to include every + // request reported. Due to system load and delays between the *LoadStatsRequest* sent from Envoy + // and the *LoadStatsResponse* message sent from the management server, this may be longer than + // the requested load reporting interval in the *LoadStatsResponse*. + google.protobuf.Duration load_report_interval = 4; +} diff --git a/generated_api_shadow/envoy/data/accesslog/v4alpha/BUILD b/generated_api_shadow/envoy/data/accesslog/v4alpha/BUILD new file mode 100644 index 0000000000000..c02cec9d67f6c --- /dev/null +++ b/generated_api_shadow/envoy/data/accesslog/v4alpha/BUILD @@ -0,0 +1,13 @@ +# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") + +licenses(["notice"]) # Apache 2 + +api_proto_package( + deps = [ + "//envoy/config/core/v4alpha:pkg", + "//envoy/data/accesslog/v3:pkg", + "@com_github_cncf_udpa//udpa/annotations:pkg", + ], +) diff --git a/generated_api_shadow/envoy/data/accesslog/v4alpha/accesslog.proto b/generated_api_shadow/envoy/data/accesslog/v4alpha/accesslog.proto new file mode 100644 index 0000000000000..1845017200266 --- /dev/null +++ b/generated_api_shadow/envoy/data/accesslog/v4alpha/accesslog.proto @@ -0,0 +1,425 @@ +syntax = "proto3"; + +package envoy.data.accesslog.v4alpha; + +import "envoy/config/core/v4alpha/address.proto"; +import "envoy/config/core/v4alpha/base.proto"; + +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.data.accesslog.v4alpha"; +option java_outer_classname = "AccesslogProto"; +option java_multiple_files = true; +option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; + +// [#protodoc-title: gRPC access logs] +// Envoy access logs describe incoming interaction with Envoy over a fixed +// period of time, and typically cover a single request/response exchange, +// (e.g. HTTP), stream (e.g. over HTTP/gRPC), or proxied connection (e.g. TCP). +// Access logs contain fields defined in protocol-specific protobuf messages. +// +// Except where explicitly declared otherwise, all fields describe +// *downstream* interaction between Envoy and a connected client. +// Fields describing *upstream* interaction will explicitly include ``upstream`` +// in their name. + +message TCPAccessLogEntry { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.TCPAccessLogEntry"; + + // Common properties shared by all Envoy access logs. + AccessLogCommon common_properties = 1; + + // Properties of the TCP connection. + ConnectionProperties connection_properties = 2; +} + +message HTTPAccessLogEntry { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.HTTPAccessLogEntry"; + + // HTTP version + enum HTTPVersion { + PROTOCOL_UNSPECIFIED = 0; + HTTP10 = 1; + HTTP11 = 2; + HTTP2 = 3; + HTTP3 = 4; + } + + // Common properties shared by all Envoy access logs. + AccessLogCommon common_properties = 1; + + HTTPVersion protocol_version = 2; + + // Description of the incoming HTTP request. + HTTPRequestProperties request = 3; + + // Description of the outgoing HTTP response. + HTTPResponseProperties response = 4; +} + +// Defines fields for a connection +message ConnectionProperties { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.ConnectionProperties"; + + // Number of bytes received from downstream. + uint64 received_bytes = 1; + + // Number of bytes sent to downstream. + uint64 sent_bytes = 2; +} + +// Defines fields that are shared by all Envoy access logs. +// [#next-free-field: 22] +message AccessLogCommon { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.AccessLogCommon"; + + // [#not-implemented-hide:] + // This field indicates the rate at which this log entry was sampled. + // Valid range is (0.0, 1.0]. + double sample_rate = 1 [(validate.rules).double = {lte: 1.0 gt: 0.0}]; + + // This field is the remote/origin address on which the request from the user was received. + // Note: This may not be the physical peer. E.g, if the remote address is inferred from for + // example the x-forwarder-for header, proxy protocol, etc. + config.core.v4alpha.Address downstream_remote_address = 2; + + // This field is the local/destination address on which the request from the user was received. + config.core.v4alpha.Address downstream_local_address = 3; + + // If the connection is secure,S this field will contain TLS properties. + TLSProperties tls_properties = 4; + + // The time that Envoy started servicing this request. This is effectively the time that the first + // downstream byte is received. + google.protobuf.Timestamp start_time = 5; + + // Interval between the first downstream byte received and the last + // downstream byte received (i.e. time it takes to receive a request). + google.protobuf.Duration time_to_last_rx_byte = 6; + + // Interval between the first downstream byte received and the first upstream byte sent. There may + // by considerable delta between *time_to_last_rx_byte* and this value due to filters. + // Additionally, the same caveats apply as documented in *time_to_last_downstream_tx_byte* about + // not accounting for kernel socket buffer time, etc. + google.protobuf.Duration time_to_first_upstream_tx_byte = 7; + + // Interval between the first downstream byte received and the last upstream byte sent. There may + // by considerable delta between *time_to_last_rx_byte* and this value due to filters. + // Additionally, the same caveats apply as documented in *time_to_last_downstream_tx_byte* about + // not accounting for kernel socket buffer time, etc. + google.protobuf.Duration time_to_last_upstream_tx_byte = 8; + + // Interval between the first downstream byte received and the first upstream + // byte received (i.e. time it takes to start receiving a response). + google.protobuf.Duration time_to_first_upstream_rx_byte = 9; + + // Interval between the first downstream byte received and the last upstream + // byte received (i.e. time it takes to receive a complete response). + google.protobuf.Duration time_to_last_upstream_rx_byte = 10; + + // Interval between the first downstream byte received and the first downstream byte sent. + // There may be a considerable delta between the *time_to_first_upstream_rx_byte* and this field + // due to filters. Additionally, the same caveats apply as documented in + // *time_to_last_downstream_tx_byte* about not accounting for kernel socket buffer time, etc. + google.protobuf.Duration time_to_first_downstream_tx_byte = 11; + + // Interval between the first downstream byte received and the last downstream byte sent. + // Depending on protocol, buffering, windowing, filters, etc. there may be a considerable delta + // between *time_to_last_upstream_rx_byte* and this field. Note also that this is an approximate + // time. In the current implementation it does not include kernel socket buffer time. In the + // current implementation it also does not include send window buffering inside the HTTP/2 codec. + // In the future it is likely that work will be done to make this duration more accurate. + google.protobuf.Duration time_to_last_downstream_tx_byte = 12; + + // The upstream remote/destination address that handles this exchange. This does not include + // retries. + config.core.v4alpha.Address upstream_remote_address = 13; + + // The upstream local/origin address that handles this exchange. This does not include retries. + config.core.v4alpha.Address upstream_local_address = 14; + + // The upstream cluster that *upstream_remote_address* belongs to. + string upstream_cluster = 15; + + // Flags indicating occurrences during request/response processing. + ResponseFlags response_flags = 16; + + // All metadata encountered during request processing, including endpoint + // selection. + // + // This can be used to associate IDs attached to the various configurations + // used to process this request with the access log entry. For example, a + // route created from a higher level forwarding rule with some ID can place + // that ID in this field and cross reference later. It can also be used to + // determine if a canary endpoint was used or not. + config.core.v4alpha.Metadata metadata = 17; + + // If upstream connection failed due to transport socket (e.g. TLS handshake), provides the + // failure reason from the transport socket. The format of this field depends on the configured + // upstream transport socket. Common TLS failures are in + // :ref:`TLS trouble shooting `. + string upstream_transport_failure_reason = 18; + + // The name of the route + string route_name = 19; + + // This field is the downstream direct remote address on which the request from the user was + // received. Note: This is always the physical peer, even if the remote address is inferred from + // for example the x-forwarder-for header, proxy protocol, etc. + config.core.v4alpha.Address downstream_direct_remote_address = 20; + + // Map of filter state in stream info that have been configured to be logged. If the filter + // state serialized to any message other than `google.protobuf.Any` it will be packed into + // `google.protobuf.Any`. + map filter_state_objects = 21; +} + +// Flags indicating occurrences during request/response processing. +// [#next-free-field: 24] +message ResponseFlags { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.ResponseFlags"; + + message Unauthorized { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.ResponseFlags.Unauthorized"; + + // Reasons why the request was unauthorized + enum Reason { + REASON_UNSPECIFIED = 0; + + // The request was denied by the external authorization service. + EXTERNAL_SERVICE = 1; + } + + Reason reason = 1; + } + + // Indicates local server healthcheck failed. + bool failed_local_healthcheck = 1; + + // Indicates there was no healthy upstream. + bool no_healthy_upstream = 2; + + // Indicates an there was an upstream request timeout. + bool upstream_request_timeout = 3; + + // Indicates local codec level reset was sent on the stream. + bool local_reset = 4; + + // Indicates remote codec level reset was received on the stream. + bool upstream_remote_reset = 5; + + // Indicates there was a local reset by a connection pool due to an initial connection failure. + bool upstream_connection_failure = 6; + + // Indicates the stream was reset due to an upstream connection termination. + bool upstream_connection_termination = 7; + + // Indicates the stream was reset because of a resource overflow. + bool upstream_overflow = 8; + + // Indicates no route was found for the request. + bool no_route_found = 9; + + // Indicates that the request was delayed before proxying. + bool delay_injected = 10; + + // Indicates that the request was aborted with an injected error code. + bool fault_injected = 11; + + // Indicates that the request was rate-limited locally. + bool rate_limited = 12; + + // Indicates if the request was deemed unauthorized and the reason for it. + Unauthorized unauthorized_details = 13; + + // Indicates that the request was rejected because there was an error in rate limit service. + bool rate_limit_service_error = 14; + + // Indicates the stream was reset due to a downstream connection termination. + bool downstream_connection_termination = 15; + + // Indicates that the upstream retry limit was exceeded, resulting in a downstream error. + bool upstream_retry_limit_exceeded = 16; + + // Indicates that the stream idle timeout was hit, resulting in a downstream 408. + bool stream_idle_timeout = 17; + + // Indicates that the request was rejected because an envoy request header failed strict + // validation. + bool invalid_envoy_request_headers = 18; + + // Indicates there was an HTTP protocol error on the downstream request. + bool downstream_protocol_error = 19; + + // Indicates there was a max stream duration reached on the upstream request. + bool upstream_max_stream_duration_reached = 20; + + // Indicates the response was served from a cache filter. + bool response_from_cache_filter = 21; + + // Indicates that a filter configuration is not available. + bool no_filter_config_found = 22; + + // Indicates that request or connection exceeded the downstream connection duration. + bool duration_timeout = 23; +} + +// Properties of a negotiated TLS connection. +// [#next-free-field: 7] +message TLSProperties { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.TLSProperties"; + + enum TLSVersion { + VERSION_UNSPECIFIED = 0; + TLSv1 = 1; + TLSv1_1 = 2; + TLSv1_2 = 3; + TLSv1_3 = 4; + } + + message CertificateProperties { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.TLSProperties.CertificateProperties"; + + message SubjectAltName { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.TLSProperties.CertificateProperties.SubjectAltName"; + + oneof san { + string uri = 1; + + // [#not-implemented-hide:] + string dns = 2; + } + } + + // SANs present in the certificate. + repeated SubjectAltName subject_alt_name = 1; + + // The subject field of the certificate. + string subject = 2; + } + + // Version of TLS that was negotiated. + TLSVersion tls_version = 1; + + // TLS cipher suite negotiated during handshake. The value is a + // four-digit hex code defined by the IANA TLS Cipher Suite Registry + // (e.g. ``009C`` for ``TLS_RSA_WITH_AES_128_GCM_SHA256``). + // + // Here it is expressed as an integer. + google.protobuf.UInt32Value tls_cipher_suite = 2; + + // SNI hostname from handshake. + string tls_sni_hostname = 3; + + // Properties of the local certificate used to negotiate TLS. + CertificateProperties local_certificate_properties = 4; + + // Properties of the peer certificate used to negotiate TLS. + CertificateProperties peer_certificate_properties = 5; + + // The TLS session ID. + string tls_session_id = 6; +} + +// [#next-free-field: 14] +message HTTPRequestProperties { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.HTTPRequestProperties"; + + // The request method (RFC 7231/2616). + config.core.v4alpha.RequestMethod request_method = 1 + [(validate.rules).enum = {defined_only: true}]; + + // The scheme portion of the incoming request URI. + string scheme = 2; + + // HTTP/2 ``:authority`` or HTTP/1.1 ``Host`` header value. + string authority = 3; + + // The port of the incoming request URI + // (unused currently, as port is composed onto authority). + google.protobuf.UInt32Value port = 4; + + // The path portion from the incoming request URI. + string path = 5; + + // Value of the ``User-Agent`` request header. + string user_agent = 6; + + // Value of the ``Referer`` request header. + string referer = 7; + + // Value of the ``X-Forwarded-For`` request header. + string forwarded_for = 8; + + // Value of the ``X-Request-Id`` request header + // + // This header is used by Envoy to uniquely identify a request. + // It will be generated for all external requests and internal requests that + // do not already have a request ID. + string request_id = 9; + + // Value of the ``X-Envoy-Original-Path`` request header. + string original_path = 10; + + // Size of the HTTP request headers in bytes. + // + // This value is captured from the OSI layer 7 perspective, i.e. it does not + // include overhead from framing or encoding at other networking layers. + uint64 request_headers_bytes = 11; + + // Size of the HTTP request body in bytes. + // + // This value is captured from the OSI layer 7 perspective, i.e. it does not + // include overhead from framing or encoding at other networking layers. + uint64 request_body_bytes = 12; + + // Map of additional headers that have been configured to be logged. + map request_headers = 13; +} + +// [#next-free-field: 7] +message HTTPResponseProperties { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.HTTPResponseProperties"; + + // The HTTP response code returned by Envoy. + google.protobuf.UInt32Value response_code = 1; + + // Size of the HTTP response headers in bytes. + // + // This value is captured from the OSI layer 7 perspective, i.e. it does not + // include overhead from framing or encoding at other networking layers. + uint64 response_headers_bytes = 2; + + // Size of the HTTP response body in bytes. + // + // This value is captured from the OSI layer 7 perspective, i.e. it does not + // include overhead from framing or encoding at other networking layers. + uint64 response_body_bytes = 3; + + // Map of additional headers configured to be logged. + map response_headers = 4; + + // Map of trailers configured to be logged. + map response_trailers = 5; + + // The HTTP response code details. + string response_code_details = 6; +} diff --git a/generated_api_shadow/envoy/extensions/access_loggers/grpc/v4alpha/als.proto b/generated_api_shadow/envoy/extensions/access_loggers/grpc/v4alpha/als.proto index c7bf15948b231..9605a05c4128c 100644 --- a/generated_api_shadow/envoy/extensions/access_loggers/grpc/v4alpha/als.proto +++ b/generated_api_shadow/envoy/extensions/access_loggers/grpc/v4alpha/als.proto @@ -31,15 +31,15 @@ message HttpGrpcAccessLogConfig { CommonGrpcAccessLogConfig common_config = 1 [(validate.rules).message = {required: true}]; // Additional request headers to log in :ref:`HTTPRequestProperties.request_headers - // `. + // `. repeated string additional_request_headers_to_log = 2; // Additional response headers to log in :ref:`HTTPResponseProperties.response_headers - // `. + // `. repeated string additional_response_headers_to_log = 3; // Additional response trailers to log in :ref:`HTTPResponseProperties.response_trailers - // `. + // `. repeated string additional_response_trailers_to_log = 4; } @@ -83,7 +83,7 @@ message CommonGrpcAccessLogConfig { google.protobuf.UInt32Value buffer_size_bytes = 4; // Additional filter state objects to log in :ref:`filter_state_objects - // `. + // `. // Logger will call `FilterState::Object::serializeAsProto` to serialize the filter state object. repeated string filter_state_objects_to_log = 5; } diff --git a/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD b/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD new file mode 100644 index 0000000000000..df5de314366ab --- /dev/null +++ b/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD @@ -0,0 +1,13 @@ +# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") + +licenses(["notice"]) # Apache 2 + +api_proto_package( + deps = [ + "//envoy/config/core/v4alpha:pkg", + "//envoy/extensions/retry/host/omit_host_metadata/v3:pkg", + "@com_github_cncf_udpa//udpa/annotations:pkg", + ], +) diff --git a/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto b/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto new file mode 100644 index 0000000000000..043d5ce3cfa06 --- /dev/null +++ b/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +package envoy.extensions.retry.host.omit_host_metadata.v4alpha; + +import "envoy/config/core/v4alpha/base.proto"; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.retry.host.omit_host_metadata.v4alpha"; +option java_outer_classname = "OmitHostMetadataConfigProto"; +option java_multiple_files = true; +option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; + +// [#protodoc-title: Omit host metadata retry predicate] + +// A retry host predicate that can be used to reject a host based on +// predefined metadata match criteria. +// [#extension: envoy.retry_host_predicates.omit_host_metadata] +message OmitHostMetadataConfig { + option (udpa.annotations.versioning).previous_message_type = + "envoy.extensions.retry.host.omit_host_metadata.v3.OmitHostMetadataConfig"; + + // Retry host predicate metadata match criteria. The hosts in + // the upstream cluster with matching metadata will be omitted while + // attempting a retry of a failed request. The metadata should be specified + // under the *envoy.lb* key. + config.core.v4alpha.Metadata metadata_match = 1; +} diff --git a/generated_api_shadow/envoy/service/accesslog/v4alpha/BUILD b/generated_api_shadow/envoy/service/accesslog/v4alpha/BUILD index 94c70bc66967b..ef86c64ac7e5f 100644 --- a/generated_api_shadow/envoy/service/accesslog/v4alpha/BUILD +++ b/generated_api_shadow/envoy/service/accesslog/v4alpha/BUILD @@ -8,7 +8,7 @@ api_proto_package( has_services = True, deps = [ "//envoy/config/core/v4alpha:pkg", - "//envoy/data/accesslog/v3:pkg", + "//envoy/data/accesslog/v4alpha:pkg", "//envoy/service/accesslog/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/generated_api_shadow/envoy/service/accesslog/v4alpha/als.proto b/generated_api_shadow/envoy/service/accesslog/v4alpha/als.proto index e2c8bbbc80689..3ce1008ec48fb 100644 --- a/generated_api_shadow/envoy/service/accesslog/v4alpha/als.proto +++ b/generated_api_shadow/envoy/service/accesslog/v4alpha/als.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package envoy.service.accesslog.v4alpha; import "envoy/config/core/v4alpha/base.proto"; -import "envoy/data/accesslog/v3/accesslog.proto"; +import "envoy/data/accesslog/v4alpha/accesslog.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; @@ -58,7 +58,7 @@ message StreamAccessLogsMessage { option (udpa.annotations.versioning).previous_message_type = "envoy.service.accesslog.v3.StreamAccessLogsMessage.HTTPAccessLogEntries"; - repeated data.accesslog.v3.HTTPAccessLogEntry log_entry = 1 + repeated data.accesslog.v4alpha.HTTPAccessLogEntry log_entry = 1 [(validate.rules).repeated = {min_items: 1}]; } @@ -67,7 +67,7 @@ message StreamAccessLogsMessage { option (udpa.annotations.versioning).previous_message_type = "envoy.service.accesslog.v3.StreamAccessLogsMessage.TCPAccessLogEntries"; - repeated data.accesslog.v3.TCPAccessLogEntry log_entry = 1 + repeated data.accesslog.v4alpha.TCPAccessLogEntry log_entry = 1 [(validate.rules).repeated = {min_items: 1}]; } diff --git a/generated_api_shadow/envoy/service/health/v4alpha/BUILD b/generated_api_shadow/envoy/service/health/v4alpha/BUILD index 60bd19511855e..ed1ef41e94009 100644 --- a/generated_api_shadow/envoy/service/health/v4alpha/BUILD +++ b/generated_api_shadow/envoy/service/health/v4alpha/BUILD @@ -9,7 +9,7 @@ api_proto_package( deps = [ "//envoy/config/cluster/v4alpha:pkg", "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v3:pkg", + "//envoy/config/endpoint/v4alpha:pkg", "//envoy/service/health/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/generated_api_shadow/envoy/service/health/v4alpha/hds.proto b/generated_api_shadow/envoy/service/health/v4alpha/hds.proto index 8fb671161fd6c..b3334878b9d99 100644 --- a/generated_api_shadow/envoy/service/health/v4alpha/hds.proto +++ b/generated_api_shadow/envoy/service/health/v4alpha/hds.proto @@ -5,7 +5,7 @@ package envoy.service.health.v4alpha; import "envoy/config/cluster/v4alpha/cluster.proto"; import "envoy/config/core/v4alpha/base.proto"; import "envoy/config/core/v4alpha/health_check.proto"; -import "envoy/config/endpoint/v3/endpoint_components.proto"; +import "envoy/config/endpoint/v4alpha/endpoint_components.proto"; import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; @@ -103,7 +103,7 @@ message EndpointHealth { option (udpa.annotations.versioning).previous_message_type = "envoy.service.health.v3.EndpointHealth"; - config.endpoint.v3.Endpoint endpoint = 1; + config.endpoint.v4alpha.Endpoint endpoint = 1; config.core.v4alpha.HealthStatus health_status = 2; } @@ -157,7 +157,7 @@ message LocalityEndpoints { config.core.v4alpha.Locality locality = 1; - repeated config.endpoint.v3.Endpoint endpoints = 2; + repeated config.endpoint.v4alpha.Endpoint endpoints = 2; } // The cluster name and locality is provided to Envoy for the endpoints that it diff --git a/generated_api_shadow/envoy/service/load_stats/v4alpha/BUILD b/generated_api_shadow/envoy/service/load_stats/v4alpha/BUILD index 91d914645041b..870673013a0e6 100644 --- a/generated_api_shadow/envoy/service/load_stats/v4alpha/BUILD +++ b/generated_api_shadow/envoy/service/load_stats/v4alpha/BUILD @@ -8,7 +8,7 @@ api_proto_package( has_services = True, deps = [ "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v3:pkg", + "//envoy/config/endpoint/v4alpha:pkg", "//envoy/service/load_stats/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/generated_api_shadow/envoy/service/load_stats/v4alpha/lrs.proto b/generated_api_shadow/envoy/service/load_stats/v4alpha/lrs.proto index 69eb3d707d5e1..344a4ef1094a7 100644 --- a/generated_api_shadow/envoy/service/load_stats/v4alpha/lrs.proto +++ b/generated_api_shadow/envoy/service/load_stats/v4alpha/lrs.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package envoy.service.load_stats.v4alpha; import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/endpoint/v3/load_report.proto"; +import "envoy/config/endpoint/v4alpha/load_report.proto"; import "google/protobuf/duration.proto"; @@ -68,7 +68,7 @@ message LoadStatsRequest { config.core.v4alpha.Node node = 1; // A list of load stats to report. - repeated config.endpoint.v3.ClusterStats cluster_stats = 2; + repeated config.endpoint.v4alpha.ClusterStats cluster_stats = 2; } // The management server sends envoy a LoadStatsResponse with all clusters it diff --git a/include/envoy/config/typed_metadata.h b/include/envoy/config/typed_metadata.h index 285b10a11a127..f566d27666766 100644 --- a/include/envoy/config/typed_metadata.h +++ b/include/envoy/config/typed_metadata.h @@ -56,7 +56,8 @@ class TypedMetadataFactory : public UntypedFactory { ~TypedMetadataFactory() override = default; /** - * Convert the google.protobuf.Struct into an instance of TypedMetadata::Object. + * Convert the google.protobuf.Struct or google.protobuf.Any + * into an instance of TypedMetadata::Object. * It should throw an EnvoyException in case the conversion can't be completed. * @param data config data stored as a protobuf struct. * @return a derived class object pointer of TypedMetadata. @@ -65,15 +66,8 @@ class TypedMetadataFactory : public UntypedFactory { virtual std::unique_ptr parse(const ProtobufWkt::Struct& data) const PURE; - // Subclass has to override and implement this function so that Envoy will be - // able to parse and use `typed_filter_metadata` field. Otherwise, - // `typed_filter_metadata` will be ignored. - // This is not pure virtual because we do not want to break any existing - // subclasses, who have not yet had a override on this function. - virtual std::unique_ptr parse(const ProtobufWkt::Any& data) const { - (void)data; // avoid the unused parameter error - return nullptr; - } + virtual std::unique_ptr + parse(const ProtobufWkt::Any& data) const PURE; std::string category() const override { return "envoy.typed_metadata"; } }; diff --git a/source/common/config/metadata.h b/source/common/config/metadata.h index 8b6a523953823..745688ef94a66 100644 --- a/source/common/config/metadata.h +++ b/source/common/config/metadata.h @@ -120,15 +120,20 @@ template class TypedMetadataImpl : public TypedMetadata for (const auto& [factory_name, factory] : Registry::FactoryRegistry::factories()) { const auto& typed_meta_iter = typed_data_by_key.find(factory_name); - // Struct is deprecated in favor of Any. + // If the key exists in Any metadata, and parse() not return nullptr, + // populate data_. if (typed_meta_iter != typed_data_by_key.end()) { - data_[factory->name()] = factory->parse(typed_meta_iter->second); - } else { - const auto& meta_iter = data_by_key.find(factory_name); - if (meta_iter != data_by_key.end()) { - data_[factory->name()] = factory->parse(meta_iter->second); + auto result = factory->parse(typed_meta_iter->second); + if (result != nullptr) { + data_[factory->name()] = std::move(result); + continue; } } + // Fall back cases to parsing Struct metadata and populate data_. + const auto& meta_iter = data_by_key.find(factory_name); + if (meta_iter != data_by_key.end()) { + data_[factory->name()] = factory->parse(meta_iter->second); + } } } diff --git a/test/common/config/metadata_test.cc b/test/common/config/metadata_test.cc index 17b93e7263e8d..a7465b599448f 100644 --- a/test/common/config/metadata_test.cc +++ b/test/common/config/metadata_test.cc @@ -49,117 +49,170 @@ TEST(MetadataTest, MetadataValuePath) { ProtobufWkt::Value::KindCase::KIND_NOT_SET); } -// Test case for typed metadata: original Any data in metadata field -TEST(MetadataTest, OriginalTypedMetadataValue) { - // create an any data and set its type_url and value - ProtobufWkt::Any any; - any.set_type_url("type.googleapis.com/foo"); - any.set_value("bar"); - - // Put the data into metadata typed_filter_metadata field with the key : baz. - envoy::config::core::v3::Metadata metadata; - (*(metadata.mutable_typed_filter_metadata()))["baz"] = any; - - // Verify the data is setup correctly in the metadata - EXPECT_EQ(metadata.typed_filter_metadata().find("test"), metadata.typed_filter_metadata().end()); - EXPECT_NE(metadata.typed_filter_metadata().find("baz"), metadata.typed_filter_metadata().end()); - EXPECT_EQ((*(metadata.mutable_typed_filter_metadata()))["baz"].type_url(), - "type.googleapis.com/foo"); - EXPECT_EQ((*(metadata.mutable_typed_filter_metadata()))["baz"].value(), "bar"); -} - -// Test case for typed metadata: Pack the Any data in metadata field -TEST(MetadataTest, PackedTypedMetadataValue) { - // create an any_source data and set its type_url and value - ProtobufWkt::Any any_source; - any_source.set_type_url("type.googleapis.com/foo"); - any_source.set_value("bar"); - - // Pack this any_source data into metadata typed_filter_metadata - // field with the key : baz. - envoy::config::core::v3::Metadata metadata; - (*(metadata.mutable_typed_filter_metadata()))["baz"].PackFrom(any_source); - - // Verify the data is setup correctly in the metadata - EXPECT_EQ(metadata.typed_filter_metadata().find("test"), metadata.typed_filter_metadata().end()); - EXPECT_NE(metadata.typed_filter_metadata().find("baz"), metadata.typed_filter_metadata().end()); - EXPECT_EQ((*(metadata.mutable_typed_filter_metadata()))["baz"].ShortDebugString(), - "[type.googleapis.com/google.protobuf.Any] { type_url: \"type.googleapis.com/foo\" " - "value: \"bar\" }"); - EXPECT_EQ((*(metadata.mutable_typed_filter_metadata()))["baz"].type_url(), - "type.googleapis.com/google.protobuf.Any"); - EXPECT_EQ((*(metadata.mutable_typed_filter_metadata()))["baz"].value(), - "\n\x17type.googleapis.com/foo\x12\x3" - "bar"); - - // Unpack the metadata type_filter_metadata field into any_destination - // and verity the type_url and value are expected. - ProtobufWkt::Any any_destination; - (*(metadata.mutable_typed_filter_metadata()))["baz"].UnpackTo(&any_destination); - EXPECT_EQ(any_destination.type_url(), "type.googleapis.com/foo"); - EXPECT_EQ(any_destination.value(), "bar"); -} - class TypedMetadataTest : public testing::Test { public: - TypedMetadataTest() : registered_factory_(foo_factory_) {} + TypedMetadataTest() + : registered_factory_foo_(foo_factory_), registered_factory_bar_(bar_factory_), + registered_factory_baz_(baz_factory_) {} struct Foo : public TypedMetadata::Object { Foo(std::string name) : name_(name) {} std::string name_; }; - struct Bar : public TypedMetadata::Object {}; + struct Qux : public TypedMetadata::Object {}; - class FooFactory : public TypedMetadataFactory { + class FoobarFactory : public TypedMetadataFactory { public: - std::string name() const override { return "foo"; } // Throws EnvoyException (conversion failure) if d is empty. std::unique_ptr parse(const ProtobufWkt::Struct& d) const override { if (d.fields().find("name") != d.fields().end()) { return std::make_unique(d.fields().at("name").string_value()); } - throw EnvoyException("Cannot create a Foo when metadata is empty."); + throw EnvoyException("Cannot create a Foo when Struct metadata is empty."); + } + + std::unique_ptr parse(const ProtobufWkt::Any& d) const override { + if (!(d.type_url().empty())) { + return std::make_unique(d.value()); + } + throw EnvoyException("Cannot create a Foo when Any metadata is empty."); + } + }; + + // Three testing factories with different names + class FooFactory : public FoobarFactory { + public: + std::string name() const override { return "foo"; } + }; + + class BarFactory : public FoobarFactory { + public: + std::string name() const override { return "bar"; } + }; + + class BazFactory : public FoobarFactory { + public: + std::string name() const override { return "baz"; } + // Override Any parse() to just return nullptr. + std::unique_ptr parse(const ProtobufWkt::Any&) const override { + return nullptr; } }; protected: FooFactory foo_factory_; - Registry::InjectFactory registered_factory_; + BarFactory bar_factory_; + BazFactory baz_factory_; + Registry::InjectFactory registered_factory_foo_; + Registry::InjectFactory registered_factory_bar_; + Registry::InjectFactory registered_factory_baz_; }; -TEST_F(TypedMetadataTest, OkTest) { +TEST_F(TypedMetadataTest, OkTestStruct) { envoy::config::core::v3::Metadata metadata; (*metadata.mutable_filter_metadata())[foo_factory_.name()] = - MessageUtil::keyValueStruct("name", "foo"); + MessageUtil::keyValueStruct("name", "garply"); TypedMetadataImpl typed(metadata); EXPECT_NE(nullptr, typed.get(foo_factory_.name())); - EXPECT_EQ("foo", typed.get(foo_factory_.name())->name_); + EXPECT_EQ("garply", typed.get(foo_factory_.name())->name_); // A duck is a duck. - EXPECT_EQ(nullptr, typed.get(foo_factory_.name())); + EXPECT_EQ(nullptr, typed.get(foo_factory_.name())); +} + +TEST_F(TypedMetadataTest, OkTestAny) { + envoy::config::core::v3::Metadata metadata; + ProtobufWkt::Any any; + any.set_type_url("type.googleapis.com/waldo"); + any.set_value("fred"); + (*metadata.mutable_typed_filter_metadata())[bar_factory_.name()] = any; + TypedMetadataImpl typed(metadata); + EXPECT_NE(nullptr, typed.get(bar_factory_.name())); + EXPECT_EQ("fred", typed.get(bar_factory_.name())->name_); +} + +TEST_F(TypedMetadataTest, OkTestAnyParseReturnNullptr) { + envoy::config::core::v3::Metadata metadata; + ProtobufWkt::Any any; + any.set_type_url("type.googleapis.com/waldo"); + any.set_value("fred"); + (*metadata.mutable_typed_filter_metadata())[baz_factory_.name()] = any; + TypedMetadataImpl typed(metadata); + EXPECT_EQ(nullptr, typed.get(baz_factory_.name())); +} + +TEST_F(TypedMetadataTest, OkTestBothSameFactory) { + envoy::config::core::v3::Metadata metadata; + (*metadata.mutable_filter_metadata())[foo_factory_.name()] = + MessageUtil::keyValueStruct("name", "garply"); + ProtobufWkt::Any any; + any.set_type_url("type.googleapis.com/waldo"); + any.set_value("fred"); + (*metadata.mutable_typed_filter_metadata())[foo_factory_.name()] = any; + TypedMetadataImpl typed(metadata); + EXPECT_NE(nullptr, typed.get(foo_factory_.name())); + // If metadata has both Struct and Any field in same factory, + // only Any field is populated. + EXPECT_EQ("fred", typed.get(foo_factory_.name())->name_); +} + +TEST_F(TypedMetadataTest, OkTestBothDifferentFactory) { + envoy::config::core::v3::Metadata metadata; + (*metadata.mutable_filter_metadata())[foo_factory_.name()] = + MessageUtil::keyValueStruct("name", "garply"); + ProtobufWkt::Any any; + any.set_type_url("type.googleapis.com/waldo"); + any.set_value("fred"); + (*metadata.mutable_typed_filter_metadata())[bar_factory_.name()] = any; + + TypedMetadataImpl typed(metadata); + // If metadata has both Struct and Any field in different factory, + // both fields are populated. + EXPECT_NE(nullptr, typed.get(foo_factory_.name())); + EXPECT_EQ("garply", typed.get(foo_factory_.name())->name_); + + EXPECT_NE(nullptr, typed.get(bar_factory_.name())); + EXPECT_EQ("fred", typed.get(bar_factory_.name())->name_); +} + +TEST_F(TypedMetadataTest, OkTestBothSameFactoryAnyParseReturnNullptr) { + envoy::config::core::v3::Metadata metadata; + (*metadata.mutable_filter_metadata())[baz_factory_.name()] = + MessageUtil::keyValueStruct("name", "garply"); + ProtobufWkt::Any any; + any.set_type_url("type.googleapis.com/waldo"); + any.set_value("fred"); + (*metadata.mutable_typed_filter_metadata())[baz_factory_.name()] = any; + + // Since Any Parse() method in BazFactory just return nullptr, + // Struct data is populated. + TypedMetadataImpl typed(metadata); + EXPECT_NE(nullptr, typed.get(baz_factory_.name())); + EXPECT_EQ("garply", typed.get(baz_factory_.name())->name_); } TEST_F(TypedMetadataTest, NoMetadataTest) { envoy::config::core::v3::Metadata metadata; TypedMetadataImpl typed(metadata); + // metadata is empty, nothing is populated. EXPECT_EQ(nullptr, typed.get(foo_factory_.name())); } -TEST_F(TypedMetadataTest, MetadataRefreshTest) { +TEST_F(TypedMetadataTest, StructMetadataRefreshTest) { envoy::config::core::v3::Metadata metadata; (*metadata.mutable_filter_metadata())[foo_factory_.name()] = - MessageUtil::keyValueStruct("name", "foo"); + MessageUtil::keyValueStruct("name", "garply"); TypedMetadataImpl typed(metadata); EXPECT_NE(nullptr, typed.get(foo_factory_.name())); - EXPECT_EQ("foo", typed.get(foo_factory_.name())->name_); + EXPECT_EQ("garply", typed.get(foo_factory_.name())->name_); // Updated. (*metadata.mutable_filter_metadata())[foo_factory_.name()] = - MessageUtil::keyValueStruct("name", "bar"); + MessageUtil::keyValueStruct("name", "plugh"); TypedMetadataImpl typed2(metadata); EXPECT_NE(nullptr, typed2.get(foo_factory_.name())); - EXPECT_EQ("bar", typed2.get(foo_factory_.name())->name_); + EXPECT_EQ("plugh", typed2.get(foo_factory_.name())->name_); // Deleted. (*metadata.mutable_filter_metadata()).erase(foo_factory_.name()); @@ -167,11 +220,44 @@ TEST_F(TypedMetadataTest, MetadataRefreshTest) { EXPECT_EQ(nullptr, typed3.get(foo_factory_.name())); } -TEST_F(TypedMetadataTest, InvalidMetadataTest) { +TEST_F(TypedMetadataTest, AnyMetadataRefreshTest) { + envoy::config::core::v3::Metadata metadata; + ProtobufWkt::Any any; + any.set_type_url("type.googleapis.com/waldo"); + any.set_value("fred"); + (*metadata.mutable_typed_filter_metadata())[bar_factory_.name()] = any; + TypedMetadataImpl typed(metadata); + EXPECT_NE(nullptr, typed.get(bar_factory_.name())); + EXPECT_EQ("fred", typed.get(bar_factory_.name())->name_); + + // Updated. + any.set_type_url("type.googleapis.com/xyzzy"); + any.set_value("thud"); + (*metadata.mutable_typed_filter_metadata())[bar_factory_.name()] = any; + TypedMetadataImpl typed2(metadata); + EXPECT_NE(nullptr, typed2.get(bar_factory_.name())); + EXPECT_EQ("thud", typed2.get(bar_factory_.name())->name_); + + // Deleted. + (*metadata.mutable_typed_filter_metadata()).erase(bar_factory_.name()); + TypedMetadataImpl typed3(metadata); + EXPECT_EQ(nullptr, typed3.get(bar_factory_.name())); +} + +TEST_F(TypedMetadataTest, InvalidStructMetadataTest) { envoy::config::core::v3::Metadata metadata; (*metadata.mutable_filter_metadata())[foo_factory_.name()] = ProtobufWkt::Struct(); EXPECT_THROW_WITH_MESSAGE(TypedMetadataImpl typed(metadata), - Envoy::EnvoyException, "Cannot create a Foo when metadata is empty."); + Envoy::EnvoyException, + "Cannot create a Foo when Struct metadata is empty."); +} + +TEST_F(TypedMetadataTest, InvalidAnyMetadataTest) { + envoy::config::core::v3::Metadata metadata; + (*metadata.mutable_typed_filter_metadata())[bar_factory_.name()] = ProtobufWkt::Any(); + EXPECT_THROW_WITH_MESSAGE(TypedMetadataImpl typed(metadata), + Envoy::EnvoyException, + "Cannot create a Foo when Any metadata is empty."); } } // namespace diff --git a/test/common/router/config_impl_test.cc b/test/common/router/config_impl_test.cc index dbf30b85364a8..26057efc33a91 100644 --- a/test/common/router/config_impl_test.cc +++ b/test/common/router/config_impl_test.cc @@ -4855,6 +4855,11 @@ class BazFactory : public HttpRouteTypedMetadataFactory { } throw EnvoyException("Cannot create a Baz when metadata is empty."); } + + std::unique_ptr + parse(const ProtobufWkt::Any&) const override { + return nullptr; + } }; TEST_F(RouteMatcherTest, WeightedClusters) { diff --git a/test/common/upstream/upstream_impl_test.cc b/test/common/upstream/upstream_impl_test.cc index 75632568d3ee8..3bca4635ebaff 100644 --- a/test/common/upstream/upstream_impl_test.cc +++ b/test/common/upstream/upstream_impl_test.cc @@ -2239,6 +2239,11 @@ class BazFactory : public ClusterTypedMetadataFactory { } throw EnvoyException("Cannot create a Baz when metadata is empty."); } + + std::unique_ptr + parse(const ProtobufWkt::Any&) const override { + return nullptr; + } }; // Cluster metadata and common config retrieval. From 6276b4de16b277fd3989c47de27f6de61a36368f Mon Sep 17 00:00:00 2001 From: Yanjun Xiang Date: Mon, 3 May 2021 20:00:50 +0000 Subject: [PATCH 03/11] update diff based on comments Signed-off-by: Yanjun Xiang --- api/envoy/config/core/v3/base.proto | 5 +++++ include/envoy/config/typed_metadata.h | 11 +++++++++-- source/common/config/metadata.h | 2 +- test/common/config/metadata_test.cc | 16 ++++++++++++++++ 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/api/envoy/config/core/v3/base.proto b/api/envoy/config/core/v3/base.proto index 647d8737bf5ff..fc370c019559d 100644 --- a/api/envoy/config/core/v3/base.proto +++ b/api/envoy/config/core/v3/base.proto @@ -225,11 +225,16 @@ message Metadata { // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. + // This is deprecated in favor of + // :ref:`typed_filter_metadata ` field. map filter_metadata = 1 [deprecated = true]; // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. // The value is encoded as google.protobuf.Any. + // If both :ref:`filter_metadata ` + // and typed_filter_metadata fields are present in the metadata with same keys, + // only typed_filter_metadata field will be parsed. map typed_filter_metadata = 2; } diff --git a/include/envoy/config/typed_metadata.h b/include/envoy/config/typed_metadata.h index f566d27666766..e6a2488c1f4d4 100644 --- a/include/envoy/config/typed_metadata.h +++ b/include/envoy/config/typed_metadata.h @@ -56,8 +56,7 @@ class TypedMetadataFactory : public UntypedFactory { ~TypedMetadataFactory() override = default; /** - * Convert the google.protobuf.Struct or google.protobuf.Any - * into an instance of TypedMetadata::Object. + * Convert the google.protobuf.Struct into an instance of TypedMetadata::Object. * It should throw an EnvoyException in case the conversion can't be completed. * @param data config data stored as a protobuf struct. * @return a derived class object pointer of TypedMetadata. @@ -66,6 +65,14 @@ class TypedMetadataFactory : public UntypedFactory { virtual std::unique_ptr parse(const ProtobufWkt::Struct& data) const PURE; + /** + * Convert the google.protobuf.Any into an instance of TypedMetadata::Object. + * It should throw an EnvoyException in case the conversion can't be completed. + * @param data config data stored as a protobuf any. + * @return a derived class object pointer of TypedMetadata or return nullptr if + * one doesn't implement parse() method. + * @throw EnvoyException if the parsing can't be done. + */ virtual std::unique_ptr parse(const ProtobufWkt::Any& data) const PURE; diff --git a/source/common/config/metadata.h b/source/common/config/metadata.h index 745688ef94a66..9b4ddbbcb0f43 100644 --- a/source/common/config/metadata.h +++ b/source/common/config/metadata.h @@ -120,7 +120,7 @@ template class TypedMetadataImpl : public TypedMetadata for (const auto& [factory_name, factory] : Registry::FactoryRegistry::factories()) { const auto& typed_meta_iter = typed_data_by_key.find(factory_name); - // If the key exists in Any metadata, and parse() not return nullptr, + // If the key exists in Any metadata, and parse() does not return nullptr, // populate data_. if (typed_meta_iter != typed_data_by_key.end()) { auto result = factory->parse(typed_meta_iter->second); diff --git a/test/common/config/metadata_test.cc b/test/common/config/metadata_test.cc index a7465b599448f..ea0a672aed69d 100644 --- a/test/common/config/metadata_test.cc +++ b/test/common/config/metadata_test.cc @@ -110,6 +110,7 @@ class TypedMetadataTest : public testing::Test { Registry::InjectFactory registered_factory_baz_; }; +// Tests data parsing and retrieving when only Struct field present in the metadata. TEST_F(TypedMetadataTest, OkTestStruct) { envoy::config::core::v3::Metadata metadata; (*metadata.mutable_filter_metadata())[foo_factory_.name()] = @@ -121,6 +122,7 @@ TEST_F(TypedMetadataTest, OkTestStruct) { EXPECT_EQ(nullptr, typed.get(foo_factory_.name())); } +// Tests data parsing and retrieving when only Any field present in the metadata. TEST_F(TypedMetadataTest, OkTestAny) { envoy::config::core::v3::Metadata metadata; ProtobufWkt::Any any; @@ -132,6 +134,8 @@ TEST_F(TypedMetadataTest, OkTestAny) { EXPECT_EQ("fred", typed.get(bar_factory_.name())->name_); } +// Tests data parsing and retrieving when only Any field present in the metadata, +// also Any data parsing method just return nullptr. TEST_F(TypedMetadataTest, OkTestAnyParseReturnNullptr) { envoy::config::core::v3::Metadata metadata; ProtobufWkt::Any any; @@ -142,6 +146,8 @@ TEST_F(TypedMetadataTest, OkTestAnyParseReturnNullptr) { EXPECT_EQ(nullptr, typed.get(baz_factory_.name())); } +// Tests data parsing and retrieving when both Struct and Any field +// present in the metadata, and in the same factory. TEST_F(TypedMetadataTest, OkTestBothSameFactory) { envoy::config::core::v3::Metadata metadata; (*metadata.mutable_filter_metadata())[foo_factory_.name()] = @@ -157,6 +163,8 @@ TEST_F(TypedMetadataTest, OkTestBothSameFactory) { EXPECT_EQ("fred", typed.get(foo_factory_.name())->name_); } +// Tests data parsing and retrieving when both Struct and Any field +// present in the metadata, but in different factory. TEST_F(TypedMetadataTest, OkTestBothDifferentFactory) { envoy::config::core::v3::Metadata metadata; (*metadata.mutable_filter_metadata())[foo_factory_.name()] = @@ -176,6 +184,9 @@ TEST_F(TypedMetadataTest, OkTestBothDifferentFactory) { EXPECT_EQ("fred", typed.get(bar_factory_.name())->name_); } +// Tests data parsing and retrieving when both Struct and Any field +// present in the metadata, and in the same factory, but with the case +// that Any field parse() method returns nullptr. TEST_F(TypedMetadataTest, OkTestBothSameFactoryAnyParseReturnNullptr) { envoy::config::core::v3::Metadata metadata; (*metadata.mutable_filter_metadata())[baz_factory_.name()] = @@ -192,6 +203,7 @@ TEST_F(TypedMetadataTest, OkTestBothSameFactoryAnyParseReturnNullptr) { EXPECT_EQ("garply", typed.get(baz_factory_.name())->name_); } +// Tests data parsing and retrieving when no data present in the metadata. TEST_F(TypedMetadataTest, NoMetadataTest) { envoy::config::core::v3::Metadata metadata; TypedMetadataImpl typed(metadata); @@ -199,6 +211,7 @@ TEST_F(TypedMetadataTest, NoMetadataTest) { EXPECT_EQ(nullptr, typed.get(foo_factory_.name())); } +// Tests data parsing and retrieving when Struct metadata updates. TEST_F(TypedMetadataTest, StructMetadataRefreshTest) { envoy::config::core::v3::Metadata metadata; (*metadata.mutable_filter_metadata())[foo_factory_.name()] = @@ -220,6 +233,7 @@ TEST_F(TypedMetadataTest, StructMetadataRefreshTest) { EXPECT_EQ(nullptr, typed3.get(foo_factory_.name())); } +// Tests data parsing and retrieving when Any metadata updates. TEST_F(TypedMetadataTest, AnyMetadataRefreshTest) { envoy::config::core::v3::Metadata metadata; ProtobufWkt::Any any; @@ -244,6 +258,7 @@ TEST_F(TypedMetadataTest, AnyMetadataRefreshTest) { EXPECT_EQ(nullptr, typed3.get(bar_factory_.name())); } +// Tests emptry Struct metadata parsing case. TEST_F(TypedMetadataTest, InvalidStructMetadataTest) { envoy::config::core::v3::Metadata metadata; (*metadata.mutable_filter_metadata())[foo_factory_.name()] = ProtobufWkt::Struct(); @@ -252,6 +267,7 @@ TEST_F(TypedMetadataTest, InvalidStructMetadataTest) { "Cannot create a Foo when Struct metadata is empty."); } +// Tests emptry Any metadata parsing case. TEST_F(TypedMetadataTest, InvalidAnyMetadataTest) { envoy::config::core::v3::Metadata metadata; (*metadata.mutable_typed_filter_metadata())[bar_factory_.name()] = ProtobufWkt::Any(); From 82d73ebc484f7088b19a89530a8057b28dc8f867 Mon Sep 17 00:00:00 2001 From: Yanjun Xiang Date: Tue, 4 May 2021 14:53:40 +0000 Subject: [PATCH 04/11] Revert "Update PR based on comments" This reverts commit c997e15fdde5ea02eb932665a2c54f9da0ddc7e6. Signed-off-by: Yanjun Xiang --- api/envoy/config/cluster/v4alpha/BUILD | 2 +- .../config/cluster/v4alpha/cluster.proto | 8 +- api/envoy/config/core/v4alpha/base.proto | 9 +- .../config/core/v4alpha/health_check.proto | 6 +- api/envoy/config/endpoint/v4alpha/BUILD | 14 - .../config/endpoint/v4alpha/endpoint.proto | 119 ----- .../v4alpha/endpoint_components.proto | 158 ------- .../config/endpoint/v4alpha/load_report.proto | 168 ------- api/envoy/data/accesslog/v4alpha/BUILD | 13 - .../data/accesslog/v4alpha/accesslog.proto | 425 ------------------ .../access_loggers/grpc/v4alpha/als.proto | 8 +- .../host/omit_host_metadata/v4alpha/BUILD | 13 - .../v4alpha/omit_host_metadata_config.proto | 29 -- api/envoy/service/accesslog/v4alpha/BUILD | 2 +- api/envoy/service/accesslog/v4alpha/als.proto | 6 +- api/envoy/service/health/v4alpha/BUILD | 2 +- api/envoy/service/health/v4alpha/hds.proto | 6 +- api/envoy/service/load_stats/v4alpha/BUILD | 2 +- .../service/load_stats/v4alpha/lrs.proto | 4 +- .../envoy/config/cluster/v4alpha/BUILD | 2 +- .../config/cluster/v4alpha/cluster.proto | 8 +- .../envoy/config/core/v3/base.proto | 5 +- .../envoy/config/core/v4alpha/base.proto | 8 +- .../config/core/v4alpha/health_check.proto | 6 +- .../envoy/config/endpoint/v4alpha/BUILD | 14 - .../config/endpoint/v4alpha/endpoint.proto | 119 ----- .../v4alpha/endpoint_components.proto | 158 ------- .../config/endpoint/v4alpha/load_report.proto | 168 ------- .../envoy/data/accesslog/v4alpha/BUILD | 13 - .../data/accesslog/v4alpha/accesslog.proto | 425 ------------------ .../access_loggers/grpc/v4alpha/als.proto | 8 +- .../host/omit_host_metadata/v4alpha/BUILD | 13 - .../v4alpha/omit_host_metadata_config.proto | 29 -- .../envoy/service/accesslog/v4alpha/BUILD | 2 +- .../envoy/service/accesslog/v4alpha/als.proto | 6 +- .../envoy/service/health/v4alpha/BUILD | 2 +- .../envoy/service/health/v4alpha/hds.proto | 6 +- .../envoy/service/load_stats/v4alpha/BUILD | 2 +- .../service/load_stats/v4alpha/lrs.proto | 4 +- include/envoy/config/typed_metadata.h | 2 +- test/common/router/config_impl_test.cc | 5 - test/common/upstream/upstream_impl_test.cc | 5 - 42 files changed, 53 insertions(+), 1951 deletions(-) delete mode 100644 api/envoy/config/endpoint/v4alpha/BUILD delete mode 100644 api/envoy/config/endpoint/v4alpha/endpoint.proto delete mode 100644 api/envoy/config/endpoint/v4alpha/endpoint_components.proto delete mode 100644 api/envoy/config/endpoint/v4alpha/load_report.proto delete mode 100644 api/envoy/data/accesslog/v4alpha/BUILD delete mode 100644 api/envoy/data/accesslog/v4alpha/accesslog.proto delete mode 100644 api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD delete mode 100644 api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto delete mode 100644 generated_api_shadow/envoy/config/endpoint/v4alpha/BUILD delete mode 100644 generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint.proto delete mode 100644 generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint_components.proto delete mode 100644 generated_api_shadow/envoy/config/endpoint/v4alpha/load_report.proto delete mode 100644 generated_api_shadow/envoy/data/accesslog/v4alpha/BUILD delete mode 100644 generated_api_shadow/envoy/data/accesslog/v4alpha/accesslog.proto delete mode 100644 generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD delete mode 100644 generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto diff --git a/api/envoy/config/cluster/v4alpha/BUILD b/api/envoy/config/cluster/v4alpha/BUILD index b5db8055b8d1e..02eb1b1917251 100644 --- a/api/envoy/config/cluster/v4alpha/BUILD +++ b/api/envoy/config/cluster/v4alpha/BUILD @@ -8,7 +8,7 @@ api_proto_package( deps = [ "//envoy/config/cluster/v3:pkg", "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v4alpha:pkg", + "//envoy/config/endpoint/v3:pkg", "//envoy/type/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", "@com_github_cncf_udpa//xds/core/v3:pkg", diff --git a/api/envoy/config/cluster/v4alpha/cluster.proto b/api/envoy/config/cluster/v4alpha/cluster.proto index 4d5e5a375bf54..927bbddaba5e2 100644 --- a/api/envoy/config/cluster/v4alpha/cluster.proto +++ b/api/envoy/config/cluster/v4alpha/cluster.proto @@ -10,7 +10,7 @@ import "envoy/config/core/v4alpha/base.proto"; import "envoy/config/core/v4alpha/config_source.proto"; import "envoy/config/core/v4alpha/extension.proto"; import "envoy/config/core/v4alpha/health_check.proto"; -import "envoy/config/endpoint/v4alpha/endpoint.proto"; +import "envoy/config/endpoint/v3/endpoint.proto"; import "envoy/type/v3/percent.proto"; import "google/protobuf/any.proto"; @@ -638,7 +638,7 @@ message Cluster { // Configuration to use different transport sockets for different endpoints. // The entry of *envoy.transport_socket_match* in the - // :ref:`LbEndpoint.Metadata ` + // :ref:`LbEndpoint.Metadata ` // is used to match against the transport sockets as they appear in the list. The first // :ref:`match ` is used. // For example, with the following match @@ -739,9 +739,9 @@ message Cluster { // .. attention:: // // Setting this allows non-EDS cluster types to contain embedded EDS equivalent - // :ref:`endpoint assignments`. + // :ref:`endpoint assignments`. // - endpoint.v4alpha.ClusterLoadAssignment load_assignment = 33; + endpoint.v3.ClusterLoadAssignment load_assignment = 33; // Optional :ref:`active health checking ` // configuration for the cluster. If no diff --git a/api/envoy/config/core/v4alpha/base.proto b/api/envoy/config/core/v4alpha/base.proto index 001fc4e8e1996..6c271e87088a1 100644 --- a/api/envoy/config/core/v4alpha/base.proto +++ b/api/envoy/config/core/v4alpha/base.proto @@ -71,7 +71,7 @@ message Locality { // Defines the local service zone where Envoy is running. Though optional, it // should be set if discovery service routing is used and the discovery - // service exposes :ref:`zone data `, + // service exposes :ref:`zone data `, // either in this message or via :option:`--service-zone`. The meaning of zone // is context dependent, e.g. `Availability Zone (AZ) // `_ @@ -224,13 +224,10 @@ message Node { message Metadata { option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.Metadata"; - reserved 1; - - reserved "filter_metadata"; - // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. - // The value is encoded as google.protobuf.Any. + map filter_metadata = 1; + map typed_filter_metadata = 2; } diff --git a/api/envoy/config/core/v4alpha/health_check.proto b/api/envoy/config/core/v4alpha/health_check.proto index 90aaa057b0faf..ddc7d65e00075 100644 --- a/api/envoy/config/core/v4alpha/health_check.proto +++ b/api/envoy/config/core/v4alpha/health_check.proto @@ -85,7 +85,7 @@ message HealthCheck { // The value of the host header in the HTTP health check request. If // left empty (default value), the name of the cluster this health check is associated // with will be used. The host header can be customized for a specific endpoint by setting the - // :ref:`hostname ` field. + // :ref:`hostname ` field. string host = 1 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; // Specifies the HTTP path that will be requested during health checking. For example @@ -170,7 +170,7 @@ message HealthCheck { // The value of the :authority header in the gRPC health check request. If // left empty (default value), the name of the cluster this health check is associated // with will be used. The authority header can be customized for a specific endpoint by setting - // the :ref:`hostname ` field. + // the :ref:`hostname ` field. string authority = 2 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; } @@ -360,7 +360,7 @@ message HealthCheck { // config: { ... } # tls socket configuration // // If this field is set, then for health checks it will supersede an entry of *envoy.transport_socket* in the - // :ref:`LbEndpoint.Metadata `. + // :ref:`LbEndpoint.Metadata `. // This allows using different transport socket capabilities for health checking versus proxying to the // endpoint. // diff --git a/api/envoy/config/endpoint/v4alpha/BUILD b/api/envoy/config/endpoint/v4alpha/BUILD deleted file mode 100644 index 79d52ad4cfbc6..0000000000000 --- a/api/envoy/config/endpoint/v4alpha/BUILD +++ /dev/null @@ -1,14 +0,0 @@ -# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. - -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") - -licenses(["notice"]) # Apache 2 - -api_proto_package( - deps = [ - "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v3:pkg", - "//envoy/type/v3:pkg", - "@com_github_cncf_udpa//udpa/annotations:pkg", - ], -) diff --git a/api/envoy/config/endpoint/v4alpha/endpoint.proto b/api/envoy/config/endpoint/v4alpha/endpoint.proto deleted file mode 100644 index 0d4d4684d2c10..0000000000000 --- a/api/envoy/config/endpoint/v4alpha/endpoint.proto +++ /dev/null @@ -1,119 +0,0 @@ -syntax = "proto3"; - -package envoy.config.endpoint.v4alpha; - -import "envoy/config/endpoint/v4alpha/endpoint_components.proto"; -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; -option java_outer_classname = "EndpointProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Endpoint configuration] -// Endpoint discovery :ref:`architecture overview ` - -// Each route from RDS will map to a single cluster or traffic split across -// clusters using weights expressed in the RDS WeightedCluster. -// -// With EDS, each cluster is treated independently from a LB perspective, with -// LB taking place between the Localities within a cluster and at a finer -// granularity between the hosts within a locality. The percentage of traffic -// for each endpoint is determined by both its load_balancing_weight, and the -// load_balancing_weight of its locality. First, a locality will be selected, -// then an endpoint within that locality will be chose based on its weight. -// [#next-free-field: 6] -message ClusterLoadAssignment { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.ClusterLoadAssignment"; - - // Load balancing policy settings. - // [#next-free-field: 6] - message Policy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.ClusterLoadAssignment.Policy"; - - // [#not-implemented-hide:] - message DropOverload { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload"; - - // Identifier for the policy specifying the drop. - string category = 1 [(validate.rules).string = {min_len: 1}]; - - // Percentage of traffic that should be dropped for the category. - type.v3.FractionalPercent drop_percentage = 2; - } - - reserved 1, 5; - - reserved "disable_overprovisioning"; - - // Action to trim the overall incoming traffic to protect the upstream - // hosts. This action allows protection in case the hosts are unable to - // recover from an outage, or unable to autoscale or unable to handle - // incoming traffic volume for any reason. - // - // At the client each category is applied one after the other to generate - // the 'actual' drop percentage on all outgoing traffic. For example: - // - // .. code-block:: json - // - // { "drop_overloads": [ - // { "category": "throttle", "drop_percentage": 60 } - // { "category": "lb", "drop_percentage": 50 } - // ]} - // - // The actual drop percentages applied to the traffic at the clients will be - // "throttle"_drop = 60% - // "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%. - // actual_outgoing_load = 20% // remaining after applying all categories. - // [#not-implemented-hide:] - repeated DropOverload drop_overloads = 2; - - // Priority levels and localities are considered overprovisioned with this - // factor (in percentage). This means that we don't consider a priority - // level or locality unhealthy until the fraction of healthy hosts - // multiplied by the overprovisioning factor drops below 100. - // With the default value 140(1.4), Envoy doesn't consider a priority level - // or a locality unhealthy until their percentage of healthy hosts drops - // below 72%. For example: - // - // .. code-block:: json - // - // { "overprovisioning_factor": 100 } - // - // Read more at :ref:`priority levels ` and - // :ref:`localities `. - google.protobuf.UInt32Value overprovisioning_factor = 3 [(validate.rules).uint32 = {gt: 0}]; - - // The max time until which the endpoints from this assignment can be used. - // If no new assignments are received before this time expires the endpoints - // are considered stale and should be marked unhealthy. - // Defaults to 0 which means endpoints never go stale. - google.protobuf.Duration endpoint_stale_after = 4 [(validate.rules).duration = {gt {}}]; - } - - // Name of the cluster. This will be the :ref:`service_name - // ` value if specified - // in the cluster :ref:`EdsClusterConfig - // `. - string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; - - // List of endpoints to load balance to. - repeated LocalityLbEndpoints endpoints = 2; - - // Map of named endpoints that can be referenced in LocalityLbEndpoints. - // [#not-implemented-hide:] - map named_endpoints = 5; - - // Load balancing policy settings. - Policy policy = 4; -} diff --git a/api/envoy/config/endpoint/v4alpha/endpoint_components.proto b/api/envoy/config/endpoint/v4alpha/endpoint_components.proto deleted file mode 100644 index 246d569d28464..0000000000000 --- a/api/envoy/config/endpoint/v4alpha/endpoint_components.proto +++ /dev/null @@ -1,158 +0,0 @@ -syntax = "proto3"; - -package envoy.config.endpoint.v4alpha; - -import "envoy/config/core/v4alpha/address.proto"; -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/core/v4alpha/health_check.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; -option java_outer_classname = "EndpointComponentsProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Endpoints] - -// Upstream host identifier. -message Endpoint { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.endpoint.v3.Endpoint"; - - // The optional health check configuration. - message HealthCheckConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.Endpoint.HealthCheckConfig"; - - // Optional alternative health check port value. - // - // By default the health check address port of an upstream host is the same - // as the host's serving address port. This provides an alternative health - // check port. Setting this with a non-zero value allows an upstream host - // to have different health check address port. - uint32 port_value = 1 [(validate.rules).uint32 = {lte: 65535}]; - - // By default, the host header for L7 health checks is controlled by cluster level configuration - // (see: :ref:`host ` and - // :ref:`authority `). Setting this - // to a non-empty value allows overriding the cluster level configuration for a specific - // endpoint. - string hostname = 2; - } - - // The upstream host address. - // - // .. attention:: - // - // The form of host address depends on the given cluster type. For STATIC or EDS, - // it is expected to be a direct IP address (or something resolvable by the - // specified :ref:`resolver ` - // in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname, - // and will be resolved via DNS. - core.v4alpha.Address address = 1; - - // The optional health check configuration is used as configuration for the - // health checker to contact the health checked host. - // - // .. attention:: - // - // This takes into effect only for upstream clusters with - // :ref:`active health checking ` enabled. - HealthCheckConfig health_check_config = 2; - - // The hostname associated with this endpoint. This hostname is not used for routing or address - // resolution. If provided, it will be associated with the endpoint, and can be used for features - // that require a hostname, like - // :ref:`auto_host_rewrite `. - string hostname = 3; -} - -// An Endpoint that Envoy can route traffic to. -// [#next-free-field: 6] -message LbEndpoint { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.LbEndpoint"; - - // Upstream host identifier or a named reference. - oneof host_identifier { - Endpoint endpoint = 1; - - // [#not-implemented-hide:] - string endpoint_name = 5; - } - - // Optional health status when known and supplied by EDS server. - core.v4alpha.HealthStatus health_status = 2; - - // The endpoint metadata specifies values that may be used by the load - // balancer to select endpoints in a cluster for a given request. The filter - // name should be specified as *envoy.lb*. An example boolean key-value pair - // is *canary*, providing the optional canary status of the upstream host. - // This may be matched against in a route's - // :ref:`RouteAction ` metadata_match field - // to subset the endpoints considered in cluster load balancing. - core.v4alpha.Metadata metadata = 3; - - // The optional load balancing weight of the upstream host; at least 1. - // Envoy uses the load balancing weight in some of the built in load - // balancers. The load balancing weight for an endpoint is divided by the sum - // of the weights of all endpoints in the endpoint's locality to produce a - // percentage of traffic for the endpoint. This percentage is then further - // weighted by the endpoint's locality's load balancing weight from - // LocalityLbEndpoints. If unspecified, each host is presumed to have equal - // weight in a locality. The sum of the weights of all endpoints in the - // endpoint's locality must not exceed uint32_t maximal value (4294967295). - google.protobuf.UInt32Value load_balancing_weight = 4 [(validate.rules).uint32 = {gte: 1}]; -} - -// A group of endpoints belonging to a Locality. -// One can have multiple LocalityLbEndpoints for a locality, but this is -// generally only done if the different groups need to have different load -// balancing weights or different priorities. -// [#next-free-field: 7] -message LocalityLbEndpoints { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.LocalityLbEndpoints"; - - // Identifies location of where the upstream hosts run. - core.v4alpha.Locality locality = 1; - - // The group of endpoints belonging to the locality specified. - repeated LbEndpoint lb_endpoints = 2; - - // Optional: Per priority/region/zone/sub_zone weight; at least 1. The load - // balancing weight for a locality is divided by the sum of the weights of all - // localities at the same priority level to produce the effective percentage - // of traffic for the locality. The sum of the weights of all localities at - // the same priority level must not exceed uint32_t maximal value (4294967295). - // - // Locality weights are only considered when :ref:`locality weighted load - // balancing ` is - // configured. These weights are ignored otherwise. If no weights are - // specified when locality weighted load balancing is enabled, the locality is - // assigned no load. - google.protobuf.UInt32Value load_balancing_weight = 3 [(validate.rules).uint32 = {gte: 1}]; - - // Optional: the priority for this LocalityLbEndpoints. If unspecified this will - // default to the highest priority (0). - // - // Under usual circumstances, Envoy will only select endpoints for the highest - // priority (0). In the event all endpoints for a particular priority are - // unavailable/unhealthy, Envoy will fail over to selecting endpoints for the - // next highest priority group. - // - // Priorities should range from 0 (highest) to N (lowest) without skipping. - uint32 priority = 5 [(validate.rules).uint32 = {lte: 128}]; - - // Optional: Per locality proximity value which indicates how close this - // locality is from the source locality. This value only provides ordering - // information (lower the value, closer it is to the source locality). - // This will be consumed by load balancing schemes that need proximity order - // to determine where to route the requests. - // [#not-implemented-hide:] - google.protobuf.UInt32Value proximity = 6; -} diff --git a/api/envoy/config/endpoint/v4alpha/load_report.proto b/api/envoy/config/endpoint/v4alpha/load_report.proto deleted file mode 100644 index 80be59041d742..0000000000000 --- a/api/envoy/config/endpoint/v4alpha/load_report.proto +++ /dev/null @@ -1,168 +0,0 @@ -syntax = "proto3"; - -package envoy.config.endpoint.v4alpha; - -import "envoy/config/core/v4alpha/address.proto"; -import "envoy/config/core/v4alpha/base.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; -option java_outer_classname = "LoadReportProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Load Report] - -// These are stats Envoy reports to the management server at a frequency defined by -// :ref:`LoadStatsResponse.load_reporting_interval`. -// Stats per upstream region/zone and optionally per subzone. -// [#next-free-field: 9] -message UpstreamLocalityStats { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.UpstreamLocalityStats"; - - // Name of zone, region and optionally endpoint group these metrics were - // collected from. Zone and region names could be empty if unknown. - core.v4alpha.Locality locality = 1; - - // The total number of requests successfully completed by the endpoints in the - // locality. - 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, - // aggregated over all endpoints in the locality. - uint64 total_error_requests = 4; - - // The total number of requests that were issued by this Envoy since - // the last report. This information is aggregated over all the - // upstream endpoints in the locality. - uint64 total_issued_requests = 8; - - // Stats for multi-dimensional load balancing. - repeated EndpointLoadMetricStats load_metric_stats = 5; - - // Endpoint granularity stats information for this locality. This information - // is populated if the Server requests it by setting - // :ref:`LoadStatsResponse.report_endpoint_granularity`. - repeated UpstreamEndpointStats upstream_endpoint_stats = 7; - - // [#not-implemented-hide:] The priority of the endpoint group these metrics - // were collected from. - uint32 priority = 6; -} - -// [#next-free-field: 8] -message UpstreamEndpointStats { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.UpstreamEndpointStats"; - - // Upstream host address. - core.v4alpha.Address address = 1; - - // Opaque and implementation dependent metadata of the - // endpoint. Envoy will pass this directly to the management server. - google.protobuf.Struct metadata = 6; - - // 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 successfully. 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 for this endpoint. - 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; - - // The total number of requests that were issued to this endpoint - // since the last report. A single TCP connection, HTTP or gRPC - // request or stream is counted as one request. - uint64 total_issued_requests = 7; - - // Stats for multi-dimensional load balancing. - repeated EndpointLoadMetricStats load_metric_stats = 5; -} - -message EndpointLoadMetricStats { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.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` -// Next ID: 7 -// [#next-free-field: 7] -message ClusterStats { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.ClusterStats"; - - message DroppedRequests { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.ClusterStats.DroppedRequests"; - - // Identifier for the policy specifying the drop. - string category = 1 [(validate.rules).string = {min_len: 1}]; - - // Total number of deliberately dropped requests for the category. - uint64 dropped_count = 2; - } - - // The name of the cluster. - string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; - - // The eds_cluster_config service_name of the cluster. - // It's possible that two clusters send the same service_name to EDS, - // in that case, the management server is supposed to do aggregation on the load reports. - string cluster_service_name = 6; - - // 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 total number of dropped requests. This covers requests - // deliberately dropped by the drop_overload policy and circuit breaking. - uint64 total_dropped_requests = 3; - - // Information about deliberately dropped requests for each category specified - // in the DropOverload policy. - repeated DroppedRequests dropped_requests = 5; - - // Period over which the actual load report occurred. This will be guaranteed to include every - // request reported. Due to system load and delays between the *LoadStatsRequest* sent from Envoy - // and the *LoadStatsResponse* message sent from the management server, this may be longer than - // the requested load reporting interval in the *LoadStatsResponse*. - google.protobuf.Duration load_report_interval = 4; -} diff --git a/api/envoy/data/accesslog/v4alpha/BUILD b/api/envoy/data/accesslog/v4alpha/BUILD deleted file mode 100644 index c02cec9d67f6c..0000000000000 --- a/api/envoy/data/accesslog/v4alpha/BUILD +++ /dev/null @@ -1,13 +0,0 @@ -# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. - -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") - -licenses(["notice"]) # Apache 2 - -api_proto_package( - deps = [ - "//envoy/config/core/v4alpha:pkg", - "//envoy/data/accesslog/v3:pkg", - "@com_github_cncf_udpa//udpa/annotations:pkg", - ], -) diff --git a/api/envoy/data/accesslog/v4alpha/accesslog.proto b/api/envoy/data/accesslog/v4alpha/accesslog.proto deleted file mode 100644 index 1845017200266..0000000000000 --- a/api/envoy/data/accesslog/v4alpha/accesslog.proto +++ /dev/null @@ -1,425 +0,0 @@ -syntax = "proto3"; - -package envoy.data.accesslog.v4alpha; - -import "envoy/config/core/v4alpha/address.proto"; -import "envoy/config/core/v4alpha/base.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.data.accesslog.v4alpha"; -option java_outer_classname = "AccesslogProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: gRPC access logs] -// Envoy access logs describe incoming interaction with Envoy over a fixed -// period of time, and typically cover a single request/response exchange, -// (e.g. HTTP), stream (e.g. over HTTP/gRPC), or proxied connection (e.g. TCP). -// Access logs contain fields defined in protocol-specific protobuf messages. -// -// Except where explicitly declared otherwise, all fields describe -// *downstream* interaction between Envoy and a connected client. -// Fields describing *upstream* interaction will explicitly include ``upstream`` -// in their name. - -message TCPAccessLogEntry { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.TCPAccessLogEntry"; - - // Common properties shared by all Envoy access logs. - AccessLogCommon common_properties = 1; - - // Properties of the TCP connection. - ConnectionProperties connection_properties = 2; -} - -message HTTPAccessLogEntry { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.HTTPAccessLogEntry"; - - // HTTP version - enum HTTPVersion { - PROTOCOL_UNSPECIFIED = 0; - HTTP10 = 1; - HTTP11 = 2; - HTTP2 = 3; - HTTP3 = 4; - } - - // Common properties shared by all Envoy access logs. - AccessLogCommon common_properties = 1; - - HTTPVersion protocol_version = 2; - - // Description of the incoming HTTP request. - HTTPRequestProperties request = 3; - - // Description of the outgoing HTTP response. - HTTPResponseProperties response = 4; -} - -// Defines fields for a connection -message ConnectionProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.ConnectionProperties"; - - // Number of bytes received from downstream. - uint64 received_bytes = 1; - - // Number of bytes sent to downstream. - uint64 sent_bytes = 2; -} - -// Defines fields that are shared by all Envoy access logs. -// [#next-free-field: 22] -message AccessLogCommon { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.AccessLogCommon"; - - // [#not-implemented-hide:] - // This field indicates the rate at which this log entry was sampled. - // Valid range is (0.0, 1.0]. - double sample_rate = 1 [(validate.rules).double = {lte: 1.0 gt: 0.0}]; - - // This field is the remote/origin address on which the request from the user was received. - // Note: This may not be the physical peer. E.g, if the remote address is inferred from for - // example the x-forwarder-for header, proxy protocol, etc. - config.core.v4alpha.Address downstream_remote_address = 2; - - // This field is the local/destination address on which the request from the user was received. - config.core.v4alpha.Address downstream_local_address = 3; - - // If the connection is secure,S this field will contain TLS properties. - TLSProperties tls_properties = 4; - - // The time that Envoy started servicing this request. This is effectively the time that the first - // downstream byte is received. - google.protobuf.Timestamp start_time = 5; - - // Interval between the first downstream byte received and the last - // downstream byte received (i.e. time it takes to receive a request). - google.protobuf.Duration time_to_last_rx_byte = 6; - - // Interval between the first downstream byte received and the first upstream byte sent. There may - // by considerable delta between *time_to_last_rx_byte* and this value due to filters. - // Additionally, the same caveats apply as documented in *time_to_last_downstream_tx_byte* about - // not accounting for kernel socket buffer time, etc. - google.protobuf.Duration time_to_first_upstream_tx_byte = 7; - - // Interval between the first downstream byte received and the last upstream byte sent. There may - // by considerable delta between *time_to_last_rx_byte* and this value due to filters. - // Additionally, the same caveats apply as documented in *time_to_last_downstream_tx_byte* about - // not accounting for kernel socket buffer time, etc. - google.protobuf.Duration time_to_last_upstream_tx_byte = 8; - - // Interval between the first downstream byte received and the first upstream - // byte received (i.e. time it takes to start receiving a response). - google.protobuf.Duration time_to_first_upstream_rx_byte = 9; - - // Interval between the first downstream byte received and the last upstream - // byte received (i.e. time it takes to receive a complete response). - google.protobuf.Duration time_to_last_upstream_rx_byte = 10; - - // Interval between the first downstream byte received and the first downstream byte sent. - // There may be a considerable delta between the *time_to_first_upstream_rx_byte* and this field - // due to filters. Additionally, the same caveats apply as documented in - // *time_to_last_downstream_tx_byte* about not accounting for kernel socket buffer time, etc. - google.protobuf.Duration time_to_first_downstream_tx_byte = 11; - - // Interval between the first downstream byte received and the last downstream byte sent. - // Depending on protocol, buffering, windowing, filters, etc. there may be a considerable delta - // between *time_to_last_upstream_rx_byte* and this field. Note also that this is an approximate - // time. In the current implementation it does not include kernel socket buffer time. In the - // current implementation it also does not include send window buffering inside the HTTP/2 codec. - // In the future it is likely that work will be done to make this duration more accurate. - google.protobuf.Duration time_to_last_downstream_tx_byte = 12; - - // The upstream remote/destination address that handles this exchange. This does not include - // retries. - config.core.v4alpha.Address upstream_remote_address = 13; - - // The upstream local/origin address that handles this exchange. This does not include retries. - config.core.v4alpha.Address upstream_local_address = 14; - - // The upstream cluster that *upstream_remote_address* belongs to. - string upstream_cluster = 15; - - // Flags indicating occurrences during request/response processing. - ResponseFlags response_flags = 16; - - // All metadata encountered during request processing, including endpoint - // selection. - // - // This can be used to associate IDs attached to the various configurations - // used to process this request with the access log entry. For example, a - // route created from a higher level forwarding rule with some ID can place - // that ID in this field and cross reference later. It can also be used to - // determine if a canary endpoint was used or not. - config.core.v4alpha.Metadata metadata = 17; - - // If upstream connection failed due to transport socket (e.g. TLS handshake), provides the - // failure reason from the transport socket. The format of this field depends on the configured - // upstream transport socket. Common TLS failures are in - // :ref:`TLS trouble shooting `. - string upstream_transport_failure_reason = 18; - - // The name of the route - string route_name = 19; - - // This field is the downstream direct remote address on which the request from the user was - // received. Note: This is always the physical peer, even if the remote address is inferred from - // for example the x-forwarder-for header, proxy protocol, etc. - config.core.v4alpha.Address downstream_direct_remote_address = 20; - - // Map of filter state in stream info that have been configured to be logged. If the filter - // state serialized to any message other than `google.protobuf.Any` it will be packed into - // `google.protobuf.Any`. - map filter_state_objects = 21; -} - -// Flags indicating occurrences during request/response processing. -// [#next-free-field: 24] -message ResponseFlags { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.ResponseFlags"; - - message Unauthorized { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.ResponseFlags.Unauthorized"; - - // Reasons why the request was unauthorized - enum Reason { - REASON_UNSPECIFIED = 0; - - // The request was denied by the external authorization service. - EXTERNAL_SERVICE = 1; - } - - Reason reason = 1; - } - - // Indicates local server healthcheck failed. - bool failed_local_healthcheck = 1; - - // Indicates there was no healthy upstream. - bool no_healthy_upstream = 2; - - // Indicates an there was an upstream request timeout. - bool upstream_request_timeout = 3; - - // Indicates local codec level reset was sent on the stream. - bool local_reset = 4; - - // Indicates remote codec level reset was received on the stream. - bool upstream_remote_reset = 5; - - // Indicates there was a local reset by a connection pool due to an initial connection failure. - bool upstream_connection_failure = 6; - - // Indicates the stream was reset due to an upstream connection termination. - bool upstream_connection_termination = 7; - - // Indicates the stream was reset because of a resource overflow. - bool upstream_overflow = 8; - - // Indicates no route was found for the request. - bool no_route_found = 9; - - // Indicates that the request was delayed before proxying. - bool delay_injected = 10; - - // Indicates that the request was aborted with an injected error code. - bool fault_injected = 11; - - // Indicates that the request was rate-limited locally. - bool rate_limited = 12; - - // Indicates if the request was deemed unauthorized and the reason for it. - Unauthorized unauthorized_details = 13; - - // Indicates that the request was rejected because there was an error in rate limit service. - bool rate_limit_service_error = 14; - - // Indicates the stream was reset due to a downstream connection termination. - bool downstream_connection_termination = 15; - - // Indicates that the upstream retry limit was exceeded, resulting in a downstream error. - bool upstream_retry_limit_exceeded = 16; - - // Indicates that the stream idle timeout was hit, resulting in a downstream 408. - bool stream_idle_timeout = 17; - - // Indicates that the request was rejected because an envoy request header failed strict - // validation. - bool invalid_envoy_request_headers = 18; - - // Indicates there was an HTTP protocol error on the downstream request. - bool downstream_protocol_error = 19; - - // Indicates there was a max stream duration reached on the upstream request. - bool upstream_max_stream_duration_reached = 20; - - // Indicates the response was served from a cache filter. - bool response_from_cache_filter = 21; - - // Indicates that a filter configuration is not available. - bool no_filter_config_found = 22; - - // Indicates that request or connection exceeded the downstream connection duration. - bool duration_timeout = 23; -} - -// Properties of a negotiated TLS connection. -// [#next-free-field: 7] -message TLSProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.TLSProperties"; - - enum TLSVersion { - VERSION_UNSPECIFIED = 0; - TLSv1 = 1; - TLSv1_1 = 2; - TLSv1_2 = 3; - TLSv1_3 = 4; - } - - message CertificateProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.TLSProperties.CertificateProperties"; - - message SubjectAltName { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.TLSProperties.CertificateProperties.SubjectAltName"; - - oneof san { - string uri = 1; - - // [#not-implemented-hide:] - string dns = 2; - } - } - - // SANs present in the certificate. - repeated SubjectAltName subject_alt_name = 1; - - // The subject field of the certificate. - string subject = 2; - } - - // Version of TLS that was negotiated. - TLSVersion tls_version = 1; - - // TLS cipher suite negotiated during handshake. The value is a - // four-digit hex code defined by the IANA TLS Cipher Suite Registry - // (e.g. ``009C`` for ``TLS_RSA_WITH_AES_128_GCM_SHA256``). - // - // Here it is expressed as an integer. - google.protobuf.UInt32Value tls_cipher_suite = 2; - - // SNI hostname from handshake. - string tls_sni_hostname = 3; - - // Properties of the local certificate used to negotiate TLS. - CertificateProperties local_certificate_properties = 4; - - // Properties of the peer certificate used to negotiate TLS. - CertificateProperties peer_certificate_properties = 5; - - // The TLS session ID. - string tls_session_id = 6; -} - -// [#next-free-field: 14] -message HTTPRequestProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.HTTPRequestProperties"; - - // The request method (RFC 7231/2616). - config.core.v4alpha.RequestMethod request_method = 1 - [(validate.rules).enum = {defined_only: true}]; - - // The scheme portion of the incoming request URI. - string scheme = 2; - - // HTTP/2 ``:authority`` or HTTP/1.1 ``Host`` header value. - string authority = 3; - - // The port of the incoming request URI - // (unused currently, as port is composed onto authority). - google.protobuf.UInt32Value port = 4; - - // The path portion from the incoming request URI. - string path = 5; - - // Value of the ``User-Agent`` request header. - string user_agent = 6; - - // Value of the ``Referer`` request header. - string referer = 7; - - // Value of the ``X-Forwarded-For`` request header. - string forwarded_for = 8; - - // Value of the ``X-Request-Id`` request header - // - // This header is used by Envoy to uniquely identify a request. - // It will be generated for all external requests and internal requests that - // do not already have a request ID. - string request_id = 9; - - // Value of the ``X-Envoy-Original-Path`` request header. - string original_path = 10; - - // Size of the HTTP request headers in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. - uint64 request_headers_bytes = 11; - - // Size of the HTTP request body in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. - uint64 request_body_bytes = 12; - - // Map of additional headers that have been configured to be logged. - map request_headers = 13; -} - -// [#next-free-field: 7] -message HTTPResponseProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.HTTPResponseProperties"; - - // The HTTP response code returned by Envoy. - google.protobuf.UInt32Value response_code = 1; - - // Size of the HTTP response headers in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. - uint64 response_headers_bytes = 2; - - // Size of the HTTP response body in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. - uint64 response_body_bytes = 3; - - // Map of additional headers configured to be logged. - map response_headers = 4; - - // Map of trailers configured to be logged. - map response_trailers = 5; - - // The HTTP response code details. - string response_code_details = 6; -} diff --git a/api/envoy/extensions/access_loggers/grpc/v4alpha/als.proto b/api/envoy/extensions/access_loggers/grpc/v4alpha/als.proto index 9605a05c4128c..c7bf15948b231 100644 --- a/api/envoy/extensions/access_loggers/grpc/v4alpha/als.proto +++ b/api/envoy/extensions/access_loggers/grpc/v4alpha/als.proto @@ -31,15 +31,15 @@ message HttpGrpcAccessLogConfig { CommonGrpcAccessLogConfig common_config = 1 [(validate.rules).message = {required: true}]; // Additional request headers to log in :ref:`HTTPRequestProperties.request_headers - // `. + // `. repeated string additional_request_headers_to_log = 2; // Additional response headers to log in :ref:`HTTPResponseProperties.response_headers - // `. + // `. repeated string additional_response_headers_to_log = 3; // Additional response trailers to log in :ref:`HTTPResponseProperties.response_trailers - // `. + // `. repeated string additional_response_trailers_to_log = 4; } @@ -83,7 +83,7 @@ message CommonGrpcAccessLogConfig { google.protobuf.UInt32Value buffer_size_bytes = 4; // Additional filter state objects to log in :ref:`filter_state_objects - // `. + // `. // Logger will call `FilterState::Object::serializeAsProto` to serialize the filter state object. repeated string filter_state_objects_to_log = 5; } diff --git a/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD b/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD deleted file mode 100644 index df5de314366ab..0000000000000 --- a/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD +++ /dev/null @@ -1,13 +0,0 @@ -# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. - -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") - -licenses(["notice"]) # Apache 2 - -api_proto_package( - deps = [ - "//envoy/config/core/v4alpha:pkg", - "//envoy/extensions/retry/host/omit_host_metadata/v3:pkg", - "@com_github_cncf_udpa//udpa/annotations:pkg", - ], -) diff --git a/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto b/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto deleted file mode 100644 index 043d5ce3cfa06..0000000000000 --- a/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.retry.host.omit_host_metadata.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.retry.host.omit_host_metadata.v4alpha"; -option java_outer_classname = "OmitHostMetadataConfigProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Omit host metadata retry predicate] - -// A retry host predicate that can be used to reject a host based on -// predefined metadata match criteria. -// [#extension: envoy.retry_host_predicates.omit_host_metadata] -message OmitHostMetadataConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.retry.host.omit_host_metadata.v3.OmitHostMetadataConfig"; - - // Retry host predicate metadata match criteria. The hosts in - // the upstream cluster with matching metadata will be omitted while - // attempting a retry of a failed request. The metadata should be specified - // under the *envoy.lb* key. - config.core.v4alpha.Metadata metadata_match = 1; -} diff --git a/api/envoy/service/accesslog/v4alpha/BUILD b/api/envoy/service/accesslog/v4alpha/BUILD index ef86c64ac7e5f..94c70bc66967b 100644 --- a/api/envoy/service/accesslog/v4alpha/BUILD +++ b/api/envoy/service/accesslog/v4alpha/BUILD @@ -8,7 +8,7 @@ api_proto_package( has_services = True, deps = [ "//envoy/config/core/v4alpha:pkg", - "//envoy/data/accesslog/v4alpha:pkg", + "//envoy/data/accesslog/v3:pkg", "//envoy/service/accesslog/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/api/envoy/service/accesslog/v4alpha/als.proto b/api/envoy/service/accesslog/v4alpha/als.proto index 3ce1008ec48fb..e2c8bbbc80689 100644 --- a/api/envoy/service/accesslog/v4alpha/als.proto +++ b/api/envoy/service/accesslog/v4alpha/als.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package envoy.service.accesslog.v4alpha; import "envoy/config/core/v4alpha/base.proto"; -import "envoy/data/accesslog/v4alpha/accesslog.proto"; +import "envoy/data/accesslog/v3/accesslog.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; @@ -58,7 +58,7 @@ message StreamAccessLogsMessage { option (udpa.annotations.versioning).previous_message_type = "envoy.service.accesslog.v3.StreamAccessLogsMessage.HTTPAccessLogEntries"; - repeated data.accesslog.v4alpha.HTTPAccessLogEntry log_entry = 1 + repeated data.accesslog.v3.HTTPAccessLogEntry log_entry = 1 [(validate.rules).repeated = {min_items: 1}]; } @@ -67,7 +67,7 @@ message StreamAccessLogsMessage { option (udpa.annotations.versioning).previous_message_type = "envoy.service.accesslog.v3.StreamAccessLogsMessage.TCPAccessLogEntries"; - repeated data.accesslog.v4alpha.TCPAccessLogEntry log_entry = 1 + repeated data.accesslog.v3.TCPAccessLogEntry log_entry = 1 [(validate.rules).repeated = {min_items: 1}]; } diff --git a/api/envoy/service/health/v4alpha/BUILD b/api/envoy/service/health/v4alpha/BUILD index ed1ef41e94009..60bd19511855e 100644 --- a/api/envoy/service/health/v4alpha/BUILD +++ b/api/envoy/service/health/v4alpha/BUILD @@ -9,7 +9,7 @@ api_proto_package( deps = [ "//envoy/config/cluster/v4alpha:pkg", "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v4alpha:pkg", + "//envoy/config/endpoint/v3:pkg", "//envoy/service/health/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/api/envoy/service/health/v4alpha/hds.proto b/api/envoy/service/health/v4alpha/hds.proto index ee4a7c86f94c6..537d20b58cbb3 100644 --- a/api/envoy/service/health/v4alpha/hds.proto +++ b/api/envoy/service/health/v4alpha/hds.proto @@ -5,7 +5,7 @@ package envoy.service.health.v4alpha; import "envoy/config/cluster/v4alpha/cluster.proto"; import "envoy/config/core/v4alpha/base.proto"; import "envoy/config/core/v4alpha/health_check.proto"; -import "envoy/config/endpoint/v4alpha/endpoint_components.proto"; +import "envoy/config/endpoint/v3/endpoint_components.proto"; import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; @@ -103,7 +103,7 @@ message EndpointHealth { option (udpa.annotations.versioning).previous_message_type = "envoy.service.health.v3.EndpointHealth"; - config.endpoint.v4alpha.Endpoint endpoint = 1; + config.endpoint.v3.Endpoint endpoint = 1; config.core.v4alpha.HealthStatus health_status = 2; } @@ -158,7 +158,7 @@ message LocalityEndpoints { config.core.v4alpha.Locality locality = 1; - repeated config.endpoint.v4alpha.Endpoint endpoints = 2; + repeated config.endpoint.v3.Endpoint endpoints = 2; } // The cluster name and locality is provided to Envoy for the endpoints that it diff --git a/api/envoy/service/load_stats/v4alpha/BUILD b/api/envoy/service/load_stats/v4alpha/BUILD index 870673013a0e6..91d914645041b 100644 --- a/api/envoy/service/load_stats/v4alpha/BUILD +++ b/api/envoy/service/load_stats/v4alpha/BUILD @@ -8,7 +8,7 @@ api_proto_package( has_services = True, deps = [ "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v4alpha:pkg", + "//envoy/config/endpoint/v3:pkg", "//envoy/service/load_stats/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/api/envoy/service/load_stats/v4alpha/lrs.proto b/api/envoy/service/load_stats/v4alpha/lrs.proto index 344a4ef1094a7..69eb3d707d5e1 100644 --- a/api/envoy/service/load_stats/v4alpha/lrs.proto +++ b/api/envoy/service/load_stats/v4alpha/lrs.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package envoy.service.load_stats.v4alpha; import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/endpoint/v4alpha/load_report.proto"; +import "envoy/config/endpoint/v3/load_report.proto"; import "google/protobuf/duration.proto"; @@ -68,7 +68,7 @@ message LoadStatsRequest { config.core.v4alpha.Node node = 1; // A list of load stats to report. - repeated config.endpoint.v4alpha.ClusterStats cluster_stats = 2; + repeated config.endpoint.v3.ClusterStats cluster_stats = 2; } // The management server sends envoy a LoadStatsResponse with all clusters it diff --git a/generated_api_shadow/envoy/config/cluster/v4alpha/BUILD b/generated_api_shadow/envoy/config/cluster/v4alpha/BUILD index 49a44abbd4f75..2bac8db17256c 100644 --- a/generated_api_shadow/envoy/config/cluster/v4alpha/BUILD +++ b/generated_api_shadow/envoy/config/cluster/v4alpha/BUILD @@ -9,7 +9,7 @@ api_proto_package( "//envoy/annotations:pkg", "//envoy/config/cluster/v3:pkg", "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v4alpha:pkg", + "//envoy/config/endpoint/v3:pkg", "//envoy/type/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", "@com_github_cncf_udpa//xds/core/v3:pkg", diff --git a/generated_api_shadow/envoy/config/cluster/v4alpha/cluster.proto b/generated_api_shadow/envoy/config/cluster/v4alpha/cluster.proto index 52fc1a004b881..bad0bc43faaf7 100644 --- a/generated_api_shadow/envoy/config/cluster/v4alpha/cluster.proto +++ b/generated_api_shadow/envoy/config/cluster/v4alpha/cluster.proto @@ -11,7 +11,7 @@ import "envoy/config/core/v4alpha/config_source.proto"; import "envoy/config/core/v4alpha/extension.proto"; import "envoy/config/core/v4alpha/health_check.proto"; import "envoy/config/core/v4alpha/protocol.proto"; -import "envoy/config/endpoint/v4alpha/endpoint.proto"; +import "envoy/config/endpoint/v3/endpoint.proto"; import "envoy/type/v3/percent.proto"; import "google/protobuf/any.proto"; @@ -638,7 +638,7 @@ message Cluster { // Configuration to use different transport sockets for different endpoints. // The entry of *envoy.transport_socket_match* in the - // :ref:`LbEndpoint.Metadata ` + // :ref:`LbEndpoint.Metadata ` // is used to match against the transport sockets as they appear in the list. The first // :ref:`match ` is used. // For example, with the following match @@ -739,9 +739,9 @@ message Cluster { // .. attention:: // // Setting this allows non-EDS cluster types to contain embedded EDS equivalent - // :ref:`endpoint assignments`. + // :ref:`endpoint assignments`. // - endpoint.v4alpha.ClusterLoadAssignment load_assignment = 33; + endpoint.v3.ClusterLoadAssignment load_assignment = 33; // Optional :ref:`active health checking ` // configuration for the cluster. If no diff --git a/generated_api_shadow/envoy/config/core/v3/base.proto b/generated_api_shadow/envoy/config/core/v3/base.proto index 83dfce7eb5f2a..1277eb91baf18 100644 --- a/generated_api_shadow/envoy/config/core/v3/base.proto +++ b/generated_api_shadow/envoy/config/core/v3/base.proto @@ -235,11 +235,8 @@ message Metadata { // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. - map filter_metadata = 1 [deprecated = true]; + map filter_metadata = 1; - // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* - // namespace is reserved for Envoy's built-in filters. - // The value is encoded as google.protobuf.Any. map typed_filter_metadata = 2; } diff --git a/generated_api_shadow/envoy/config/core/v4alpha/base.proto b/generated_api_shadow/envoy/config/core/v4alpha/base.proto index 853e5f515c112..c945c7aee1a7c 100644 --- a/generated_api_shadow/envoy/config/core/v4alpha/base.proto +++ b/generated_api_shadow/envoy/config/core/v4alpha/base.proto @@ -73,7 +73,7 @@ message Locality { // Defines the local service zone where Envoy is running. Though optional, it // should be set if discovery service routing is used and the discovery - // service exposes :ref:`zone data `, + // service exposes :ref:`zone data `, // either in this message or via :option:`--service-zone`. The meaning of zone // is context dependent, e.g. `Availability Zone (AZ) // `_ @@ -235,12 +235,8 @@ message Metadata { // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. - map hidden_envoy_deprecated_filter_metadata = 1 - [deprecated = true]; + map filter_metadata = 1; - // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* - // namespace is reserved for Envoy's built-in filters. - // The value is encoded as google.protobuf.Any. map typed_filter_metadata = 2; } diff --git a/generated_api_shadow/envoy/config/core/v4alpha/health_check.proto b/generated_api_shadow/envoy/config/core/v4alpha/health_check.proto index 90aaa057b0faf..ddc7d65e00075 100644 --- a/generated_api_shadow/envoy/config/core/v4alpha/health_check.proto +++ b/generated_api_shadow/envoy/config/core/v4alpha/health_check.proto @@ -85,7 +85,7 @@ message HealthCheck { // The value of the host header in the HTTP health check request. If // left empty (default value), the name of the cluster this health check is associated // with will be used. The host header can be customized for a specific endpoint by setting the - // :ref:`hostname ` field. + // :ref:`hostname ` field. string host = 1 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; // Specifies the HTTP path that will be requested during health checking. For example @@ -170,7 +170,7 @@ message HealthCheck { // The value of the :authority header in the gRPC health check request. If // left empty (default value), the name of the cluster this health check is associated // with will be used. The authority header can be customized for a specific endpoint by setting - // the :ref:`hostname ` field. + // the :ref:`hostname ` field. string authority = 2 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; } @@ -360,7 +360,7 @@ message HealthCheck { // config: { ... } # tls socket configuration // // If this field is set, then for health checks it will supersede an entry of *envoy.transport_socket* in the - // :ref:`LbEndpoint.Metadata `. + // :ref:`LbEndpoint.Metadata `. // This allows using different transport socket capabilities for health checking versus proxying to the // endpoint. // diff --git a/generated_api_shadow/envoy/config/endpoint/v4alpha/BUILD b/generated_api_shadow/envoy/config/endpoint/v4alpha/BUILD deleted file mode 100644 index 79d52ad4cfbc6..0000000000000 --- a/generated_api_shadow/envoy/config/endpoint/v4alpha/BUILD +++ /dev/null @@ -1,14 +0,0 @@ -# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. - -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") - -licenses(["notice"]) # Apache 2 - -api_proto_package( - deps = [ - "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v3:pkg", - "//envoy/type/v3:pkg", - "@com_github_cncf_udpa//udpa/annotations:pkg", - ], -) diff --git a/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint.proto b/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint.proto deleted file mode 100644 index 0d4d4684d2c10..0000000000000 --- a/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint.proto +++ /dev/null @@ -1,119 +0,0 @@ -syntax = "proto3"; - -package envoy.config.endpoint.v4alpha; - -import "envoy/config/endpoint/v4alpha/endpoint_components.proto"; -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; -option java_outer_classname = "EndpointProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Endpoint configuration] -// Endpoint discovery :ref:`architecture overview ` - -// Each route from RDS will map to a single cluster or traffic split across -// clusters using weights expressed in the RDS WeightedCluster. -// -// With EDS, each cluster is treated independently from a LB perspective, with -// LB taking place between the Localities within a cluster and at a finer -// granularity between the hosts within a locality. The percentage of traffic -// for each endpoint is determined by both its load_balancing_weight, and the -// load_balancing_weight of its locality. First, a locality will be selected, -// then an endpoint within that locality will be chose based on its weight. -// [#next-free-field: 6] -message ClusterLoadAssignment { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.ClusterLoadAssignment"; - - // Load balancing policy settings. - // [#next-free-field: 6] - message Policy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.ClusterLoadAssignment.Policy"; - - // [#not-implemented-hide:] - message DropOverload { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload"; - - // Identifier for the policy specifying the drop. - string category = 1 [(validate.rules).string = {min_len: 1}]; - - // Percentage of traffic that should be dropped for the category. - type.v3.FractionalPercent drop_percentage = 2; - } - - reserved 1, 5; - - reserved "disable_overprovisioning"; - - // Action to trim the overall incoming traffic to protect the upstream - // hosts. This action allows protection in case the hosts are unable to - // recover from an outage, or unable to autoscale or unable to handle - // incoming traffic volume for any reason. - // - // At the client each category is applied one after the other to generate - // the 'actual' drop percentage on all outgoing traffic. For example: - // - // .. code-block:: json - // - // { "drop_overloads": [ - // { "category": "throttle", "drop_percentage": 60 } - // { "category": "lb", "drop_percentage": 50 } - // ]} - // - // The actual drop percentages applied to the traffic at the clients will be - // "throttle"_drop = 60% - // "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%. - // actual_outgoing_load = 20% // remaining after applying all categories. - // [#not-implemented-hide:] - repeated DropOverload drop_overloads = 2; - - // Priority levels and localities are considered overprovisioned with this - // factor (in percentage). This means that we don't consider a priority - // level or locality unhealthy until the fraction of healthy hosts - // multiplied by the overprovisioning factor drops below 100. - // With the default value 140(1.4), Envoy doesn't consider a priority level - // or a locality unhealthy until their percentage of healthy hosts drops - // below 72%. For example: - // - // .. code-block:: json - // - // { "overprovisioning_factor": 100 } - // - // Read more at :ref:`priority levels ` and - // :ref:`localities `. - google.protobuf.UInt32Value overprovisioning_factor = 3 [(validate.rules).uint32 = {gt: 0}]; - - // The max time until which the endpoints from this assignment can be used. - // If no new assignments are received before this time expires the endpoints - // are considered stale and should be marked unhealthy. - // Defaults to 0 which means endpoints never go stale. - google.protobuf.Duration endpoint_stale_after = 4 [(validate.rules).duration = {gt {}}]; - } - - // Name of the cluster. This will be the :ref:`service_name - // ` value if specified - // in the cluster :ref:`EdsClusterConfig - // `. - string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; - - // List of endpoints to load balance to. - repeated LocalityLbEndpoints endpoints = 2; - - // Map of named endpoints that can be referenced in LocalityLbEndpoints. - // [#not-implemented-hide:] - map named_endpoints = 5; - - // Load balancing policy settings. - Policy policy = 4; -} diff --git a/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint_components.proto b/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint_components.proto deleted file mode 100644 index 246d569d28464..0000000000000 --- a/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint_components.proto +++ /dev/null @@ -1,158 +0,0 @@ -syntax = "proto3"; - -package envoy.config.endpoint.v4alpha; - -import "envoy/config/core/v4alpha/address.proto"; -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/core/v4alpha/health_check.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; -option java_outer_classname = "EndpointComponentsProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Endpoints] - -// Upstream host identifier. -message Endpoint { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.endpoint.v3.Endpoint"; - - // The optional health check configuration. - message HealthCheckConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.Endpoint.HealthCheckConfig"; - - // Optional alternative health check port value. - // - // By default the health check address port of an upstream host is the same - // as the host's serving address port. This provides an alternative health - // check port. Setting this with a non-zero value allows an upstream host - // to have different health check address port. - uint32 port_value = 1 [(validate.rules).uint32 = {lte: 65535}]; - - // By default, the host header for L7 health checks is controlled by cluster level configuration - // (see: :ref:`host ` and - // :ref:`authority `). Setting this - // to a non-empty value allows overriding the cluster level configuration for a specific - // endpoint. - string hostname = 2; - } - - // The upstream host address. - // - // .. attention:: - // - // The form of host address depends on the given cluster type. For STATIC or EDS, - // it is expected to be a direct IP address (or something resolvable by the - // specified :ref:`resolver ` - // in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname, - // and will be resolved via DNS. - core.v4alpha.Address address = 1; - - // The optional health check configuration is used as configuration for the - // health checker to contact the health checked host. - // - // .. attention:: - // - // This takes into effect only for upstream clusters with - // :ref:`active health checking ` enabled. - HealthCheckConfig health_check_config = 2; - - // The hostname associated with this endpoint. This hostname is not used for routing or address - // resolution. If provided, it will be associated with the endpoint, and can be used for features - // that require a hostname, like - // :ref:`auto_host_rewrite `. - string hostname = 3; -} - -// An Endpoint that Envoy can route traffic to. -// [#next-free-field: 6] -message LbEndpoint { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.LbEndpoint"; - - // Upstream host identifier or a named reference. - oneof host_identifier { - Endpoint endpoint = 1; - - // [#not-implemented-hide:] - string endpoint_name = 5; - } - - // Optional health status when known and supplied by EDS server. - core.v4alpha.HealthStatus health_status = 2; - - // The endpoint metadata specifies values that may be used by the load - // balancer to select endpoints in a cluster for a given request. The filter - // name should be specified as *envoy.lb*. An example boolean key-value pair - // is *canary*, providing the optional canary status of the upstream host. - // This may be matched against in a route's - // :ref:`RouteAction ` metadata_match field - // to subset the endpoints considered in cluster load balancing. - core.v4alpha.Metadata metadata = 3; - - // The optional load balancing weight of the upstream host; at least 1. - // Envoy uses the load balancing weight in some of the built in load - // balancers. The load balancing weight for an endpoint is divided by the sum - // of the weights of all endpoints in the endpoint's locality to produce a - // percentage of traffic for the endpoint. This percentage is then further - // weighted by the endpoint's locality's load balancing weight from - // LocalityLbEndpoints. If unspecified, each host is presumed to have equal - // weight in a locality. The sum of the weights of all endpoints in the - // endpoint's locality must not exceed uint32_t maximal value (4294967295). - google.protobuf.UInt32Value load_balancing_weight = 4 [(validate.rules).uint32 = {gte: 1}]; -} - -// A group of endpoints belonging to a Locality. -// One can have multiple LocalityLbEndpoints for a locality, but this is -// generally only done if the different groups need to have different load -// balancing weights or different priorities. -// [#next-free-field: 7] -message LocalityLbEndpoints { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.LocalityLbEndpoints"; - - // Identifies location of where the upstream hosts run. - core.v4alpha.Locality locality = 1; - - // The group of endpoints belonging to the locality specified. - repeated LbEndpoint lb_endpoints = 2; - - // Optional: Per priority/region/zone/sub_zone weight; at least 1. The load - // balancing weight for a locality is divided by the sum of the weights of all - // localities at the same priority level to produce the effective percentage - // of traffic for the locality. The sum of the weights of all localities at - // the same priority level must not exceed uint32_t maximal value (4294967295). - // - // Locality weights are only considered when :ref:`locality weighted load - // balancing ` is - // configured. These weights are ignored otherwise. If no weights are - // specified when locality weighted load balancing is enabled, the locality is - // assigned no load. - google.protobuf.UInt32Value load_balancing_weight = 3 [(validate.rules).uint32 = {gte: 1}]; - - // Optional: the priority for this LocalityLbEndpoints. If unspecified this will - // default to the highest priority (0). - // - // Under usual circumstances, Envoy will only select endpoints for the highest - // priority (0). In the event all endpoints for a particular priority are - // unavailable/unhealthy, Envoy will fail over to selecting endpoints for the - // next highest priority group. - // - // Priorities should range from 0 (highest) to N (lowest) without skipping. - uint32 priority = 5 [(validate.rules).uint32 = {lte: 128}]; - - // Optional: Per locality proximity value which indicates how close this - // locality is from the source locality. This value only provides ordering - // information (lower the value, closer it is to the source locality). - // This will be consumed by load balancing schemes that need proximity order - // to determine where to route the requests. - // [#not-implemented-hide:] - google.protobuf.UInt32Value proximity = 6; -} diff --git a/generated_api_shadow/envoy/config/endpoint/v4alpha/load_report.proto b/generated_api_shadow/envoy/config/endpoint/v4alpha/load_report.proto deleted file mode 100644 index 80be59041d742..0000000000000 --- a/generated_api_shadow/envoy/config/endpoint/v4alpha/load_report.proto +++ /dev/null @@ -1,168 +0,0 @@ -syntax = "proto3"; - -package envoy.config.endpoint.v4alpha; - -import "envoy/config/core/v4alpha/address.proto"; -import "envoy/config/core/v4alpha/base.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; -option java_outer_classname = "LoadReportProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Load Report] - -// These are stats Envoy reports to the management server at a frequency defined by -// :ref:`LoadStatsResponse.load_reporting_interval`. -// Stats per upstream region/zone and optionally per subzone. -// [#next-free-field: 9] -message UpstreamLocalityStats { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.UpstreamLocalityStats"; - - // Name of zone, region and optionally endpoint group these metrics were - // collected from. Zone and region names could be empty if unknown. - core.v4alpha.Locality locality = 1; - - // The total number of requests successfully completed by the endpoints in the - // locality. - 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, - // aggregated over all endpoints in the locality. - uint64 total_error_requests = 4; - - // The total number of requests that were issued by this Envoy since - // the last report. This information is aggregated over all the - // upstream endpoints in the locality. - uint64 total_issued_requests = 8; - - // Stats for multi-dimensional load balancing. - repeated EndpointLoadMetricStats load_metric_stats = 5; - - // Endpoint granularity stats information for this locality. This information - // is populated if the Server requests it by setting - // :ref:`LoadStatsResponse.report_endpoint_granularity`. - repeated UpstreamEndpointStats upstream_endpoint_stats = 7; - - // [#not-implemented-hide:] The priority of the endpoint group these metrics - // were collected from. - uint32 priority = 6; -} - -// [#next-free-field: 8] -message UpstreamEndpointStats { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.UpstreamEndpointStats"; - - // Upstream host address. - core.v4alpha.Address address = 1; - - // Opaque and implementation dependent metadata of the - // endpoint. Envoy will pass this directly to the management server. - google.protobuf.Struct metadata = 6; - - // 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 successfully. 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 for this endpoint. - 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; - - // The total number of requests that were issued to this endpoint - // since the last report. A single TCP connection, HTTP or gRPC - // request or stream is counted as one request. - uint64 total_issued_requests = 7; - - // Stats for multi-dimensional load balancing. - repeated EndpointLoadMetricStats load_metric_stats = 5; -} - -message EndpointLoadMetricStats { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.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` -// Next ID: 7 -// [#next-free-field: 7] -message ClusterStats { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.ClusterStats"; - - message DroppedRequests { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.ClusterStats.DroppedRequests"; - - // Identifier for the policy specifying the drop. - string category = 1 [(validate.rules).string = {min_len: 1}]; - - // Total number of deliberately dropped requests for the category. - uint64 dropped_count = 2; - } - - // The name of the cluster. - string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; - - // The eds_cluster_config service_name of the cluster. - // It's possible that two clusters send the same service_name to EDS, - // in that case, the management server is supposed to do aggregation on the load reports. - string cluster_service_name = 6; - - // 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 total number of dropped requests. This covers requests - // deliberately dropped by the drop_overload policy and circuit breaking. - uint64 total_dropped_requests = 3; - - // Information about deliberately dropped requests for each category specified - // in the DropOverload policy. - repeated DroppedRequests dropped_requests = 5; - - // Period over which the actual load report occurred. This will be guaranteed to include every - // request reported. Due to system load and delays between the *LoadStatsRequest* sent from Envoy - // and the *LoadStatsResponse* message sent from the management server, this may be longer than - // the requested load reporting interval in the *LoadStatsResponse*. - google.protobuf.Duration load_report_interval = 4; -} diff --git a/generated_api_shadow/envoy/data/accesslog/v4alpha/BUILD b/generated_api_shadow/envoy/data/accesslog/v4alpha/BUILD deleted file mode 100644 index c02cec9d67f6c..0000000000000 --- a/generated_api_shadow/envoy/data/accesslog/v4alpha/BUILD +++ /dev/null @@ -1,13 +0,0 @@ -# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. - -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") - -licenses(["notice"]) # Apache 2 - -api_proto_package( - deps = [ - "//envoy/config/core/v4alpha:pkg", - "//envoy/data/accesslog/v3:pkg", - "@com_github_cncf_udpa//udpa/annotations:pkg", - ], -) diff --git a/generated_api_shadow/envoy/data/accesslog/v4alpha/accesslog.proto b/generated_api_shadow/envoy/data/accesslog/v4alpha/accesslog.proto deleted file mode 100644 index 1845017200266..0000000000000 --- a/generated_api_shadow/envoy/data/accesslog/v4alpha/accesslog.proto +++ /dev/null @@ -1,425 +0,0 @@ -syntax = "proto3"; - -package envoy.data.accesslog.v4alpha; - -import "envoy/config/core/v4alpha/address.proto"; -import "envoy/config/core/v4alpha/base.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.data.accesslog.v4alpha"; -option java_outer_classname = "AccesslogProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: gRPC access logs] -// Envoy access logs describe incoming interaction with Envoy over a fixed -// period of time, and typically cover a single request/response exchange, -// (e.g. HTTP), stream (e.g. over HTTP/gRPC), or proxied connection (e.g. TCP). -// Access logs contain fields defined in protocol-specific protobuf messages. -// -// Except where explicitly declared otherwise, all fields describe -// *downstream* interaction between Envoy and a connected client. -// Fields describing *upstream* interaction will explicitly include ``upstream`` -// in their name. - -message TCPAccessLogEntry { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.TCPAccessLogEntry"; - - // Common properties shared by all Envoy access logs. - AccessLogCommon common_properties = 1; - - // Properties of the TCP connection. - ConnectionProperties connection_properties = 2; -} - -message HTTPAccessLogEntry { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.HTTPAccessLogEntry"; - - // HTTP version - enum HTTPVersion { - PROTOCOL_UNSPECIFIED = 0; - HTTP10 = 1; - HTTP11 = 2; - HTTP2 = 3; - HTTP3 = 4; - } - - // Common properties shared by all Envoy access logs. - AccessLogCommon common_properties = 1; - - HTTPVersion protocol_version = 2; - - // Description of the incoming HTTP request. - HTTPRequestProperties request = 3; - - // Description of the outgoing HTTP response. - HTTPResponseProperties response = 4; -} - -// Defines fields for a connection -message ConnectionProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.ConnectionProperties"; - - // Number of bytes received from downstream. - uint64 received_bytes = 1; - - // Number of bytes sent to downstream. - uint64 sent_bytes = 2; -} - -// Defines fields that are shared by all Envoy access logs. -// [#next-free-field: 22] -message AccessLogCommon { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.AccessLogCommon"; - - // [#not-implemented-hide:] - // This field indicates the rate at which this log entry was sampled. - // Valid range is (0.0, 1.0]. - double sample_rate = 1 [(validate.rules).double = {lte: 1.0 gt: 0.0}]; - - // This field is the remote/origin address on which the request from the user was received. - // Note: This may not be the physical peer. E.g, if the remote address is inferred from for - // example the x-forwarder-for header, proxy protocol, etc. - config.core.v4alpha.Address downstream_remote_address = 2; - - // This field is the local/destination address on which the request from the user was received. - config.core.v4alpha.Address downstream_local_address = 3; - - // If the connection is secure,S this field will contain TLS properties. - TLSProperties tls_properties = 4; - - // The time that Envoy started servicing this request. This is effectively the time that the first - // downstream byte is received. - google.protobuf.Timestamp start_time = 5; - - // Interval between the first downstream byte received and the last - // downstream byte received (i.e. time it takes to receive a request). - google.protobuf.Duration time_to_last_rx_byte = 6; - - // Interval between the first downstream byte received and the first upstream byte sent. There may - // by considerable delta between *time_to_last_rx_byte* and this value due to filters. - // Additionally, the same caveats apply as documented in *time_to_last_downstream_tx_byte* about - // not accounting for kernel socket buffer time, etc. - google.protobuf.Duration time_to_first_upstream_tx_byte = 7; - - // Interval between the first downstream byte received and the last upstream byte sent. There may - // by considerable delta between *time_to_last_rx_byte* and this value due to filters. - // Additionally, the same caveats apply as documented in *time_to_last_downstream_tx_byte* about - // not accounting for kernel socket buffer time, etc. - google.protobuf.Duration time_to_last_upstream_tx_byte = 8; - - // Interval between the first downstream byte received and the first upstream - // byte received (i.e. time it takes to start receiving a response). - google.protobuf.Duration time_to_first_upstream_rx_byte = 9; - - // Interval between the first downstream byte received and the last upstream - // byte received (i.e. time it takes to receive a complete response). - google.protobuf.Duration time_to_last_upstream_rx_byte = 10; - - // Interval between the first downstream byte received and the first downstream byte sent. - // There may be a considerable delta between the *time_to_first_upstream_rx_byte* and this field - // due to filters. Additionally, the same caveats apply as documented in - // *time_to_last_downstream_tx_byte* about not accounting for kernel socket buffer time, etc. - google.protobuf.Duration time_to_first_downstream_tx_byte = 11; - - // Interval between the first downstream byte received and the last downstream byte sent. - // Depending on protocol, buffering, windowing, filters, etc. there may be a considerable delta - // between *time_to_last_upstream_rx_byte* and this field. Note also that this is an approximate - // time. In the current implementation it does not include kernel socket buffer time. In the - // current implementation it also does not include send window buffering inside the HTTP/2 codec. - // In the future it is likely that work will be done to make this duration more accurate. - google.protobuf.Duration time_to_last_downstream_tx_byte = 12; - - // The upstream remote/destination address that handles this exchange. This does not include - // retries. - config.core.v4alpha.Address upstream_remote_address = 13; - - // The upstream local/origin address that handles this exchange. This does not include retries. - config.core.v4alpha.Address upstream_local_address = 14; - - // The upstream cluster that *upstream_remote_address* belongs to. - string upstream_cluster = 15; - - // Flags indicating occurrences during request/response processing. - ResponseFlags response_flags = 16; - - // All metadata encountered during request processing, including endpoint - // selection. - // - // This can be used to associate IDs attached to the various configurations - // used to process this request with the access log entry. For example, a - // route created from a higher level forwarding rule with some ID can place - // that ID in this field and cross reference later. It can also be used to - // determine if a canary endpoint was used or not. - config.core.v4alpha.Metadata metadata = 17; - - // If upstream connection failed due to transport socket (e.g. TLS handshake), provides the - // failure reason from the transport socket. The format of this field depends on the configured - // upstream transport socket. Common TLS failures are in - // :ref:`TLS trouble shooting `. - string upstream_transport_failure_reason = 18; - - // The name of the route - string route_name = 19; - - // This field is the downstream direct remote address on which the request from the user was - // received. Note: This is always the physical peer, even if the remote address is inferred from - // for example the x-forwarder-for header, proxy protocol, etc. - config.core.v4alpha.Address downstream_direct_remote_address = 20; - - // Map of filter state in stream info that have been configured to be logged. If the filter - // state serialized to any message other than `google.protobuf.Any` it will be packed into - // `google.protobuf.Any`. - map filter_state_objects = 21; -} - -// Flags indicating occurrences during request/response processing. -// [#next-free-field: 24] -message ResponseFlags { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.ResponseFlags"; - - message Unauthorized { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.ResponseFlags.Unauthorized"; - - // Reasons why the request was unauthorized - enum Reason { - REASON_UNSPECIFIED = 0; - - // The request was denied by the external authorization service. - EXTERNAL_SERVICE = 1; - } - - Reason reason = 1; - } - - // Indicates local server healthcheck failed. - bool failed_local_healthcheck = 1; - - // Indicates there was no healthy upstream. - bool no_healthy_upstream = 2; - - // Indicates an there was an upstream request timeout. - bool upstream_request_timeout = 3; - - // Indicates local codec level reset was sent on the stream. - bool local_reset = 4; - - // Indicates remote codec level reset was received on the stream. - bool upstream_remote_reset = 5; - - // Indicates there was a local reset by a connection pool due to an initial connection failure. - bool upstream_connection_failure = 6; - - // Indicates the stream was reset due to an upstream connection termination. - bool upstream_connection_termination = 7; - - // Indicates the stream was reset because of a resource overflow. - bool upstream_overflow = 8; - - // Indicates no route was found for the request. - bool no_route_found = 9; - - // Indicates that the request was delayed before proxying. - bool delay_injected = 10; - - // Indicates that the request was aborted with an injected error code. - bool fault_injected = 11; - - // Indicates that the request was rate-limited locally. - bool rate_limited = 12; - - // Indicates if the request was deemed unauthorized and the reason for it. - Unauthorized unauthorized_details = 13; - - // Indicates that the request was rejected because there was an error in rate limit service. - bool rate_limit_service_error = 14; - - // Indicates the stream was reset due to a downstream connection termination. - bool downstream_connection_termination = 15; - - // Indicates that the upstream retry limit was exceeded, resulting in a downstream error. - bool upstream_retry_limit_exceeded = 16; - - // Indicates that the stream idle timeout was hit, resulting in a downstream 408. - bool stream_idle_timeout = 17; - - // Indicates that the request was rejected because an envoy request header failed strict - // validation. - bool invalid_envoy_request_headers = 18; - - // Indicates there was an HTTP protocol error on the downstream request. - bool downstream_protocol_error = 19; - - // Indicates there was a max stream duration reached on the upstream request. - bool upstream_max_stream_duration_reached = 20; - - // Indicates the response was served from a cache filter. - bool response_from_cache_filter = 21; - - // Indicates that a filter configuration is not available. - bool no_filter_config_found = 22; - - // Indicates that request or connection exceeded the downstream connection duration. - bool duration_timeout = 23; -} - -// Properties of a negotiated TLS connection. -// [#next-free-field: 7] -message TLSProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.TLSProperties"; - - enum TLSVersion { - VERSION_UNSPECIFIED = 0; - TLSv1 = 1; - TLSv1_1 = 2; - TLSv1_2 = 3; - TLSv1_3 = 4; - } - - message CertificateProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.TLSProperties.CertificateProperties"; - - message SubjectAltName { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.TLSProperties.CertificateProperties.SubjectAltName"; - - oneof san { - string uri = 1; - - // [#not-implemented-hide:] - string dns = 2; - } - } - - // SANs present in the certificate. - repeated SubjectAltName subject_alt_name = 1; - - // The subject field of the certificate. - string subject = 2; - } - - // Version of TLS that was negotiated. - TLSVersion tls_version = 1; - - // TLS cipher suite negotiated during handshake. The value is a - // four-digit hex code defined by the IANA TLS Cipher Suite Registry - // (e.g. ``009C`` for ``TLS_RSA_WITH_AES_128_GCM_SHA256``). - // - // Here it is expressed as an integer. - google.protobuf.UInt32Value tls_cipher_suite = 2; - - // SNI hostname from handshake. - string tls_sni_hostname = 3; - - // Properties of the local certificate used to negotiate TLS. - CertificateProperties local_certificate_properties = 4; - - // Properties of the peer certificate used to negotiate TLS. - CertificateProperties peer_certificate_properties = 5; - - // The TLS session ID. - string tls_session_id = 6; -} - -// [#next-free-field: 14] -message HTTPRequestProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.HTTPRequestProperties"; - - // The request method (RFC 7231/2616). - config.core.v4alpha.RequestMethod request_method = 1 - [(validate.rules).enum = {defined_only: true}]; - - // The scheme portion of the incoming request URI. - string scheme = 2; - - // HTTP/2 ``:authority`` or HTTP/1.1 ``Host`` header value. - string authority = 3; - - // The port of the incoming request URI - // (unused currently, as port is composed onto authority). - google.protobuf.UInt32Value port = 4; - - // The path portion from the incoming request URI. - string path = 5; - - // Value of the ``User-Agent`` request header. - string user_agent = 6; - - // Value of the ``Referer`` request header. - string referer = 7; - - // Value of the ``X-Forwarded-For`` request header. - string forwarded_for = 8; - - // Value of the ``X-Request-Id`` request header - // - // This header is used by Envoy to uniquely identify a request. - // It will be generated for all external requests and internal requests that - // do not already have a request ID. - string request_id = 9; - - // Value of the ``X-Envoy-Original-Path`` request header. - string original_path = 10; - - // Size of the HTTP request headers in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. - uint64 request_headers_bytes = 11; - - // Size of the HTTP request body in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. - uint64 request_body_bytes = 12; - - // Map of additional headers that have been configured to be logged. - map request_headers = 13; -} - -// [#next-free-field: 7] -message HTTPResponseProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.HTTPResponseProperties"; - - // The HTTP response code returned by Envoy. - google.protobuf.UInt32Value response_code = 1; - - // Size of the HTTP response headers in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. - uint64 response_headers_bytes = 2; - - // Size of the HTTP response body in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. - uint64 response_body_bytes = 3; - - // Map of additional headers configured to be logged. - map response_headers = 4; - - // Map of trailers configured to be logged. - map response_trailers = 5; - - // The HTTP response code details. - string response_code_details = 6; -} diff --git a/generated_api_shadow/envoy/extensions/access_loggers/grpc/v4alpha/als.proto b/generated_api_shadow/envoy/extensions/access_loggers/grpc/v4alpha/als.proto index 9605a05c4128c..c7bf15948b231 100644 --- a/generated_api_shadow/envoy/extensions/access_loggers/grpc/v4alpha/als.proto +++ b/generated_api_shadow/envoy/extensions/access_loggers/grpc/v4alpha/als.proto @@ -31,15 +31,15 @@ message HttpGrpcAccessLogConfig { CommonGrpcAccessLogConfig common_config = 1 [(validate.rules).message = {required: true}]; // Additional request headers to log in :ref:`HTTPRequestProperties.request_headers - // `. + // `. repeated string additional_request_headers_to_log = 2; // Additional response headers to log in :ref:`HTTPResponseProperties.response_headers - // `. + // `. repeated string additional_response_headers_to_log = 3; // Additional response trailers to log in :ref:`HTTPResponseProperties.response_trailers - // `. + // `. repeated string additional_response_trailers_to_log = 4; } @@ -83,7 +83,7 @@ message CommonGrpcAccessLogConfig { google.protobuf.UInt32Value buffer_size_bytes = 4; // Additional filter state objects to log in :ref:`filter_state_objects - // `. + // `. // Logger will call `FilterState::Object::serializeAsProto` to serialize the filter state object. repeated string filter_state_objects_to_log = 5; } diff --git a/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD b/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD deleted file mode 100644 index df5de314366ab..0000000000000 --- a/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD +++ /dev/null @@ -1,13 +0,0 @@ -# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. - -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") - -licenses(["notice"]) # Apache 2 - -api_proto_package( - deps = [ - "//envoy/config/core/v4alpha:pkg", - "//envoy/extensions/retry/host/omit_host_metadata/v3:pkg", - "@com_github_cncf_udpa//udpa/annotations:pkg", - ], -) diff --git a/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto b/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto deleted file mode 100644 index 043d5ce3cfa06..0000000000000 --- a/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.retry.host.omit_host_metadata.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.retry.host.omit_host_metadata.v4alpha"; -option java_outer_classname = "OmitHostMetadataConfigProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Omit host metadata retry predicate] - -// A retry host predicate that can be used to reject a host based on -// predefined metadata match criteria. -// [#extension: envoy.retry_host_predicates.omit_host_metadata] -message OmitHostMetadataConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.retry.host.omit_host_metadata.v3.OmitHostMetadataConfig"; - - // Retry host predicate metadata match criteria. The hosts in - // the upstream cluster with matching metadata will be omitted while - // attempting a retry of a failed request. The metadata should be specified - // under the *envoy.lb* key. - config.core.v4alpha.Metadata metadata_match = 1; -} diff --git a/generated_api_shadow/envoy/service/accesslog/v4alpha/BUILD b/generated_api_shadow/envoy/service/accesslog/v4alpha/BUILD index ef86c64ac7e5f..94c70bc66967b 100644 --- a/generated_api_shadow/envoy/service/accesslog/v4alpha/BUILD +++ b/generated_api_shadow/envoy/service/accesslog/v4alpha/BUILD @@ -8,7 +8,7 @@ api_proto_package( has_services = True, deps = [ "//envoy/config/core/v4alpha:pkg", - "//envoy/data/accesslog/v4alpha:pkg", + "//envoy/data/accesslog/v3:pkg", "//envoy/service/accesslog/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/generated_api_shadow/envoy/service/accesslog/v4alpha/als.proto b/generated_api_shadow/envoy/service/accesslog/v4alpha/als.proto index 3ce1008ec48fb..e2c8bbbc80689 100644 --- a/generated_api_shadow/envoy/service/accesslog/v4alpha/als.proto +++ b/generated_api_shadow/envoy/service/accesslog/v4alpha/als.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package envoy.service.accesslog.v4alpha; import "envoy/config/core/v4alpha/base.proto"; -import "envoy/data/accesslog/v4alpha/accesslog.proto"; +import "envoy/data/accesslog/v3/accesslog.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; @@ -58,7 +58,7 @@ message StreamAccessLogsMessage { option (udpa.annotations.versioning).previous_message_type = "envoy.service.accesslog.v3.StreamAccessLogsMessage.HTTPAccessLogEntries"; - repeated data.accesslog.v4alpha.HTTPAccessLogEntry log_entry = 1 + repeated data.accesslog.v3.HTTPAccessLogEntry log_entry = 1 [(validate.rules).repeated = {min_items: 1}]; } @@ -67,7 +67,7 @@ message StreamAccessLogsMessage { option (udpa.annotations.versioning).previous_message_type = "envoy.service.accesslog.v3.StreamAccessLogsMessage.TCPAccessLogEntries"; - repeated data.accesslog.v4alpha.TCPAccessLogEntry log_entry = 1 + repeated data.accesslog.v3.TCPAccessLogEntry log_entry = 1 [(validate.rules).repeated = {min_items: 1}]; } diff --git a/generated_api_shadow/envoy/service/health/v4alpha/BUILD b/generated_api_shadow/envoy/service/health/v4alpha/BUILD index dc88ee92239b0..37c2608f7c182 100644 --- a/generated_api_shadow/envoy/service/health/v4alpha/BUILD +++ b/generated_api_shadow/envoy/service/health/v4alpha/BUILD @@ -10,7 +10,7 @@ api_proto_package( "//envoy/annotations:pkg", "//envoy/config/cluster/v4alpha:pkg", "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v4alpha:pkg", + "//envoy/config/endpoint/v3:pkg", "//envoy/service/health/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/generated_api_shadow/envoy/service/health/v4alpha/hds.proto b/generated_api_shadow/envoy/service/health/v4alpha/hds.proto index 801de1cb832ad..bf3a5133f1193 100644 --- a/generated_api_shadow/envoy/service/health/v4alpha/hds.proto +++ b/generated_api_shadow/envoy/service/health/v4alpha/hds.proto @@ -5,7 +5,7 @@ package envoy.service.health.v4alpha; import "envoy/config/cluster/v4alpha/cluster.proto"; import "envoy/config/core/v4alpha/base.proto"; import "envoy/config/core/v4alpha/health_check.proto"; -import "envoy/config/endpoint/v4alpha/endpoint_components.proto"; +import "envoy/config/endpoint/v3/endpoint_components.proto"; import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; @@ -104,7 +104,7 @@ message EndpointHealth { option (udpa.annotations.versioning).previous_message_type = "envoy.service.health.v3.EndpointHealth"; - config.endpoint.v4alpha.Endpoint endpoint = 1; + config.endpoint.v3.Endpoint endpoint = 1; config.core.v4alpha.HealthStatus health_status = 2; } @@ -159,7 +159,7 @@ message LocalityEndpoints { config.core.v4alpha.Locality locality = 1; - repeated config.endpoint.v4alpha.Endpoint endpoints = 2; + repeated config.endpoint.v3.Endpoint endpoints = 2; } // The cluster name and locality is provided to Envoy for the endpoints that it diff --git a/generated_api_shadow/envoy/service/load_stats/v4alpha/BUILD b/generated_api_shadow/envoy/service/load_stats/v4alpha/BUILD index 870673013a0e6..91d914645041b 100644 --- a/generated_api_shadow/envoy/service/load_stats/v4alpha/BUILD +++ b/generated_api_shadow/envoy/service/load_stats/v4alpha/BUILD @@ -8,7 +8,7 @@ api_proto_package( has_services = True, deps = [ "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v4alpha:pkg", + "//envoy/config/endpoint/v3:pkg", "//envoy/service/load_stats/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/generated_api_shadow/envoy/service/load_stats/v4alpha/lrs.proto b/generated_api_shadow/envoy/service/load_stats/v4alpha/lrs.proto index 344a4ef1094a7..69eb3d707d5e1 100644 --- a/generated_api_shadow/envoy/service/load_stats/v4alpha/lrs.proto +++ b/generated_api_shadow/envoy/service/load_stats/v4alpha/lrs.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package envoy.service.load_stats.v4alpha; import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/endpoint/v4alpha/load_report.proto"; +import "envoy/config/endpoint/v3/load_report.proto"; import "google/protobuf/duration.proto"; @@ -68,7 +68,7 @@ message LoadStatsRequest { config.core.v4alpha.Node node = 1; // A list of load stats to report. - repeated config.endpoint.v4alpha.ClusterStats cluster_stats = 2; + repeated config.endpoint.v3.ClusterStats cluster_stats = 2; } // The management server sends envoy a LoadStatsResponse with all clusters it diff --git a/include/envoy/config/typed_metadata.h b/include/envoy/config/typed_metadata.h index e6a2488c1f4d4..9406e6a99baa8 100644 --- a/include/envoy/config/typed_metadata.h +++ b/include/envoy/config/typed_metadata.h @@ -65,7 +65,7 @@ class TypedMetadataFactory : public UntypedFactory { virtual std::unique_ptr parse(const ProtobufWkt::Struct& data) const PURE; - /** + /** * Convert the google.protobuf.Any into an instance of TypedMetadata::Object. * It should throw an EnvoyException in case the conversion can't be completed. * @param data config data stored as a protobuf any. diff --git a/test/common/router/config_impl_test.cc b/test/common/router/config_impl_test.cc index 05b232f7e810d..c465afe150e6a 100644 --- a/test/common/router/config_impl_test.cc +++ b/test/common/router/config_impl_test.cc @@ -5020,11 +5020,6 @@ class BazFactory : public HttpRouteTypedMetadataFactory { } throw EnvoyException("Cannot create a Baz when metadata is empty."); } - - std::unique_ptr - parse(const ProtobufWkt::Any&) const override { - return nullptr; - } }; TEST_F(RouteMatcherTest, WeightedClusters) { diff --git a/test/common/upstream/upstream_impl_test.cc b/test/common/upstream/upstream_impl_test.cc index a72407a7981b8..a0ce86ae68ac1 100644 --- a/test/common/upstream/upstream_impl_test.cc +++ b/test/common/upstream/upstream_impl_test.cc @@ -2255,11 +2255,6 @@ class BazFactory : public ClusterTypedMetadataFactory { } throw EnvoyException("Cannot create a Baz when metadata is empty."); } - - std::unique_ptr - parse(const ProtobufWkt::Any&) const override { - return nullptr; - } }; // Cluster metadata and common config retrieval. From 009ede2e17aa49817cd3f168e8e60c040f2b919f Mon Sep 17 00:00:00 2001 From: Yanjun Xiang Date: Tue, 4 May 2021 16:23:36 +0000 Subject: [PATCH 05/11] update change based on comments-remove unnecessary changes generated by proto_format scripts Signed-off-by: Yanjun Xiang --- api/envoy/config/core/v3/base.proto | 3 ++- api/envoy/config/core/v4alpha/base.proto | 12 +++++++++--- .../envoy/config/core/v3/base.proto | 11 ++++++++++- .../envoy/config/core/v4alpha/base.proto | 13 +++++++++++-- 4 files changed, 32 insertions(+), 7 deletions(-) diff --git a/api/envoy/config/core/v3/base.proto b/api/envoy/config/core/v3/base.proto index 5c85d45bf2c54..67377fc651585 100644 --- a/api/envoy/config/core/v3/base.proto +++ b/api/envoy/config/core/v3/base.proto @@ -238,7 +238,8 @@ message Metadata { // namespace is reserved for Envoy's built-in filters. // This is deprecated in favor of // :ref:`typed_filter_metadata ` field. - map filter_metadata = 1 [deprecated = true]; + map filter_metadata = 1 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. diff --git a/api/envoy/config/core/v4alpha/base.proto b/api/envoy/config/core/v4alpha/base.proto index 6c271e87088a1..355f62c9af6d8 100644 --- a/api/envoy/config/core/v4alpha/base.proto +++ b/api/envoy/config/core/v4alpha/base.proto @@ -71,7 +71,7 @@ message Locality { // Defines the local service zone where Envoy is running. Though optional, it // should be set if discovery service routing is used and the discovery - // service exposes :ref:`zone data `, + // service exposes :ref:`zone data `, // either in this message or via :option:`--service-zone`. The meaning of zone // is context dependent, e.g. `Availability Zone (AZ) // `_ @@ -224,10 +224,16 @@ message Node { message Metadata { option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.Metadata"; + reserved 1; + + reserved "filter_metadata"; + // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. - map filter_metadata = 1; - + // The value is encoded as google.protobuf.Any. + // If both :ref:`filter_metadata ` + // and typed_filter_metadata fields are present in the metadata with same keys, + // only typed_filter_metadata field will be parsed. map typed_filter_metadata = 2; } diff --git a/generated_api_shadow/envoy/config/core/v3/base.proto b/generated_api_shadow/envoy/config/core/v3/base.proto index 1277eb91baf18..1b23076df7dac 100644 --- a/generated_api_shadow/envoy/config/core/v3/base.proto +++ b/generated_api_shadow/envoy/config/core/v3/base.proto @@ -235,8 +235,17 @@ message Metadata { // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. - map filter_metadata = 1; + // This is deprecated in favor of + // :ref:`typed_filter_metadata ` field. + map filter_metadata = 1 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; + // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* + // namespace is reserved for Envoy's built-in filters. + // The value is encoded as google.protobuf.Any. + // If both :ref:`filter_metadata ` + // and typed_filter_metadata fields are present in the metadata with same keys, + // only typed_filter_metadata field will be parsed. map typed_filter_metadata = 2; } diff --git a/generated_api_shadow/envoy/config/core/v4alpha/base.proto b/generated_api_shadow/envoy/config/core/v4alpha/base.proto index c945c7aee1a7c..d77592dba294e 100644 --- a/generated_api_shadow/envoy/config/core/v4alpha/base.proto +++ b/generated_api_shadow/envoy/config/core/v4alpha/base.proto @@ -73,7 +73,7 @@ message Locality { // Defines the local service zone where Envoy is running. Though optional, it // should be set if discovery service routing is used and the discovery - // service exposes :ref:`zone data `, + // service exposes :ref:`zone data `, // either in this message or via :option:`--service-zone`. The meaning of zone // is context dependent, e.g. `Availability Zone (AZ) // `_ @@ -235,8 +235,17 @@ message Metadata { // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. - map filter_metadata = 1; + // This is deprecated in favor of + // :ref:`typed_filter_metadata ` field. + map hidden_envoy_deprecated_filter_metadata = 1 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; + // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* + // namespace is reserved for Envoy's built-in filters. + // The value is encoded as google.protobuf.Any. + // If both :ref:`filter_metadata ` + // and typed_filter_metadata fields are present in the metadata with same keys, + // only typed_filter_metadata field will be parsed. map typed_filter_metadata = 2; } From 1673473c123f2727f3c7c94e9f6115247b8a195c Mon Sep 17 00:00:00 2001 From: Yanjun Xiang Date: Wed, 5 May 2021 15:57:05 +0000 Subject: [PATCH 06/11] fix spelling error Signed-off-by: Yanjun Xiang --- test/common/config/metadata_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/common/config/metadata_test.cc b/test/common/config/metadata_test.cc index ea0a672aed69d..839f569ba489f 100644 --- a/test/common/config/metadata_test.cc +++ b/test/common/config/metadata_test.cc @@ -258,7 +258,7 @@ TEST_F(TypedMetadataTest, AnyMetadataRefreshTest) { EXPECT_EQ(nullptr, typed3.get(bar_factory_.name())); } -// Tests emptry Struct metadata parsing case. +// Tests empty Struct metadata parsing case. TEST_F(TypedMetadataTest, InvalidStructMetadataTest) { envoy::config::core::v3::Metadata metadata; (*metadata.mutable_filter_metadata())[foo_factory_.name()] = ProtobufWkt::Struct(); @@ -267,7 +267,7 @@ TEST_F(TypedMetadataTest, InvalidStructMetadataTest) { "Cannot create a Foo when Struct metadata is empty."); } -// Tests emptry Any metadata parsing case. +// Tests empty Any metadata parsing case. TEST_F(TypedMetadataTest, InvalidAnyMetadataTest) { envoy::config::core::v3::Metadata metadata; (*metadata.mutable_typed_filter_metadata())[bar_factory_.name()] = ProtobufWkt::Any(); From 6d6227242f488c4eac62c8b3b8cd17360402fd71 Mon Sep 17 00:00:00 2001 From: Yanjun Xiang Date: Thu, 6 May 2021 16:18:46 +0000 Subject: [PATCH 07/11] commit the generated v4alpha proto files Signed-off-by: Yanjun Xiang --- api/envoy/config/cluster/v4alpha/BUILD | 2 +- .../config/cluster/v4alpha/cluster.proto | 8 +- .../config/core/v4alpha/health_check.proto | 6 +- api/envoy/config/endpoint/v4alpha/BUILD | 14 + .../config/endpoint/v4alpha/endpoint.proto | 119 +++++ .../v4alpha/endpoint_components.proto | 158 +++++++ .../config/endpoint/v4alpha/load_report.proto | 168 +++++++ api/envoy/data/accesslog/v4alpha/BUILD | 13 + .../data/accesslog/v4alpha/accesslog.proto | 431 ++++++++++++++++++ .../access_loggers/grpc/v4alpha/als.proto | 8 +- .../host/omit_host_metadata/v4alpha/BUILD | 13 + .../v4alpha/omit_host_metadata_config.proto | 29 ++ api/envoy/service/accesslog/v4alpha/BUILD | 2 +- api/envoy/service/accesslog/v4alpha/als.proto | 6 +- api/envoy/service/health/v4alpha/BUILD | 2 +- api/envoy/service/health/v4alpha/hds.proto | 6 +- api/envoy/service/load_stats/v4alpha/BUILD | 2 +- .../service/load_stats/v4alpha/lrs.proto | 4 +- .../envoy/config/cluster/v4alpha/BUILD | 2 +- .../config/cluster/v4alpha/cluster.proto | 8 +- .../config/core/v4alpha/health_check.proto | 6 +- .../envoy/config/endpoint/v4alpha/BUILD | 14 + .../config/endpoint/v4alpha/endpoint.proto | 119 +++++ .../v4alpha/endpoint_components.proto | 158 +++++++ .../config/endpoint/v4alpha/load_report.proto | 168 +++++++ .../envoy/data/accesslog/v4alpha/BUILD | 13 + .../data/accesslog/v4alpha/accesslog.proto | 431 ++++++++++++++++++ .../access_loggers/grpc/v4alpha/als.proto | 8 +- .../host/omit_host_metadata/v4alpha/BUILD | 13 + .../v4alpha/omit_host_metadata_config.proto | 29 ++ .../envoy/service/accesslog/v4alpha/BUILD | 2 +- .../envoy/service/accesslog/v4alpha/als.proto | 6 +- .../envoy/service/health/v4alpha/BUILD | 2 +- .../envoy/service/health/v4alpha/hds.proto | 6 +- .../envoy/service/load_stats/v4alpha/BUILD | 2 +- .../service/load_stats/v4alpha/lrs.proto | 4 +- 36 files changed, 1936 insertions(+), 46 deletions(-) create mode 100644 api/envoy/config/endpoint/v4alpha/BUILD create mode 100644 api/envoy/config/endpoint/v4alpha/endpoint.proto create mode 100644 api/envoy/config/endpoint/v4alpha/endpoint_components.proto create mode 100644 api/envoy/config/endpoint/v4alpha/load_report.proto create mode 100644 api/envoy/data/accesslog/v4alpha/BUILD create mode 100644 api/envoy/data/accesslog/v4alpha/accesslog.proto create mode 100644 api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD create mode 100644 api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto create mode 100644 generated_api_shadow/envoy/config/endpoint/v4alpha/BUILD create mode 100644 generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint.proto create mode 100644 generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint_components.proto create mode 100644 generated_api_shadow/envoy/config/endpoint/v4alpha/load_report.proto create mode 100644 generated_api_shadow/envoy/data/accesslog/v4alpha/BUILD create mode 100644 generated_api_shadow/envoy/data/accesslog/v4alpha/accesslog.proto create mode 100644 generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD create mode 100644 generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto diff --git a/api/envoy/config/cluster/v4alpha/BUILD b/api/envoy/config/cluster/v4alpha/BUILD index 02eb1b1917251..b5db8055b8d1e 100644 --- a/api/envoy/config/cluster/v4alpha/BUILD +++ b/api/envoy/config/cluster/v4alpha/BUILD @@ -8,7 +8,7 @@ api_proto_package( deps = [ "//envoy/config/cluster/v3:pkg", "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v3:pkg", + "//envoy/config/endpoint/v4alpha:pkg", "//envoy/type/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", "@com_github_cncf_udpa//xds/core/v3:pkg", diff --git a/api/envoy/config/cluster/v4alpha/cluster.proto b/api/envoy/config/cluster/v4alpha/cluster.proto index 927bbddaba5e2..4d5e5a375bf54 100644 --- a/api/envoy/config/cluster/v4alpha/cluster.proto +++ b/api/envoy/config/cluster/v4alpha/cluster.proto @@ -10,7 +10,7 @@ import "envoy/config/core/v4alpha/base.proto"; import "envoy/config/core/v4alpha/config_source.proto"; import "envoy/config/core/v4alpha/extension.proto"; import "envoy/config/core/v4alpha/health_check.proto"; -import "envoy/config/endpoint/v3/endpoint.proto"; +import "envoy/config/endpoint/v4alpha/endpoint.proto"; import "envoy/type/v3/percent.proto"; import "google/protobuf/any.proto"; @@ -638,7 +638,7 @@ message Cluster { // Configuration to use different transport sockets for different endpoints. // The entry of *envoy.transport_socket_match* in the - // :ref:`LbEndpoint.Metadata ` + // :ref:`LbEndpoint.Metadata ` // is used to match against the transport sockets as they appear in the list. The first // :ref:`match ` is used. // For example, with the following match @@ -739,9 +739,9 @@ message Cluster { // .. attention:: // // Setting this allows non-EDS cluster types to contain embedded EDS equivalent - // :ref:`endpoint assignments`. + // :ref:`endpoint assignments`. // - endpoint.v3.ClusterLoadAssignment load_assignment = 33; + endpoint.v4alpha.ClusterLoadAssignment load_assignment = 33; // Optional :ref:`active health checking ` // configuration for the cluster. If no diff --git a/api/envoy/config/core/v4alpha/health_check.proto b/api/envoy/config/core/v4alpha/health_check.proto index ddc7d65e00075..90aaa057b0faf 100644 --- a/api/envoy/config/core/v4alpha/health_check.proto +++ b/api/envoy/config/core/v4alpha/health_check.proto @@ -85,7 +85,7 @@ message HealthCheck { // The value of the host header in the HTTP health check request. If // left empty (default value), the name of the cluster this health check is associated // with will be used. The host header can be customized for a specific endpoint by setting the - // :ref:`hostname ` field. + // :ref:`hostname ` field. string host = 1 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; // Specifies the HTTP path that will be requested during health checking. For example @@ -170,7 +170,7 @@ message HealthCheck { // The value of the :authority header in the gRPC health check request. If // left empty (default value), the name of the cluster this health check is associated // with will be used. The authority header can be customized for a specific endpoint by setting - // the :ref:`hostname ` field. + // the :ref:`hostname ` field. string authority = 2 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; } @@ -360,7 +360,7 @@ message HealthCheck { // config: { ... } # tls socket configuration // // If this field is set, then for health checks it will supersede an entry of *envoy.transport_socket* in the - // :ref:`LbEndpoint.Metadata `. + // :ref:`LbEndpoint.Metadata `. // This allows using different transport socket capabilities for health checking versus proxying to the // endpoint. // diff --git a/api/envoy/config/endpoint/v4alpha/BUILD b/api/envoy/config/endpoint/v4alpha/BUILD new file mode 100644 index 0000000000000..79d52ad4cfbc6 --- /dev/null +++ b/api/envoy/config/endpoint/v4alpha/BUILD @@ -0,0 +1,14 @@ +# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") + +licenses(["notice"]) # Apache 2 + +api_proto_package( + deps = [ + "//envoy/config/core/v4alpha:pkg", + "//envoy/config/endpoint/v3:pkg", + "//envoy/type/v3:pkg", + "@com_github_cncf_udpa//udpa/annotations:pkg", + ], +) diff --git a/api/envoy/config/endpoint/v4alpha/endpoint.proto b/api/envoy/config/endpoint/v4alpha/endpoint.proto new file mode 100644 index 0000000000000..0d4d4684d2c10 --- /dev/null +++ b/api/envoy/config/endpoint/v4alpha/endpoint.proto @@ -0,0 +1,119 @@ +syntax = "proto3"; + +package envoy.config.endpoint.v4alpha; + +import "envoy/config/endpoint/v4alpha/endpoint_components.proto"; +import "envoy/type/v3/percent.proto"; + +import "google/protobuf/duration.proto"; +import "google/protobuf/wrappers.proto"; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; +option java_outer_classname = "EndpointProto"; +option java_multiple_files = true; +option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; + +// [#protodoc-title: Endpoint configuration] +// Endpoint discovery :ref:`architecture overview ` + +// Each route from RDS will map to a single cluster or traffic split across +// clusters using weights expressed in the RDS WeightedCluster. +// +// With EDS, each cluster is treated independently from a LB perspective, with +// LB taking place between the Localities within a cluster and at a finer +// granularity between the hosts within a locality. The percentage of traffic +// for each endpoint is determined by both its load_balancing_weight, and the +// load_balancing_weight of its locality. First, a locality will be selected, +// then an endpoint within that locality will be chose based on its weight. +// [#next-free-field: 6] +message ClusterLoadAssignment { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.ClusterLoadAssignment"; + + // Load balancing policy settings. + // [#next-free-field: 6] + message Policy { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.ClusterLoadAssignment.Policy"; + + // [#not-implemented-hide:] + message DropOverload { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload"; + + // Identifier for the policy specifying the drop. + string category = 1 [(validate.rules).string = {min_len: 1}]; + + // Percentage of traffic that should be dropped for the category. + type.v3.FractionalPercent drop_percentage = 2; + } + + reserved 1, 5; + + reserved "disable_overprovisioning"; + + // Action to trim the overall incoming traffic to protect the upstream + // hosts. This action allows protection in case the hosts are unable to + // recover from an outage, or unable to autoscale or unable to handle + // incoming traffic volume for any reason. + // + // At the client each category is applied one after the other to generate + // the 'actual' drop percentage on all outgoing traffic. For example: + // + // .. code-block:: json + // + // { "drop_overloads": [ + // { "category": "throttle", "drop_percentage": 60 } + // { "category": "lb", "drop_percentage": 50 } + // ]} + // + // The actual drop percentages applied to the traffic at the clients will be + // "throttle"_drop = 60% + // "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%. + // actual_outgoing_load = 20% // remaining after applying all categories. + // [#not-implemented-hide:] + repeated DropOverload drop_overloads = 2; + + // Priority levels and localities are considered overprovisioned with this + // factor (in percentage). This means that we don't consider a priority + // level or locality unhealthy until the fraction of healthy hosts + // multiplied by the overprovisioning factor drops below 100. + // With the default value 140(1.4), Envoy doesn't consider a priority level + // or a locality unhealthy until their percentage of healthy hosts drops + // below 72%. For example: + // + // .. code-block:: json + // + // { "overprovisioning_factor": 100 } + // + // Read more at :ref:`priority levels ` and + // :ref:`localities `. + google.protobuf.UInt32Value overprovisioning_factor = 3 [(validate.rules).uint32 = {gt: 0}]; + + // The max time until which the endpoints from this assignment can be used. + // If no new assignments are received before this time expires the endpoints + // are considered stale and should be marked unhealthy. + // Defaults to 0 which means endpoints never go stale. + google.protobuf.Duration endpoint_stale_after = 4 [(validate.rules).duration = {gt {}}]; + } + + // Name of the cluster. This will be the :ref:`service_name + // ` value if specified + // in the cluster :ref:`EdsClusterConfig + // `. + string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; + + // List of endpoints to load balance to. + repeated LocalityLbEndpoints endpoints = 2; + + // Map of named endpoints that can be referenced in LocalityLbEndpoints. + // [#not-implemented-hide:] + map named_endpoints = 5; + + // Load balancing policy settings. + Policy policy = 4; +} diff --git a/api/envoy/config/endpoint/v4alpha/endpoint_components.proto b/api/envoy/config/endpoint/v4alpha/endpoint_components.proto new file mode 100644 index 0000000000000..246d569d28464 --- /dev/null +++ b/api/envoy/config/endpoint/v4alpha/endpoint_components.proto @@ -0,0 +1,158 @@ +syntax = "proto3"; + +package envoy.config.endpoint.v4alpha; + +import "envoy/config/core/v4alpha/address.proto"; +import "envoy/config/core/v4alpha/base.proto"; +import "envoy/config/core/v4alpha/health_check.proto"; + +import "google/protobuf/wrappers.proto"; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; +option java_outer_classname = "EndpointComponentsProto"; +option java_multiple_files = true; +option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; + +// [#protodoc-title: Endpoints] + +// Upstream host identifier. +message Endpoint { + option (udpa.annotations.versioning).previous_message_type = "envoy.config.endpoint.v3.Endpoint"; + + // The optional health check configuration. + message HealthCheckConfig { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.Endpoint.HealthCheckConfig"; + + // Optional alternative health check port value. + // + // By default the health check address port of an upstream host is the same + // as the host's serving address port. This provides an alternative health + // check port. Setting this with a non-zero value allows an upstream host + // to have different health check address port. + uint32 port_value = 1 [(validate.rules).uint32 = {lte: 65535}]; + + // By default, the host header for L7 health checks is controlled by cluster level configuration + // (see: :ref:`host ` and + // :ref:`authority `). Setting this + // to a non-empty value allows overriding the cluster level configuration for a specific + // endpoint. + string hostname = 2; + } + + // The upstream host address. + // + // .. attention:: + // + // The form of host address depends on the given cluster type. For STATIC or EDS, + // it is expected to be a direct IP address (or something resolvable by the + // specified :ref:`resolver ` + // in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname, + // and will be resolved via DNS. + core.v4alpha.Address address = 1; + + // The optional health check configuration is used as configuration for the + // health checker to contact the health checked host. + // + // .. attention:: + // + // This takes into effect only for upstream clusters with + // :ref:`active health checking ` enabled. + HealthCheckConfig health_check_config = 2; + + // The hostname associated with this endpoint. This hostname is not used for routing or address + // resolution. If provided, it will be associated with the endpoint, and can be used for features + // that require a hostname, like + // :ref:`auto_host_rewrite `. + string hostname = 3; +} + +// An Endpoint that Envoy can route traffic to. +// [#next-free-field: 6] +message LbEndpoint { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.LbEndpoint"; + + // Upstream host identifier or a named reference. + oneof host_identifier { + Endpoint endpoint = 1; + + // [#not-implemented-hide:] + string endpoint_name = 5; + } + + // Optional health status when known and supplied by EDS server. + core.v4alpha.HealthStatus health_status = 2; + + // The endpoint metadata specifies values that may be used by the load + // balancer to select endpoints in a cluster for a given request. The filter + // name should be specified as *envoy.lb*. An example boolean key-value pair + // is *canary*, providing the optional canary status of the upstream host. + // This may be matched against in a route's + // :ref:`RouteAction ` metadata_match field + // to subset the endpoints considered in cluster load balancing. + core.v4alpha.Metadata metadata = 3; + + // The optional load balancing weight of the upstream host; at least 1. + // Envoy uses the load balancing weight in some of the built in load + // balancers. The load balancing weight for an endpoint is divided by the sum + // of the weights of all endpoints in the endpoint's locality to produce a + // percentage of traffic for the endpoint. This percentage is then further + // weighted by the endpoint's locality's load balancing weight from + // LocalityLbEndpoints. If unspecified, each host is presumed to have equal + // weight in a locality. The sum of the weights of all endpoints in the + // endpoint's locality must not exceed uint32_t maximal value (4294967295). + google.protobuf.UInt32Value load_balancing_weight = 4 [(validate.rules).uint32 = {gte: 1}]; +} + +// A group of endpoints belonging to a Locality. +// One can have multiple LocalityLbEndpoints for a locality, but this is +// generally only done if the different groups need to have different load +// balancing weights or different priorities. +// [#next-free-field: 7] +message LocalityLbEndpoints { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.LocalityLbEndpoints"; + + // Identifies location of where the upstream hosts run. + core.v4alpha.Locality locality = 1; + + // The group of endpoints belonging to the locality specified. + repeated LbEndpoint lb_endpoints = 2; + + // Optional: Per priority/region/zone/sub_zone weight; at least 1. The load + // balancing weight for a locality is divided by the sum of the weights of all + // localities at the same priority level to produce the effective percentage + // of traffic for the locality. The sum of the weights of all localities at + // the same priority level must not exceed uint32_t maximal value (4294967295). + // + // Locality weights are only considered when :ref:`locality weighted load + // balancing ` is + // configured. These weights are ignored otherwise. If no weights are + // specified when locality weighted load balancing is enabled, the locality is + // assigned no load. + google.protobuf.UInt32Value load_balancing_weight = 3 [(validate.rules).uint32 = {gte: 1}]; + + // Optional: the priority for this LocalityLbEndpoints. If unspecified this will + // default to the highest priority (0). + // + // Under usual circumstances, Envoy will only select endpoints for the highest + // priority (0). In the event all endpoints for a particular priority are + // unavailable/unhealthy, Envoy will fail over to selecting endpoints for the + // next highest priority group. + // + // Priorities should range from 0 (highest) to N (lowest) without skipping. + uint32 priority = 5 [(validate.rules).uint32 = {lte: 128}]; + + // Optional: Per locality proximity value which indicates how close this + // locality is from the source locality. This value only provides ordering + // information (lower the value, closer it is to the source locality). + // This will be consumed by load balancing schemes that need proximity order + // to determine where to route the requests. + // [#not-implemented-hide:] + google.protobuf.UInt32Value proximity = 6; +} diff --git a/api/envoy/config/endpoint/v4alpha/load_report.proto b/api/envoy/config/endpoint/v4alpha/load_report.proto new file mode 100644 index 0000000000000..80be59041d742 --- /dev/null +++ b/api/envoy/config/endpoint/v4alpha/load_report.proto @@ -0,0 +1,168 @@ +syntax = "proto3"; + +package envoy.config.endpoint.v4alpha; + +import "envoy/config/core/v4alpha/address.proto"; +import "envoy/config/core/v4alpha/base.proto"; + +import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; +option java_outer_classname = "LoadReportProto"; +option java_multiple_files = true; +option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; + +// [#protodoc-title: Load Report] + +// These are stats Envoy reports to the management server at a frequency defined by +// :ref:`LoadStatsResponse.load_reporting_interval`. +// Stats per upstream region/zone and optionally per subzone. +// [#next-free-field: 9] +message UpstreamLocalityStats { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.UpstreamLocalityStats"; + + // Name of zone, region and optionally endpoint group these metrics were + // collected from. Zone and region names could be empty if unknown. + core.v4alpha.Locality locality = 1; + + // The total number of requests successfully completed by the endpoints in the + // locality. + 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, + // aggregated over all endpoints in the locality. + uint64 total_error_requests = 4; + + // The total number of requests that were issued by this Envoy since + // the last report. This information is aggregated over all the + // upstream endpoints in the locality. + uint64 total_issued_requests = 8; + + // Stats for multi-dimensional load balancing. + repeated EndpointLoadMetricStats load_metric_stats = 5; + + // Endpoint granularity stats information for this locality. This information + // is populated if the Server requests it by setting + // :ref:`LoadStatsResponse.report_endpoint_granularity`. + repeated UpstreamEndpointStats upstream_endpoint_stats = 7; + + // [#not-implemented-hide:] The priority of the endpoint group these metrics + // were collected from. + uint32 priority = 6; +} + +// [#next-free-field: 8] +message UpstreamEndpointStats { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.UpstreamEndpointStats"; + + // Upstream host address. + core.v4alpha.Address address = 1; + + // Opaque and implementation dependent metadata of the + // endpoint. Envoy will pass this directly to the management server. + google.protobuf.Struct metadata = 6; + + // 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 successfully. 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 for this endpoint. + 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; + + // The total number of requests that were issued to this endpoint + // since the last report. A single TCP connection, HTTP or gRPC + // request or stream is counted as one request. + uint64 total_issued_requests = 7; + + // Stats for multi-dimensional load balancing. + repeated EndpointLoadMetricStats load_metric_stats = 5; +} + +message EndpointLoadMetricStats { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.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` +// Next ID: 7 +// [#next-free-field: 7] +message ClusterStats { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.ClusterStats"; + + message DroppedRequests { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.ClusterStats.DroppedRequests"; + + // Identifier for the policy specifying the drop. + string category = 1 [(validate.rules).string = {min_len: 1}]; + + // Total number of deliberately dropped requests for the category. + uint64 dropped_count = 2; + } + + // The name of the cluster. + string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; + + // The eds_cluster_config service_name of the cluster. + // It's possible that two clusters send the same service_name to EDS, + // in that case, the management server is supposed to do aggregation on the load reports. + string cluster_service_name = 6; + + // 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 total number of dropped requests. This covers requests + // deliberately dropped by the drop_overload policy and circuit breaking. + uint64 total_dropped_requests = 3; + + // Information about deliberately dropped requests for each category specified + // in the DropOverload policy. + repeated DroppedRequests dropped_requests = 5; + + // Period over which the actual load report occurred. This will be guaranteed to include every + // request reported. Due to system load and delays between the *LoadStatsRequest* sent from Envoy + // and the *LoadStatsResponse* message sent from the management server, this may be longer than + // the requested load reporting interval in the *LoadStatsResponse*. + google.protobuf.Duration load_report_interval = 4; +} diff --git a/api/envoy/data/accesslog/v4alpha/BUILD b/api/envoy/data/accesslog/v4alpha/BUILD new file mode 100644 index 0000000000000..c02cec9d67f6c --- /dev/null +++ b/api/envoy/data/accesslog/v4alpha/BUILD @@ -0,0 +1,13 @@ +# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") + +licenses(["notice"]) # Apache 2 + +api_proto_package( + deps = [ + "//envoy/config/core/v4alpha:pkg", + "//envoy/data/accesslog/v3:pkg", + "@com_github_cncf_udpa//udpa/annotations:pkg", + ], +) diff --git a/api/envoy/data/accesslog/v4alpha/accesslog.proto b/api/envoy/data/accesslog/v4alpha/accesslog.proto new file mode 100644 index 0000000000000..0e01ddc2dd784 --- /dev/null +++ b/api/envoy/data/accesslog/v4alpha/accesslog.proto @@ -0,0 +1,431 @@ +syntax = "proto3"; + +package envoy.data.accesslog.v4alpha; + +import "envoy/config/core/v4alpha/address.proto"; +import "envoy/config/core/v4alpha/base.proto"; + +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.data.accesslog.v4alpha"; +option java_outer_classname = "AccesslogProto"; +option java_multiple_files = true; +option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; + +// [#protodoc-title: gRPC access logs] +// Envoy access logs describe incoming interaction with Envoy over a fixed +// period of time, and typically cover a single request/response exchange, +// (e.g. HTTP), stream (e.g. over HTTP/gRPC), or proxied connection (e.g. TCP). +// Access logs contain fields defined in protocol-specific protobuf messages. +// +// Except where explicitly declared otherwise, all fields describe +// *downstream* interaction between Envoy and a connected client. +// Fields describing *upstream* interaction will explicitly include ``upstream`` +// in their name. + +message TCPAccessLogEntry { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.TCPAccessLogEntry"; + + // Common properties shared by all Envoy access logs. + AccessLogCommon common_properties = 1; + + // Properties of the TCP connection. + ConnectionProperties connection_properties = 2; +} + +message HTTPAccessLogEntry { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.HTTPAccessLogEntry"; + + // HTTP version + enum HTTPVersion { + PROTOCOL_UNSPECIFIED = 0; + HTTP10 = 1; + HTTP11 = 2; + HTTP2 = 3; + HTTP3 = 4; + } + + // Common properties shared by all Envoy access logs. + AccessLogCommon common_properties = 1; + + HTTPVersion protocol_version = 2; + + // Description of the incoming HTTP request. + HTTPRequestProperties request = 3; + + // Description of the outgoing HTTP response. + HTTPResponseProperties response = 4; +} + +// Defines fields for a connection +message ConnectionProperties { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.ConnectionProperties"; + + // Number of bytes received from downstream. + uint64 received_bytes = 1; + + // Number of bytes sent to downstream. + uint64 sent_bytes = 2; +} + +// Defines fields that are shared by all Envoy access logs. +// [#next-free-field: 22] +message AccessLogCommon { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.AccessLogCommon"; + + // [#not-implemented-hide:] + // This field indicates the rate at which this log entry was sampled. + // Valid range is (0.0, 1.0]. + double sample_rate = 1 [(validate.rules).double = {lte: 1.0 gt: 0.0}]; + + // This field is the remote/origin address on which the request from the user was received. + // Note: This may not be the physical peer. E.g, if the remote address is inferred from for + // example the x-forwarder-for header, proxy protocol, etc. + config.core.v4alpha.Address downstream_remote_address = 2; + + // This field is the local/destination address on which the request from the user was received. + config.core.v4alpha.Address downstream_local_address = 3; + + // If the connection is secure,S this field will contain TLS properties. + TLSProperties tls_properties = 4; + + // The time that Envoy started servicing this request. This is effectively the time that the first + // downstream byte is received. + google.protobuf.Timestamp start_time = 5; + + // Interval between the first downstream byte received and the last + // downstream byte received (i.e. time it takes to receive a request). + google.protobuf.Duration time_to_last_rx_byte = 6; + + // Interval between the first downstream byte received and the first upstream byte sent. There may + // by considerable delta between *time_to_last_rx_byte* and this value due to filters. + // Additionally, the same caveats apply as documented in *time_to_last_downstream_tx_byte* about + // not accounting for kernel socket buffer time, etc. + google.protobuf.Duration time_to_first_upstream_tx_byte = 7; + + // Interval between the first downstream byte received and the last upstream byte sent. There may + // by considerable delta between *time_to_last_rx_byte* and this value due to filters. + // Additionally, the same caveats apply as documented in *time_to_last_downstream_tx_byte* about + // not accounting for kernel socket buffer time, etc. + google.protobuf.Duration time_to_last_upstream_tx_byte = 8; + + // Interval between the first downstream byte received and the first upstream + // byte received (i.e. time it takes to start receiving a response). + google.protobuf.Duration time_to_first_upstream_rx_byte = 9; + + // Interval between the first downstream byte received and the last upstream + // byte received (i.e. time it takes to receive a complete response). + google.protobuf.Duration time_to_last_upstream_rx_byte = 10; + + // Interval between the first downstream byte received and the first downstream byte sent. + // There may be a considerable delta between the *time_to_first_upstream_rx_byte* and this field + // due to filters. Additionally, the same caveats apply as documented in + // *time_to_last_downstream_tx_byte* about not accounting for kernel socket buffer time, etc. + google.protobuf.Duration time_to_first_downstream_tx_byte = 11; + + // Interval between the first downstream byte received and the last downstream byte sent. + // Depending on protocol, buffering, windowing, filters, etc. there may be a considerable delta + // between *time_to_last_upstream_rx_byte* and this field. Note also that this is an approximate + // time. In the current implementation it does not include kernel socket buffer time. In the + // current implementation it also does not include send window buffering inside the HTTP/2 codec. + // In the future it is likely that work will be done to make this duration more accurate. + google.protobuf.Duration time_to_last_downstream_tx_byte = 12; + + // The upstream remote/destination address that handles this exchange. This does not include + // retries. + config.core.v4alpha.Address upstream_remote_address = 13; + + // The upstream local/origin address that handles this exchange. This does not include retries. + config.core.v4alpha.Address upstream_local_address = 14; + + // The upstream cluster that *upstream_remote_address* belongs to. + string upstream_cluster = 15; + + // Flags indicating occurrences during request/response processing. + ResponseFlags response_flags = 16; + + // All metadata encountered during request processing, including endpoint + // selection. + // + // This can be used to associate IDs attached to the various configurations + // used to process this request with the access log entry. For example, a + // route created from a higher level forwarding rule with some ID can place + // that ID in this field and cross reference later. It can also be used to + // determine if a canary endpoint was used or not. + config.core.v4alpha.Metadata metadata = 17; + + // If upstream connection failed due to transport socket (e.g. TLS handshake), provides the + // failure reason from the transport socket. The format of this field depends on the configured + // upstream transport socket. Common TLS failures are in + // :ref:`TLS trouble shooting `. + string upstream_transport_failure_reason = 18; + + // The name of the route + string route_name = 19; + + // This field is the downstream direct remote address on which the request from the user was + // received. Note: This is always the physical peer, even if the remote address is inferred from + // for example the x-forwarder-for header, proxy protocol, etc. + config.core.v4alpha.Address downstream_direct_remote_address = 20; + + // Map of filter state in stream info that have been configured to be logged. If the filter + // state serialized to any message other than `google.protobuf.Any` it will be packed into + // `google.protobuf.Any`. + map filter_state_objects = 21; +} + +// Flags indicating occurrences during request/response processing. +// [#next-free-field: 26] +message ResponseFlags { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.ResponseFlags"; + + message Unauthorized { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.ResponseFlags.Unauthorized"; + + // Reasons why the request was unauthorized + enum Reason { + REASON_UNSPECIFIED = 0; + + // The request was denied by the external authorization service. + EXTERNAL_SERVICE = 1; + } + + Reason reason = 1; + } + + // Indicates local server healthcheck failed. + bool failed_local_healthcheck = 1; + + // Indicates there was no healthy upstream. + bool no_healthy_upstream = 2; + + // Indicates an there was an upstream request timeout. + bool upstream_request_timeout = 3; + + // Indicates local codec level reset was sent on the stream. + bool local_reset = 4; + + // Indicates remote codec level reset was received on the stream. + bool upstream_remote_reset = 5; + + // Indicates there was a local reset by a connection pool due to an initial connection failure. + bool upstream_connection_failure = 6; + + // Indicates the stream was reset due to an upstream connection termination. + bool upstream_connection_termination = 7; + + // Indicates the stream was reset because of a resource overflow. + bool upstream_overflow = 8; + + // Indicates no route was found for the request. + bool no_route_found = 9; + + // Indicates that the request was delayed before proxying. + bool delay_injected = 10; + + // Indicates that the request was aborted with an injected error code. + bool fault_injected = 11; + + // Indicates that the request was rate-limited locally. + bool rate_limited = 12; + + // Indicates if the request was deemed unauthorized and the reason for it. + Unauthorized unauthorized_details = 13; + + // Indicates that the request was rejected because there was an error in rate limit service. + bool rate_limit_service_error = 14; + + // Indicates the stream was reset due to a downstream connection termination. + bool downstream_connection_termination = 15; + + // Indicates that the upstream retry limit was exceeded, resulting in a downstream error. + bool upstream_retry_limit_exceeded = 16; + + // Indicates that the stream idle timeout was hit, resulting in a downstream 408. + bool stream_idle_timeout = 17; + + // Indicates that the request was rejected because an envoy request header failed strict + // validation. + bool invalid_envoy_request_headers = 18; + + // Indicates there was an HTTP protocol error on the downstream request. + bool downstream_protocol_error = 19; + + // Indicates there was a max stream duration reached on the upstream request. + bool upstream_max_stream_duration_reached = 20; + + // Indicates the response was served from a cache filter. + bool response_from_cache_filter = 21; + + // Indicates that a filter configuration is not available. + bool no_filter_config_found = 22; + + // Indicates that request or connection exceeded the downstream connection duration. + bool duration_timeout = 23; + + // Indicates there was an HTTP protocol error in the upstream response. + bool upstream_protocol_error = 24; + + // Indicates no cluster was found for the request. + bool no_cluster_found = 25; +} + +// Properties of a negotiated TLS connection. +// [#next-free-field: 7] +message TLSProperties { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.TLSProperties"; + + enum TLSVersion { + VERSION_UNSPECIFIED = 0; + TLSv1 = 1; + TLSv1_1 = 2; + TLSv1_2 = 3; + TLSv1_3 = 4; + } + + message CertificateProperties { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.TLSProperties.CertificateProperties"; + + message SubjectAltName { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.TLSProperties.CertificateProperties.SubjectAltName"; + + oneof san { + string uri = 1; + + // [#not-implemented-hide:] + string dns = 2; + } + } + + // SANs present in the certificate. + repeated SubjectAltName subject_alt_name = 1; + + // The subject field of the certificate. + string subject = 2; + } + + // Version of TLS that was negotiated. + TLSVersion tls_version = 1; + + // TLS cipher suite negotiated during handshake. The value is a + // four-digit hex code defined by the IANA TLS Cipher Suite Registry + // (e.g. ``009C`` for ``TLS_RSA_WITH_AES_128_GCM_SHA256``). + // + // Here it is expressed as an integer. + google.protobuf.UInt32Value tls_cipher_suite = 2; + + // SNI hostname from handshake. + string tls_sni_hostname = 3; + + // Properties of the local certificate used to negotiate TLS. + CertificateProperties local_certificate_properties = 4; + + // Properties of the peer certificate used to negotiate TLS. + CertificateProperties peer_certificate_properties = 5; + + // The TLS session ID. + string tls_session_id = 6; +} + +// [#next-free-field: 14] +message HTTPRequestProperties { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.HTTPRequestProperties"; + + // The request method (RFC 7231/2616). + config.core.v4alpha.RequestMethod request_method = 1 + [(validate.rules).enum = {defined_only: true}]; + + // The scheme portion of the incoming request URI. + string scheme = 2; + + // HTTP/2 ``:authority`` or HTTP/1.1 ``Host`` header value. + string authority = 3; + + // The port of the incoming request URI + // (unused currently, as port is composed onto authority). + google.protobuf.UInt32Value port = 4; + + // The path portion from the incoming request URI. + string path = 5; + + // Value of the ``User-Agent`` request header. + string user_agent = 6; + + // Value of the ``Referer`` request header. + string referer = 7; + + // Value of the ``X-Forwarded-For`` request header. + string forwarded_for = 8; + + // Value of the ``X-Request-Id`` request header + // + // This header is used by Envoy to uniquely identify a request. + // It will be generated for all external requests and internal requests that + // do not already have a request ID. + string request_id = 9; + + // Value of the ``X-Envoy-Original-Path`` request header. + string original_path = 10; + + // Size of the HTTP request headers in bytes. + // + // This value is captured from the OSI layer 7 perspective, i.e. it does not + // include overhead from framing or encoding at other networking layers. + uint64 request_headers_bytes = 11; + + // Size of the HTTP request body in bytes. + // + // This value is captured from the OSI layer 7 perspective, i.e. it does not + // include overhead from framing or encoding at other networking layers. + uint64 request_body_bytes = 12; + + // Map of additional headers that have been configured to be logged. + map request_headers = 13; +} + +// [#next-free-field: 7] +message HTTPResponseProperties { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.HTTPResponseProperties"; + + // The HTTP response code returned by Envoy. + google.protobuf.UInt32Value response_code = 1; + + // Size of the HTTP response headers in bytes. + // + // This value is captured from the OSI layer 7 perspective, i.e. it does not + // include overhead from framing or encoding at other networking layers. + uint64 response_headers_bytes = 2; + + // Size of the HTTP response body in bytes. + // + // This value is captured from the OSI layer 7 perspective, i.e. it does not + // include overhead from framing or encoding at other networking layers. + uint64 response_body_bytes = 3; + + // Map of additional headers configured to be logged. + map response_headers = 4; + + // Map of trailers configured to be logged. + map response_trailers = 5; + + // The HTTP response code details. + string response_code_details = 6; +} diff --git a/api/envoy/extensions/access_loggers/grpc/v4alpha/als.proto b/api/envoy/extensions/access_loggers/grpc/v4alpha/als.proto index c7bf15948b231..9605a05c4128c 100644 --- a/api/envoy/extensions/access_loggers/grpc/v4alpha/als.proto +++ b/api/envoy/extensions/access_loggers/grpc/v4alpha/als.proto @@ -31,15 +31,15 @@ message HttpGrpcAccessLogConfig { CommonGrpcAccessLogConfig common_config = 1 [(validate.rules).message = {required: true}]; // Additional request headers to log in :ref:`HTTPRequestProperties.request_headers - // `. + // `. repeated string additional_request_headers_to_log = 2; // Additional response headers to log in :ref:`HTTPResponseProperties.response_headers - // `. + // `. repeated string additional_response_headers_to_log = 3; // Additional response trailers to log in :ref:`HTTPResponseProperties.response_trailers - // `. + // `. repeated string additional_response_trailers_to_log = 4; } @@ -83,7 +83,7 @@ message CommonGrpcAccessLogConfig { google.protobuf.UInt32Value buffer_size_bytes = 4; // Additional filter state objects to log in :ref:`filter_state_objects - // `. + // `. // Logger will call `FilterState::Object::serializeAsProto` to serialize the filter state object. repeated string filter_state_objects_to_log = 5; } diff --git a/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD b/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD new file mode 100644 index 0000000000000..df5de314366ab --- /dev/null +++ b/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD @@ -0,0 +1,13 @@ +# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") + +licenses(["notice"]) # Apache 2 + +api_proto_package( + deps = [ + "//envoy/config/core/v4alpha:pkg", + "//envoy/extensions/retry/host/omit_host_metadata/v3:pkg", + "@com_github_cncf_udpa//udpa/annotations:pkg", + ], +) diff --git a/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto b/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto new file mode 100644 index 0000000000000..043d5ce3cfa06 --- /dev/null +++ b/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +package envoy.extensions.retry.host.omit_host_metadata.v4alpha; + +import "envoy/config/core/v4alpha/base.proto"; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.retry.host.omit_host_metadata.v4alpha"; +option java_outer_classname = "OmitHostMetadataConfigProto"; +option java_multiple_files = true; +option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; + +// [#protodoc-title: Omit host metadata retry predicate] + +// A retry host predicate that can be used to reject a host based on +// predefined metadata match criteria. +// [#extension: envoy.retry_host_predicates.omit_host_metadata] +message OmitHostMetadataConfig { + option (udpa.annotations.versioning).previous_message_type = + "envoy.extensions.retry.host.omit_host_metadata.v3.OmitHostMetadataConfig"; + + // Retry host predicate metadata match criteria. The hosts in + // the upstream cluster with matching metadata will be omitted while + // attempting a retry of a failed request. The metadata should be specified + // under the *envoy.lb* key. + config.core.v4alpha.Metadata metadata_match = 1; +} diff --git a/api/envoy/service/accesslog/v4alpha/BUILD b/api/envoy/service/accesslog/v4alpha/BUILD index 94c70bc66967b..ef86c64ac7e5f 100644 --- a/api/envoy/service/accesslog/v4alpha/BUILD +++ b/api/envoy/service/accesslog/v4alpha/BUILD @@ -8,7 +8,7 @@ api_proto_package( has_services = True, deps = [ "//envoy/config/core/v4alpha:pkg", - "//envoy/data/accesslog/v3:pkg", + "//envoy/data/accesslog/v4alpha:pkg", "//envoy/service/accesslog/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/api/envoy/service/accesslog/v4alpha/als.proto b/api/envoy/service/accesslog/v4alpha/als.proto index e2c8bbbc80689..3ce1008ec48fb 100644 --- a/api/envoy/service/accesslog/v4alpha/als.proto +++ b/api/envoy/service/accesslog/v4alpha/als.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package envoy.service.accesslog.v4alpha; import "envoy/config/core/v4alpha/base.proto"; -import "envoy/data/accesslog/v3/accesslog.proto"; +import "envoy/data/accesslog/v4alpha/accesslog.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; @@ -58,7 +58,7 @@ message StreamAccessLogsMessage { option (udpa.annotations.versioning).previous_message_type = "envoy.service.accesslog.v3.StreamAccessLogsMessage.HTTPAccessLogEntries"; - repeated data.accesslog.v3.HTTPAccessLogEntry log_entry = 1 + repeated data.accesslog.v4alpha.HTTPAccessLogEntry log_entry = 1 [(validate.rules).repeated = {min_items: 1}]; } @@ -67,7 +67,7 @@ message StreamAccessLogsMessage { option (udpa.annotations.versioning).previous_message_type = "envoy.service.accesslog.v3.StreamAccessLogsMessage.TCPAccessLogEntries"; - repeated data.accesslog.v3.TCPAccessLogEntry log_entry = 1 + repeated data.accesslog.v4alpha.TCPAccessLogEntry log_entry = 1 [(validate.rules).repeated = {min_items: 1}]; } diff --git a/api/envoy/service/health/v4alpha/BUILD b/api/envoy/service/health/v4alpha/BUILD index 60bd19511855e..ed1ef41e94009 100644 --- a/api/envoy/service/health/v4alpha/BUILD +++ b/api/envoy/service/health/v4alpha/BUILD @@ -9,7 +9,7 @@ api_proto_package( deps = [ "//envoy/config/cluster/v4alpha:pkg", "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v3:pkg", + "//envoy/config/endpoint/v4alpha:pkg", "//envoy/service/health/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/api/envoy/service/health/v4alpha/hds.proto b/api/envoy/service/health/v4alpha/hds.proto index 537d20b58cbb3..ee4a7c86f94c6 100644 --- a/api/envoy/service/health/v4alpha/hds.proto +++ b/api/envoy/service/health/v4alpha/hds.proto @@ -5,7 +5,7 @@ package envoy.service.health.v4alpha; import "envoy/config/cluster/v4alpha/cluster.proto"; import "envoy/config/core/v4alpha/base.proto"; import "envoy/config/core/v4alpha/health_check.proto"; -import "envoy/config/endpoint/v3/endpoint_components.proto"; +import "envoy/config/endpoint/v4alpha/endpoint_components.proto"; import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; @@ -103,7 +103,7 @@ message EndpointHealth { option (udpa.annotations.versioning).previous_message_type = "envoy.service.health.v3.EndpointHealth"; - config.endpoint.v3.Endpoint endpoint = 1; + config.endpoint.v4alpha.Endpoint endpoint = 1; config.core.v4alpha.HealthStatus health_status = 2; } @@ -158,7 +158,7 @@ message LocalityEndpoints { config.core.v4alpha.Locality locality = 1; - repeated config.endpoint.v3.Endpoint endpoints = 2; + repeated config.endpoint.v4alpha.Endpoint endpoints = 2; } // The cluster name and locality is provided to Envoy for the endpoints that it diff --git a/api/envoy/service/load_stats/v4alpha/BUILD b/api/envoy/service/load_stats/v4alpha/BUILD index 91d914645041b..870673013a0e6 100644 --- a/api/envoy/service/load_stats/v4alpha/BUILD +++ b/api/envoy/service/load_stats/v4alpha/BUILD @@ -8,7 +8,7 @@ api_proto_package( has_services = True, deps = [ "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v3:pkg", + "//envoy/config/endpoint/v4alpha:pkg", "//envoy/service/load_stats/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/api/envoy/service/load_stats/v4alpha/lrs.proto b/api/envoy/service/load_stats/v4alpha/lrs.proto index 69eb3d707d5e1..344a4ef1094a7 100644 --- a/api/envoy/service/load_stats/v4alpha/lrs.proto +++ b/api/envoy/service/load_stats/v4alpha/lrs.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package envoy.service.load_stats.v4alpha; import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/endpoint/v3/load_report.proto"; +import "envoy/config/endpoint/v4alpha/load_report.proto"; import "google/protobuf/duration.proto"; @@ -68,7 +68,7 @@ message LoadStatsRequest { config.core.v4alpha.Node node = 1; // A list of load stats to report. - repeated config.endpoint.v3.ClusterStats cluster_stats = 2; + repeated config.endpoint.v4alpha.ClusterStats cluster_stats = 2; } // The management server sends envoy a LoadStatsResponse with all clusters it diff --git a/generated_api_shadow/envoy/config/cluster/v4alpha/BUILD b/generated_api_shadow/envoy/config/cluster/v4alpha/BUILD index 2bac8db17256c..49a44abbd4f75 100644 --- a/generated_api_shadow/envoy/config/cluster/v4alpha/BUILD +++ b/generated_api_shadow/envoy/config/cluster/v4alpha/BUILD @@ -9,7 +9,7 @@ api_proto_package( "//envoy/annotations:pkg", "//envoy/config/cluster/v3:pkg", "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v3:pkg", + "//envoy/config/endpoint/v4alpha:pkg", "//envoy/type/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", "@com_github_cncf_udpa//xds/core/v3:pkg", diff --git a/generated_api_shadow/envoy/config/cluster/v4alpha/cluster.proto b/generated_api_shadow/envoy/config/cluster/v4alpha/cluster.proto index bad0bc43faaf7..52fc1a004b881 100644 --- a/generated_api_shadow/envoy/config/cluster/v4alpha/cluster.proto +++ b/generated_api_shadow/envoy/config/cluster/v4alpha/cluster.proto @@ -11,7 +11,7 @@ import "envoy/config/core/v4alpha/config_source.proto"; import "envoy/config/core/v4alpha/extension.proto"; import "envoy/config/core/v4alpha/health_check.proto"; import "envoy/config/core/v4alpha/protocol.proto"; -import "envoy/config/endpoint/v3/endpoint.proto"; +import "envoy/config/endpoint/v4alpha/endpoint.proto"; import "envoy/type/v3/percent.proto"; import "google/protobuf/any.proto"; @@ -638,7 +638,7 @@ message Cluster { // Configuration to use different transport sockets for different endpoints. // The entry of *envoy.transport_socket_match* in the - // :ref:`LbEndpoint.Metadata ` + // :ref:`LbEndpoint.Metadata ` // is used to match against the transport sockets as they appear in the list. The first // :ref:`match ` is used. // For example, with the following match @@ -739,9 +739,9 @@ message Cluster { // .. attention:: // // Setting this allows non-EDS cluster types to contain embedded EDS equivalent - // :ref:`endpoint assignments`. + // :ref:`endpoint assignments`. // - endpoint.v3.ClusterLoadAssignment load_assignment = 33; + endpoint.v4alpha.ClusterLoadAssignment load_assignment = 33; // Optional :ref:`active health checking ` // configuration for the cluster. If no diff --git a/generated_api_shadow/envoy/config/core/v4alpha/health_check.proto b/generated_api_shadow/envoy/config/core/v4alpha/health_check.proto index ddc7d65e00075..90aaa057b0faf 100644 --- a/generated_api_shadow/envoy/config/core/v4alpha/health_check.proto +++ b/generated_api_shadow/envoy/config/core/v4alpha/health_check.proto @@ -85,7 +85,7 @@ message HealthCheck { // The value of the host header in the HTTP health check request. If // left empty (default value), the name of the cluster this health check is associated // with will be used. The host header can be customized for a specific endpoint by setting the - // :ref:`hostname ` field. + // :ref:`hostname ` field. string host = 1 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; // Specifies the HTTP path that will be requested during health checking. For example @@ -170,7 +170,7 @@ message HealthCheck { // The value of the :authority header in the gRPC health check request. If // left empty (default value), the name of the cluster this health check is associated // with will be used. The authority header can be customized for a specific endpoint by setting - // the :ref:`hostname ` field. + // the :ref:`hostname ` field. string authority = 2 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; } @@ -360,7 +360,7 @@ message HealthCheck { // config: { ... } # tls socket configuration // // If this field is set, then for health checks it will supersede an entry of *envoy.transport_socket* in the - // :ref:`LbEndpoint.Metadata `. + // :ref:`LbEndpoint.Metadata `. // This allows using different transport socket capabilities for health checking versus proxying to the // endpoint. // diff --git a/generated_api_shadow/envoy/config/endpoint/v4alpha/BUILD b/generated_api_shadow/envoy/config/endpoint/v4alpha/BUILD new file mode 100644 index 0000000000000..79d52ad4cfbc6 --- /dev/null +++ b/generated_api_shadow/envoy/config/endpoint/v4alpha/BUILD @@ -0,0 +1,14 @@ +# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") + +licenses(["notice"]) # Apache 2 + +api_proto_package( + deps = [ + "//envoy/config/core/v4alpha:pkg", + "//envoy/config/endpoint/v3:pkg", + "//envoy/type/v3:pkg", + "@com_github_cncf_udpa//udpa/annotations:pkg", + ], +) diff --git a/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint.proto b/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint.proto new file mode 100644 index 0000000000000..0d4d4684d2c10 --- /dev/null +++ b/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint.proto @@ -0,0 +1,119 @@ +syntax = "proto3"; + +package envoy.config.endpoint.v4alpha; + +import "envoy/config/endpoint/v4alpha/endpoint_components.proto"; +import "envoy/type/v3/percent.proto"; + +import "google/protobuf/duration.proto"; +import "google/protobuf/wrappers.proto"; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; +option java_outer_classname = "EndpointProto"; +option java_multiple_files = true; +option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; + +// [#protodoc-title: Endpoint configuration] +// Endpoint discovery :ref:`architecture overview ` + +// Each route from RDS will map to a single cluster or traffic split across +// clusters using weights expressed in the RDS WeightedCluster. +// +// With EDS, each cluster is treated independently from a LB perspective, with +// LB taking place between the Localities within a cluster and at a finer +// granularity between the hosts within a locality. The percentage of traffic +// for each endpoint is determined by both its load_balancing_weight, and the +// load_balancing_weight of its locality. First, a locality will be selected, +// then an endpoint within that locality will be chose based on its weight. +// [#next-free-field: 6] +message ClusterLoadAssignment { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.ClusterLoadAssignment"; + + // Load balancing policy settings. + // [#next-free-field: 6] + message Policy { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.ClusterLoadAssignment.Policy"; + + // [#not-implemented-hide:] + message DropOverload { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload"; + + // Identifier for the policy specifying the drop. + string category = 1 [(validate.rules).string = {min_len: 1}]; + + // Percentage of traffic that should be dropped for the category. + type.v3.FractionalPercent drop_percentage = 2; + } + + reserved 1, 5; + + reserved "disable_overprovisioning"; + + // Action to trim the overall incoming traffic to protect the upstream + // hosts. This action allows protection in case the hosts are unable to + // recover from an outage, or unable to autoscale or unable to handle + // incoming traffic volume for any reason. + // + // At the client each category is applied one after the other to generate + // the 'actual' drop percentage on all outgoing traffic. For example: + // + // .. code-block:: json + // + // { "drop_overloads": [ + // { "category": "throttle", "drop_percentage": 60 } + // { "category": "lb", "drop_percentage": 50 } + // ]} + // + // The actual drop percentages applied to the traffic at the clients will be + // "throttle"_drop = 60% + // "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%. + // actual_outgoing_load = 20% // remaining after applying all categories. + // [#not-implemented-hide:] + repeated DropOverload drop_overloads = 2; + + // Priority levels and localities are considered overprovisioned with this + // factor (in percentage). This means that we don't consider a priority + // level or locality unhealthy until the fraction of healthy hosts + // multiplied by the overprovisioning factor drops below 100. + // With the default value 140(1.4), Envoy doesn't consider a priority level + // or a locality unhealthy until their percentage of healthy hosts drops + // below 72%. For example: + // + // .. code-block:: json + // + // { "overprovisioning_factor": 100 } + // + // Read more at :ref:`priority levels ` and + // :ref:`localities `. + google.protobuf.UInt32Value overprovisioning_factor = 3 [(validate.rules).uint32 = {gt: 0}]; + + // The max time until which the endpoints from this assignment can be used. + // If no new assignments are received before this time expires the endpoints + // are considered stale and should be marked unhealthy. + // Defaults to 0 which means endpoints never go stale. + google.protobuf.Duration endpoint_stale_after = 4 [(validate.rules).duration = {gt {}}]; + } + + // Name of the cluster. This will be the :ref:`service_name + // ` value if specified + // in the cluster :ref:`EdsClusterConfig + // `. + string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; + + // List of endpoints to load balance to. + repeated LocalityLbEndpoints endpoints = 2; + + // Map of named endpoints that can be referenced in LocalityLbEndpoints. + // [#not-implemented-hide:] + map named_endpoints = 5; + + // Load balancing policy settings. + Policy policy = 4; +} diff --git a/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint_components.proto b/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint_components.proto new file mode 100644 index 0000000000000..246d569d28464 --- /dev/null +++ b/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint_components.proto @@ -0,0 +1,158 @@ +syntax = "proto3"; + +package envoy.config.endpoint.v4alpha; + +import "envoy/config/core/v4alpha/address.proto"; +import "envoy/config/core/v4alpha/base.proto"; +import "envoy/config/core/v4alpha/health_check.proto"; + +import "google/protobuf/wrappers.proto"; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; +option java_outer_classname = "EndpointComponentsProto"; +option java_multiple_files = true; +option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; + +// [#protodoc-title: Endpoints] + +// Upstream host identifier. +message Endpoint { + option (udpa.annotations.versioning).previous_message_type = "envoy.config.endpoint.v3.Endpoint"; + + // The optional health check configuration. + message HealthCheckConfig { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.Endpoint.HealthCheckConfig"; + + // Optional alternative health check port value. + // + // By default the health check address port of an upstream host is the same + // as the host's serving address port. This provides an alternative health + // check port. Setting this with a non-zero value allows an upstream host + // to have different health check address port. + uint32 port_value = 1 [(validate.rules).uint32 = {lte: 65535}]; + + // By default, the host header for L7 health checks is controlled by cluster level configuration + // (see: :ref:`host ` and + // :ref:`authority `). Setting this + // to a non-empty value allows overriding the cluster level configuration for a specific + // endpoint. + string hostname = 2; + } + + // The upstream host address. + // + // .. attention:: + // + // The form of host address depends on the given cluster type. For STATIC or EDS, + // it is expected to be a direct IP address (or something resolvable by the + // specified :ref:`resolver ` + // in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname, + // and will be resolved via DNS. + core.v4alpha.Address address = 1; + + // The optional health check configuration is used as configuration for the + // health checker to contact the health checked host. + // + // .. attention:: + // + // This takes into effect only for upstream clusters with + // :ref:`active health checking ` enabled. + HealthCheckConfig health_check_config = 2; + + // The hostname associated with this endpoint. This hostname is not used for routing or address + // resolution. If provided, it will be associated with the endpoint, and can be used for features + // that require a hostname, like + // :ref:`auto_host_rewrite `. + string hostname = 3; +} + +// An Endpoint that Envoy can route traffic to. +// [#next-free-field: 6] +message LbEndpoint { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.LbEndpoint"; + + // Upstream host identifier or a named reference. + oneof host_identifier { + Endpoint endpoint = 1; + + // [#not-implemented-hide:] + string endpoint_name = 5; + } + + // Optional health status when known and supplied by EDS server. + core.v4alpha.HealthStatus health_status = 2; + + // The endpoint metadata specifies values that may be used by the load + // balancer to select endpoints in a cluster for a given request. The filter + // name should be specified as *envoy.lb*. An example boolean key-value pair + // is *canary*, providing the optional canary status of the upstream host. + // This may be matched against in a route's + // :ref:`RouteAction ` metadata_match field + // to subset the endpoints considered in cluster load balancing. + core.v4alpha.Metadata metadata = 3; + + // The optional load balancing weight of the upstream host; at least 1. + // Envoy uses the load balancing weight in some of the built in load + // balancers. The load balancing weight for an endpoint is divided by the sum + // of the weights of all endpoints in the endpoint's locality to produce a + // percentage of traffic for the endpoint. This percentage is then further + // weighted by the endpoint's locality's load balancing weight from + // LocalityLbEndpoints. If unspecified, each host is presumed to have equal + // weight in a locality. The sum of the weights of all endpoints in the + // endpoint's locality must not exceed uint32_t maximal value (4294967295). + google.protobuf.UInt32Value load_balancing_weight = 4 [(validate.rules).uint32 = {gte: 1}]; +} + +// A group of endpoints belonging to a Locality. +// One can have multiple LocalityLbEndpoints for a locality, but this is +// generally only done if the different groups need to have different load +// balancing weights or different priorities. +// [#next-free-field: 7] +message LocalityLbEndpoints { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.LocalityLbEndpoints"; + + // Identifies location of where the upstream hosts run. + core.v4alpha.Locality locality = 1; + + // The group of endpoints belonging to the locality specified. + repeated LbEndpoint lb_endpoints = 2; + + // Optional: Per priority/region/zone/sub_zone weight; at least 1. The load + // balancing weight for a locality is divided by the sum of the weights of all + // localities at the same priority level to produce the effective percentage + // of traffic for the locality. The sum of the weights of all localities at + // the same priority level must not exceed uint32_t maximal value (4294967295). + // + // Locality weights are only considered when :ref:`locality weighted load + // balancing ` is + // configured. These weights are ignored otherwise. If no weights are + // specified when locality weighted load balancing is enabled, the locality is + // assigned no load. + google.protobuf.UInt32Value load_balancing_weight = 3 [(validate.rules).uint32 = {gte: 1}]; + + // Optional: the priority for this LocalityLbEndpoints. If unspecified this will + // default to the highest priority (0). + // + // Under usual circumstances, Envoy will only select endpoints for the highest + // priority (0). In the event all endpoints for a particular priority are + // unavailable/unhealthy, Envoy will fail over to selecting endpoints for the + // next highest priority group. + // + // Priorities should range from 0 (highest) to N (lowest) without skipping. + uint32 priority = 5 [(validate.rules).uint32 = {lte: 128}]; + + // Optional: Per locality proximity value which indicates how close this + // locality is from the source locality. This value only provides ordering + // information (lower the value, closer it is to the source locality). + // This will be consumed by load balancing schemes that need proximity order + // to determine where to route the requests. + // [#not-implemented-hide:] + google.protobuf.UInt32Value proximity = 6; +} diff --git a/generated_api_shadow/envoy/config/endpoint/v4alpha/load_report.proto b/generated_api_shadow/envoy/config/endpoint/v4alpha/load_report.proto new file mode 100644 index 0000000000000..80be59041d742 --- /dev/null +++ b/generated_api_shadow/envoy/config/endpoint/v4alpha/load_report.proto @@ -0,0 +1,168 @@ +syntax = "proto3"; + +package envoy.config.endpoint.v4alpha; + +import "envoy/config/core/v4alpha/address.proto"; +import "envoy/config/core/v4alpha/base.proto"; + +import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; +option java_outer_classname = "LoadReportProto"; +option java_multiple_files = true; +option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; + +// [#protodoc-title: Load Report] + +// These are stats Envoy reports to the management server at a frequency defined by +// :ref:`LoadStatsResponse.load_reporting_interval`. +// Stats per upstream region/zone and optionally per subzone. +// [#next-free-field: 9] +message UpstreamLocalityStats { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.UpstreamLocalityStats"; + + // Name of zone, region and optionally endpoint group these metrics were + // collected from. Zone and region names could be empty if unknown. + core.v4alpha.Locality locality = 1; + + // The total number of requests successfully completed by the endpoints in the + // locality. + 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, + // aggregated over all endpoints in the locality. + uint64 total_error_requests = 4; + + // The total number of requests that were issued by this Envoy since + // the last report. This information is aggregated over all the + // upstream endpoints in the locality. + uint64 total_issued_requests = 8; + + // Stats for multi-dimensional load balancing. + repeated EndpointLoadMetricStats load_metric_stats = 5; + + // Endpoint granularity stats information for this locality. This information + // is populated if the Server requests it by setting + // :ref:`LoadStatsResponse.report_endpoint_granularity`. + repeated UpstreamEndpointStats upstream_endpoint_stats = 7; + + // [#not-implemented-hide:] The priority of the endpoint group these metrics + // were collected from. + uint32 priority = 6; +} + +// [#next-free-field: 8] +message UpstreamEndpointStats { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.UpstreamEndpointStats"; + + // Upstream host address. + core.v4alpha.Address address = 1; + + // Opaque and implementation dependent metadata of the + // endpoint. Envoy will pass this directly to the management server. + google.protobuf.Struct metadata = 6; + + // 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 successfully. 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 for this endpoint. + 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; + + // The total number of requests that were issued to this endpoint + // since the last report. A single TCP connection, HTTP or gRPC + // request or stream is counted as one request. + uint64 total_issued_requests = 7; + + // Stats for multi-dimensional load balancing. + repeated EndpointLoadMetricStats load_metric_stats = 5; +} + +message EndpointLoadMetricStats { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.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` +// Next ID: 7 +// [#next-free-field: 7] +message ClusterStats { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.ClusterStats"; + + message DroppedRequests { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.endpoint.v3.ClusterStats.DroppedRequests"; + + // Identifier for the policy specifying the drop. + string category = 1 [(validate.rules).string = {min_len: 1}]; + + // Total number of deliberately dropped requests for the category. + uint64 dropped_count = 2; + } + + // The name of the cluster. + string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; + + // The eds_cluster_config service_name of the cluster. + // It's possible that two clusters send the same service_name to EDS, + // in that case, the management server is supposed to do aggregation on the load reports. + string cluster_service_name = 6; + + // 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 total number of dropped requests. This covers requests + // deliberately dropped by the drop_overload policy and circuit breaking. + uint64 total_dropped_requests = 3; + + // Information about deliberately dropped requests for each category specified + // in the DropOverload policy. + repeated DroppedRequests dropped_requests = 5; + + // Period over which the actual load report occurred. This will be guaranteed to include every + // request reported. Due to system load and delays between the *LoadStatsRequest* sent from Envoy + // and the *LoadStatsResponse* message sent from the management server, this may be longer than + // the requested load reporting interval in the *LoadStatsResponse*. + google.protobuf.Duration load_report_interval = 4; +} diff --git a/generated_api_shadow/envoy/data/accesslog/v4alpha/BUILD b/generated_api_shadow/envoy/data/accesslog/v4alpha/BUILD new file mode 100644 index 0000000000000..c02cec9d67f6c --- /dev/null +++ b/generated_api_shadow/envoy/data/accesslog/v4alpha/BUILD @@ -0,0 +1,13 @@ +# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") + +licenses(["notice"]) # Apache 2 + +api_proto_package( + deps = [ + "//envoy/config/core/v4alpha:pkg", + "//envoy/data/accesslog/v3:pkg", + "@com_github_cncf_udpa//udpa/annotations:pkg", + ], +) diff --git a/generated_api_shadow/envoy/data/accesslog/v4alpha/accesslog.proto b/generated_api_shadow/envoy/data/accesslog/v4alpha/accesslog.proto new file mode 100644 index 0000000000000..0e01ddc2dd784 --- /dev/null +++ b/generated_api_shadow/envoy/data/accesslog/v4alpha/accesslog.proto @@ -0,0 +1,431 @@ +syntax = "proto3"; + +package envoy.data.accesslog.v4alpha; + +import "envoy/config/core/v4alpha/address.proto"; +import "envoy/config/core/v4alpha/base.proto"; + +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.data.accesslog.v4alpha"; +option java_outer_classname = "AccesslogProto"; +option java_multiple_files = true; +option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; + +// [#protodoc-title: gRPC access logs] +// Envoy access logs describe incoming interaction with Envoy over a fixed +// period of time, and typically cover a single request/response exchange, +// (e.g. HTTP), stream (e.g. over HTTP/gRPC), or proxied connection (e.g. TCP). +// Access logs contain fields defined in protocol-specific protobuf messages. +// +// Except where explicitly declared otherwise, all fields describe +// *downstream* interaction between Envoy and a connected client. +// Fields describing *upstream* interaction will explicitly include ``upstream`` +// in their name. + +message TCPAccessLogEntry { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.TCPAccessLogEntry"; + + // Common properties shared by all Envoy access logs. + AccessLogCommon common_properties = 1; + + // Properties of the TCP connection. + ConnectionProperties connection_properties = 2; +} + +message HTTPAccessLogEntry { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.HTTPAccessLogEntry"; + + // HTTP version + enum HTTPVersion { + PROTOCOL_UNSPECIFIED = 0; + HTTP10 = 1; + HTTP11 = 2; + HTTP2 = 3; + HTTP3 = 4; + } + + // Common properties shared by all Envoy access logs. + AccessLogCommon common_properties = 1; + + HTTPVersion protocol_version = 2; + + // Description of the incoming HTTP request. + HTTPRequestProperties request = 3; + + // Description of the outgoing HTTP response. + HTTPResponseProperties response = 4; +} + +// Defines fields for a connection +message ConnectionProperties { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.ConnectionProperties"; + + // Number of bytes received from downstream. + uint64 received_bytes = 1; + + // Number of bytes sent to downstream. + uint64 sent_bytes = 2; +} + +// Defines fields that are shared by all Envoy access logs. +// [#next-free-field: 22] +message AccessLogCommon { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.AccessLogCommon"; + + // [#not-implemented-hide:] + // This field indicates the rate at which this log entry was sampled. + // Valid range is (0.0, 1.0]. + double sample_rate = 1 [(validate.rules).double = {lte: 1.0 gt: 0.0}]; + + // This field is the remote/origin address on which the request from the user was received. + // Note: This may not be the physical peer. E.g, if the remote address is inferred from for + // example the x-forwarder-for header, proxy protocol, etc. + config.core.v4alpha.Address downstream_remote_address = 2; + + // This field is the local/destination address on which the request from the user was received. + config.core.v4alpha.Address downstream_local_address = 3; + + // If the connection is secure,S this field will contain TLS properties. + TLSProperties tls_properties = 4; + + // The time that Envoy started servicing this request. This is effectively the time that the first + // downstream byte is received. + google.protobuf.Timestamp start_time = 5; + + // Interval between the first downstream byte received and the last + // downstream byte received (i.e. time it takes to receive a request). + google.protobuf.Duration time_to_last_rx_byte = 6; + + // Interval between the first downstream byte received and the first upstream byte sent. There may + // by considerable delta between *time_to_last_rx_byte* and this value due to filters. + // Additionally, the same caveats apply as documented in *time_to_last_downstream_tx_byte* about + // not accounting for kernel socket buffer time, etc. + google.protobuf.Duration time_to_first_upstream_tx_byte = 7; + + // Interval between the first downstream byte received and the last upstream byte sent. There may + // by considerable delta between *time_to_last_rx_byte* and this value due to filters. + // Additionally, the same caveats apply as documented in *time_to_last_downstream_tx_byte* about + // not accounting for kernel socket buffer time, etc. + google.protobuf.Duration time_to_last_upstream_tx_byte = 8; + + // Interval between the first downstream byte received and the first upstream + // byte received (i.e. time it takes to start receiving a response). + google.protobuf.Duration time_to_first_upstream_rx_byte = 9; + + // Interval between the first downstream byte received and the last upstream + // byte received (i.e. time it takes to receive a complete response). + google.protobuf.Duration time_to_last_upstream_rx_byte = 10; + + // Interval between the first downstream byte received and the first downstream byte sent. + // There may be a considerable delta between the *time_to_first_upstream_rx_byte* and this field + // due to filters. Additionally, the same caveats apply as documented in + // *time_to_last_downstream_tx_byte* about not accounting for kernel socket buffer time, etc. + google.protobuf.Duration time_to_first_downstream_tx_byte = 11; + + // Interval between the first downstream byte received and the last downstream byte sent. + // Depending on protocol, buffering, windowing, filters, etc. there may be a considerable delta + // between *time_to_last_upstream_rx_byte* and this field. Note also that this is an approximate + // time. In the current implementation it does not include kernel socket buffer time. In the + // current implementation it also does not include send window buffering inside the HTTP/2 codec. + // In the future it is likely that work will be done to make this duration more accurate. + google.protobuf.Duration time_to_last_downstream_tx_byte = 12; + + // The upstream remote/destination address that handles this exchange. This does not include + // retries. + config.core.v4alpha.Address upstream_remote_address = 13; + + // The upstream local/origin address that handles this exchange. This does not include retries. + config.core.v4alpha.Address upstream_local_address = 14; + + // The upstream cluster that *upstream_remote_address* belongs to. + string upstream_cluster = 15; + + // Flags indicating occurrences during request/response processing. + ResponseFlags response_flags = 16; + + // All metadata encountered during request processing, including endpoint + // selection. + // + // This can be used to associate IDs attached to the various configurations + // used to process this request with the access log entry. For example, a + // route created from a higher level forwarding rule with some ID can place + // that ID in this field and cross reference later. It can also be used to + // determine if a canary endpoint was used or not. + config.core.v4alpha.Metadata metadata = 17; + + // If upstream connection failed due to transport socket (e.g. TLS handshake), provides the + // failure reason from the transport socket. The format of this field depends on the configured + // upstream transport socket. Common TLS failures are in + // :ref:`TLS trouble shooting `. + string upstream_transport_failure_reason = 18; + + // The name of the route + string route_name = 19; + + // This field is the downstream direct remote address on which the request from the user was + // received. Note: This is always the physical peer, even if the remote address is inferred from + // for example the x-forwarder-for header, proxy protocol, etc. + config.core.v4alpha.Address downstream_direct_remote_address = 20; + + // Map of filter state in stream info that have been configured to be logged. If the filter + // state serialized to any message other than `google.protobuf.Any` it will be packed into + // `google.protobuf.Any`. + map filter_state_objects = 21; +} + +// Flags indicating occurrences during request/response processing. +// [#next-free-field: 26] +message ResponseFlags { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.ResponseFlags"; + + message Unauthorized { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.ResponseFlags.Unauthorized"; + + // Reasons why the request was unauthorized + enum Reason { + REASON_UNSPECIFIED = 0; + + // The request was denied by the external authorization service. + EXTERNAL_SERVICE = 1; + } + + Reason reason = 1; + } + + // Indicates local server healthcheck failed. + bool failed_local_healthcheck = 1; + + // Indicates there was no healthy upstream. + bool no_healthy_upstream = 2; + + // Indicates an there was an upstream request timeout. + bool upstream_request_timeout = 3; + + // Indicates local codec level reset was sent on the stream. + bool local_reset = 4; + + // Indicates remote codec level reset was received on the stream. + bool upstream_remote_reset = 5; + + // Indicates there was a local reset by a connection pool due to an initial connection failure. + bool upstream_connection_failure = 6; + + // Indicates the stream was reset due to an upstream connection termination. + bool upstream_connection_termination = 7; + + // Indicates the stream was reset because of a resource overflow. + bool upstream_overflow = 8; + + // Indicates no route was found for the request. + bool no_route_found = 9; + + // Indicates that the request was delayed before proxying. + bool delay_injected = 10; + + // Indicates that the request was aborted with an injected error code. + bool fault_injected = 11; + + // Indicates that the request was rate-limited locally. + bool rate_limited = 12; + + // Indicates if the request was deemed unauthorized and the reason for it. + Unauthorized unauthorized_details = 13; + + // Indicates that the request was rejected because there was an error in rate limit service. + bool rate_limit_service_error = 14; + + // Indicates the stream was reset due to a downstream connection termination. + bool downstream_connection_termination = 15; + + // Indicates that the upstream retry limit was exceeded, resulting in a downstream error. + bool upstream_retry_limit_exceeded = 16; + + // Indicates that the stream idle timeout was hit, resulting in a downstream 408. + bool stream_idle_timeout = 17; + + // Indicates that the request was rejected because an envoy request header failed strict + // validation. + bool invalid_envoy_request_headers = 18; + + // Indicates there was an HTTP protocol error on the downstream request. + bool downstream_protocol_error = 19; + + // Indicates there was a max stream duration reached on the upstream request. + bool upstream_max_stream_duration_reached = 20; + + // Indicates the response was served from a cache filter. + bool response_from_cache_filter = 21; + + // Indicates that a filter configuration is not available. + bool no_filter_config_found = 22; + + // Indicates that request or connection exceeded the downstream connection duration. + bool duration_timeout = 23; + + // Indicates there was an HTTP protocol error in the upstream response. + bool upstream_protocol_error = 24; + + // Indicates no cluster was found for the request. + bool no_cluster_found = 25; +} + +// Properties of a negotiated TLS connection. +// [#next-free-field: 7] +message TLSProperties { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.TLSProperties"; + + enum TLSVersion { + VERSION_UNSPECIFIED = 0; + TLSv1 = 1; + TLSv1_1 = 2; + TLSv1_2 = 3; + TLSv1_3 = 4; + } + + message CertificateProperties { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.TLSProperties.CertificateProperties"; + + message SubjectAltName { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.TLSProperties.CertificateProperties.SubjectAltName"; + + oneof san { + string uri = 1; + + // [#not-implemented-hide:] + string dns = 2; + } + } + + // SANs present in the certificate. + repeated SubjectAltName subject_alt_name = 1; + + // The subject field of the certificate. + string subject = 2; + } + + // Version of TLS that was negotiated. + TLSVersion tls_version = 1; + + // TLS cipher suite negotiated during handshake. The value is a + // four-digit hex code defined by the IANA TLS Cipher Suite Registry + // (e.g. ``009C`` for ``TLS_RSA_WITH_AES_128_GCM_SHA256``). + // + // Here it is expressed as an integer. + google.protobuf.UInt32Value tls_cipher_suite = 2; + + // SNI hostname from handshake. + string tls_sni_hostname = 3; + + // Properties of the local certificate used to negotiate TLS. + CertificateProperties local_certificate_properties = 4; + + // Properties of the peer certificate used to negotiate TLS. + CertificateProperties peer_certificate_properties = 5; + + // The TLS session ID. + string tls_session_id = 6; +} + +// [#next-free-field: 14] +message HTTPRequestProperties { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.HTTPRequestProperties"; + + // The request method (RFC 7231/2616). + config.core.v4alpha.RequestMethod request_method = 1 + [(validate.rules).enum = {defined_only: true}]; + + // The scheme portion of the incoming request URI. + string scheme = 2; + + // HTTP/2 ``:authority`` or HTTP/1.1 ``Host`` header value. + string authority = 3; + + // The port of the incoming request URI + // (unused currently, as port is composed onto authority). + google.protobuf.UInt32Value port = 4; + + // The path portion from the incoming request URI. + string path = 5; + + // Value of the ``User-Agent`` request header. + string user_agent = 6; + + // Value of the ``Referer`` request header. + string referer = 7; + + // Value of the ``X-Forwarded-For`` request header. + string forwarded_for = 8; + + // Value of the ``X-Request-Id`` request header + // + // This header is used by Envoy to uniquely identify a request. + // It will be generated for all external requests and internal requests that + // do not already have a request ID. + string request_id = 9; + + // Value of the ``X-Envoy-Original-Path`` request header. + string original_path = 10; + + // Size of the HTTP request headers in bytes. + // + // This value is captured from the OSI layer 7 perspective, i.e. it does not + // include overhead from framing or encoding at other networking layers. + uint64 request_headers_bytes = 11; + + // Size of the HTTP request body in bytes. + // + // This value is captured from the OSI layer 7 perspective, i.e. it does not + // include overhead from framing or encoding at other networking layers. + uint64 request_body_bytes = 12; + + // Map of additional headers that have been configured to be logged. + map request_headers = 13; +} + +// [#next-free-field: 7] +message HTTPResponseProperties { + option (udpa.annotations.versioning).previous_message_type = + "envoy.data.accesslog.v3.HTTPResponseProperties"; + + // The HTTP response code returned by Envoy. + google.protobuf.UInt32Value response_code = 1; + + // Size of the HTTP response headers in bytes. + // + // This value is captured from the OSI layer 7 perspective, i.e. it does not + // include overhead from framing or encoding at other networking layers. + uint64 response_headers_bytes = 2; + + // Size of the HTTP response body in bytes. + // + // This value is captured from the OSI layer 7 perspective, i.e. it does not + // include overhead from framing or encoding at other networking layers. + uint64 response_body_bytes = 3; + + // Map of additional headers configured to be logged. + map response_headers = 4; + + // Map of trailers configured to be logged. + map response_trailers = 5; + + // The HTTP response code details. + string response_code_details = 6; +} diff --git a/generated_api_shadow/envoy/extensions/access_loggers/grpc/v4alpha/als.proto b/generated_api_shadow/envoy/extensions/access_loggers/grpc/v4alpha/als.proto index c7bf15948b231..9605a05c4128c 100644 --- a/generated_api_shadow/envoy/extensions/access_loggers/grpc/v4alpha/als.proto +++ b/generated_api_shadow/envoy/extensions/access_loggers/grpc/v4alpha/als.proto @@ -31,15 +31,15 @@ message HttpGrpcAccessLogConfig { CommonGrpcAccessLogConfig common_config = 1 [(validate.rules).message = {required: true}]; // Additional request headers to log in :ref:`HTTPRequestProperties.request_headers - // `. + // `. repeated string additional_request_headers_to_log = 2; // Additional response headers to log in :ref:`HTTPResponseProperties.response_headers - // `. + // `. repeated string additional_response_headers_to_log = 3; // Additional response trailers to log in :ref:`HTTPResponseProperties.response_trailers - // `. + // `. repeated string additional_response_trailers_to_log = 4; } @@ -83,7 +83,7 @@ message CommonGrpcAccessLogConfig { google.protobuf.UInt32Value buffer_size_bytes = 4; // Additional filter state objects to log in :ref:`filter_state_objects - // `. + // `. // Logger will call `FilterState::Object::serializeAsProto` to serialize the filter state object. repeated string filter_state_objects_to_log = 5; } diff --git a/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD b/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD new file mode 100644 index 0000000000000..df5de314366ab --- /dev/null +++ b/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD @@ -0,0 +1,13 @@ +# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") + +licenses(["notice"]) # Apache 2 + +api_proto_package( + deps = [ + "//envoy/config/core/v4alpha:pkg", + "//envoy/extensions/retry/host/omit_host_metadata/v3:pkg", + "@com_github_cncf_udpa//udpa/annotations:pkg", + ], +) diff --git a/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto b/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto new file mode 100644 index 0000000000000..043d5ce3cfa06 --- /dev/null +++ b/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +package envoy.extensions.retry.host.omit_host_metadata.v4alpha; + +import "envoy/config/core/v4alpha/base.proto"; + +import "udpa/annotations/status.proto"; +import "udpa/annotations/versioning.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.retry.host.omit_host_metadata.v4alpha"; +option java_outer_classname = "OmitHostMetadataConfigProto"; +option java_multiple_files = true; +option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; + +// [#protodoc-title: Omit host metadata retry predicate] + +// A retry host predicate that can be used to reject a host based on +// predefined metadata match criteria. +// [#extension: envoy.retry_host_predicates.omit_host_metadata] +message OmitHostMetadataConfig { + option (udpa.annotations.versioning).previous_message_type = + "envoy.extensions.retry.host.omit_host_metadata.v3.OmitHostMetadataConfig"; + + // Retry host predicate metadata match criteria. The hosts in + // the upstream cluster with matching metadata will be omitted while + // attempting a retry of a failed request. The metadata should be specified + // under the *envoy.lb* key. + config.core.v4alpha.Metadata metadata_match = 1; +} diff --git a/generated_api_shadow/envoy/service/accesslog/v4alpha/BUILD b/generated_api_shadow/envoy/service/accesslog/v4alpha/BUILD index 94c70bc66967b..ef86c64ac7e5f 100644 --- a/generated_api_shadow/envoy/service/accesslog/v4alpha/BUILD +++ b/generated_api_shadow/envoy/service/accesslog/v4alpha/BUILD @@ -8,7 +8,7 @@ api_proto_package( has_services = True, deps = [ "//envoy/config/core/v4alpha:pkg", - "//envoy/data/accesslog/v3:pkg", + "//envoy/data/accesslog/v4alpha:pkg", "//envoy/service/accesslog/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/generated_api_shadow/envoy/service/accesslog/v4alpha/als.proto b/generated_api_shadow/envoy/service/accesslog/v4alpha/als.proto index e2c8bbbc80689..3ce1008ec48fb 100644 --- a/generated_api_shadow/envoy/service/accesslog/v4alpha/als.proto +++ b/generated_api_shadow/envoy/service/accesslog/v4alpha/als.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package envoy.service.accesslog.v4alpha; import "envoy/config/core/v4alpha/base.proto"; -import "envoy/data/accesslog/v3/accesslog.proto"; +import "envoy/data/accesslog/v4alpha/accesslog.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; @@ -58,7 +58,7 @@ message StreamAccessLogsMessage { option (udpa.annotations.versioning).previous_message_type = "envoy.service.accesslog.v3.StreamAccessLogsMessage.HTTPAccessLogEntries"; - repeated data.accesslog.v3.HTTPAccessLogEntry log_entry = 1 + repeated data.accesslog.v4alpha.HTTPAccessLogEntry log_entry = 1 [(validate.rules).repeated = {min_items: 1}]; } @@ -67,7 +67,7 @@ message StreamAccessLogsMessage { option (udpa.annotations.versioning).previous_message_type = "envoy.service.accesslog.v3.StreamAccessLogsMessage.TCPAccessLogEntries"; - repeated data.accesslog.v3.TCPAccessLogEntry log_entry = 1 + repeated data.accesslog.v4alpha.TCPAccessLogEntry log_entry = 1 [(validate.rules).repeated = {min_items: 1}]; } diff --git a/generated_api_shadow/envoy/service/health/v4alpha/BUILD b/generated_api_shadow/envoy/service/health/v4alpha/BUILD index 37c2608f7c182..dc88ee92239b0 100644 --- a/generated_api_shadow/envoy/service/health/v4alpha/BUILD +++ b/generated_api_shadow/envoy/service/health/v4alpha/BUILD @@ -10,7 +10,7 @@ api_proto_package( "//envoy/annotations:pkg", "//envoy/config/cluster/v4alpha:pkg", "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v3:pkg", + "//envoy/config/endpoint/v4alpha:pkg", "//envoy/service/health/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/generated_api_shadow/envoy/service/health/v4alpha/hds.proto b/generated_api_shadow/envoy/service/health/v4alpha/hds.proto index bf3a5133f1193..801de1cb832ad 100644 --- a/generated_api_shadow/envoy/service/health/v4alpha/hds.proto +++ b/generated_api_shadow/envoy/service/health/v4alpha/hds.proto @@ -5,7 +5,7 @@ package envoy.service.health.v4alpha; import "envoy/config/cluster/v4alpha/cluster.proto"; import "envoy/config/core/v4alpha/base.proto"; import "envoy/config/core/v4alpha/health_check.proto"; -import "envoy/config/endpoint/v3/endpoint_components.proto"; +import "envoy/config/endpoint/v4alpha/endpoint_components.proto"; import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; @@ -104,7 +104,7 @@ message EndpointHealth { option (udpa.annotations.versioning).previous_message_type = "envoy.service.health.v3.EndpointHealth"; - config.endpoint.v3.Endpoint endpoint = 1; + config.endpoint.v4alpha.Endpoint endpoint = 1; config.core.v4alpha.HealthStatus health_status = 2; } @@ -159,7 +159,7 @@ message LocalityEndpoints { config.core.v4alpha.Locality locality = 1; - repeated config.endpoint.v3.Endpoint endpoints = 2; + repeated config.endpoint.v4alpha.Endpoint endpoints = 2; } // The cluster name and locality is provided to Envoy for the endpoints that it diff --git a/generated_api_shadow/envoy/service/load_stats/v4alpha/BUILD b/generated_api_shadow/envoy/service/load_stats/v4alpha/BUILD index 91d914645041b..870673013a0e6 100644 --- a/generated_api_shadow/envoy/service/load_stats/v4alpha/BUILD +++ b/generated_api_shadow/envoy/service/load_stats/v4alpha/BUILD @@ -8,7 +8,7 @@ api_proto_package( has_services = True, deps = [ "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v3:pkg", + "//envoy/config/endpoint/v4alpha:pkg", "//envoy/service/load_stats/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/generated_api_shadow/envoy/service/load_stats/v4alpha/lrs.proto b/generated_api_shadow/envoy/service/load_stats/v4alpha/lrs.proto index 69eb3d707d5e1..344a4ef1094a7 100644 --- a/generated_api_shadow/envoy/service/load_stats/v4alpha/lrs.proto +++ b/generated_api_shadow/envoy/service/load_stats/v4alpha/lrs.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package envoy.service.load_stats.v4alpha; import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/endpoint/v3/load_report.proto"; +import "envoy/config/endpoint/v4alpha/load_report.proto"; import "google/protobuf/duration.proto"; @@ -68,7 +68,7 @@ message LoadStatsRequest { config.core.v4alpha.Node node = 1; // A list of load stats to report. - repeated config.endpoint.v3.ClusterStats cluster_stats = 2; + repeated config.endpoint.v4alpha.ClusterStats cluster_stats = 2; } // The management server sends envoy a LoadStatsResponse with all clusters it From 91e31bcf89e6dad5dd0ce089fdeaa2b33cadb71d Mon Sep 17 00:00:00 2001 From: Yanjun Xiang Date: Thu, 6 May 2021 19:37:53 +0000 Subject: [PATCH 08/11] adding back the two missed test file changes Signed-off-by: Yanjun Xiang --- test/common/router/config_impl_test.cc | 5 +++++ test/common/upstream/upstream_impl_test.cc | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/test/common/router/config_impl_test.cc b/test/common/router/config_impl_test.cc index c465afe150e6a..05b232f7e810d 100644 --- a/test/common/router/config_impl_test.cc +++ b/test/common/router/config_impl_test.cc @@ -5020,6 +5020,11 @@ class BazFactory : public HttpRouteTypedMetadataFactory { } throw EnvoyException("Cannot create a Baz when metadata is empty."); } + + std::unique_ptr + parse(const ProtobufWkt::Any&) const override { + return nullptr; + } }; TEST_F(RouteMatcherTest, WeightedClusters) { diff --git a/test/common/upstream/upstream_impl_test.cc b/test/common/upstream/upstream_impl_test.cc index a0ce86ae68ac1..a72407a7981b8 100644 --- a/test/common/upstream/upstream_impl_test.cc +++ b/test/common/upstream/upstream_impl_test.cc @@ -2255,6 +2255,11 @@ class BazFactory : public ClusterTypedMetadataFactory { } throw EnvoyException("Cannot create a Baz when metadata is empty."); } + + std::unique_ptr + parse(const ProtobufWkt::Any&) const override { + return nullptr; + } }; // Cluster metadata and common config retrieval. From 03500dca14a7853fdebefb88d8dd013b3eabb5bf Mon Sep 17 00:00:00 2001 From: Yanjun Xiang Date: Fri, 7 May 2021 14:43:20 +0000 Subject: [PATCH 09/11] adding change to deal with pre_submit check error flaged by gcc Signed-off-by: Yanjun Xiang --- test/common/config/metadata_test.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/test/common/config/metadata_test.cc b/test/common/config/metadata_test.cc index 839f569ba489f..ee3c6b273ebf4 100644 --- a/test/common/config/metadata_test.cc +++ b/test/common/config/metadata_test.cc @@ -95,6 +95,7 @@ class TypedMetadataTest : public testing::Test { class BazFactory : public FoobarFactory { public: std::string name() const override { return "baz"; } + using FoobarFactory::parse; // Override Any parse() to just return nullptr. std::unique_ptr parse(const ProtobufWkt::Any&) const override { return nullptr; From 4042f5d898deb3e153dc4c7eb98126cb55e98373 Mon Sep 17 00:00:00 2001 From: Yanjun Xiang Date: Tue, 11 May 2021 18:01:26 +0000 Subject: [PATCH 10/11] run fix_and_check scripts Signed-off-by: Yanjun Xiang --- api/envoy/config/cluster/v4alpha/BUILD | 2 +- .../config/cluster/v4alpha/cluster.proto | 8 +- api/envoy/config/core/v3/base.proto | 10 +- api/envoy/config/core/v4alpha/base.proto | 13 +- .../config/core/v4alpha/health_check.proto | 6 +- api/envoy/config/endpoint/v4alpha/BUILD | 14 - .../config/endpoint/v4alpha/endpoint.proto | 119 ----- .../v4alpha/endpoint_components.proto | 158 ------- .../config/endpoint/v4alpha/load_report.proto | 168 ------- api/envoy/data/accesslog/v4alpha/BUILD | 13 - .../data/accesslog/v4alpha/accesslog.proto | 431 ------------------ .../access_loggers/grpc/v4alpha/als.proto | 8 +- .../host/omit_host_metadata/v4alpha/BUILD | 13 - .../v4alpha/omit_host_metadata_config.proto | 29 -- api/envoy/service/accesslog/v4alpha/BUILD | 2 +- api/envoy/service/accesslog/v4alpha/als.proto | 6 +- api/envoy/service/health/v4alpha/BUILD | 2 +- api/envoy/service/health/v4alpha/hds.proto | 6 +- api/envoy/service/load_stats/v4alpha/BUILD | 2 +- .../service/load_stats/v4alpha/lrs.proto | 4 +- .../envoy/config/cluster/v4alpha/BUILD | 2 +- .../config/cluster/v4alpha/cluster.proto | 8 +- .../envoy/config/core/v3/base.proto | 10 +- .../envoy/config/core/v4alpha/base.proto | 12 +- .../config/core/v4alpha/health_check.proto | 6 +- .../envoy/config/endpoint/v4alpha/BUILD | 14 - .../config/endpoint/v4alpha/endpoint.proto | 119 ----- .../v4alpha/endpoint_components.proto | 158 ------- .../config/endpoint/v4alpha/load_report.proto | 168 ------- .../envoy/data/accesslog/v4alpha/BUILD | 13 - .../data/accesslog/v4alpha/accesslog.proto | 431 ------------------ .../access_loggers/grpc/v4alpha/als.proto | 8 +- .../host/omit_host_metadata/v4alpha/BUILD | 13 - .../v4alpha/omit_host_metadata_config.proto | 29 -- .../envoy/service/accesslog/v4alpha/BUILD | 2 +- .../envoy/service/accesslog/v4alpha/als.proto | 6 +- .../envoy/service/health/v4alpha/BUILD | 2 +- .../envoy/service/health/v4alpha/hds.proto | 6 +- .../envoy/service/load_stats/v4alpha/BUILD | 2 +- .../service/load_stats/v4alpha/lrs.proto | 4 +- 40 files changed, 62 insertions(+), 1965 deletions(-) delete mode 100644 api/envoy/config/endpoint/v4alpha/BUILD delete mode 100644 api/envoy/config/endpoint/v4alpha/endpoint.proto delete mode 100644 api/envoy/config/endpoint/v4alpha/endpoint_components.proto delete mode 100644 api/envoy/config/endpoint/v4alpha/load_report.proto delete mode 100644 api/envoy/data/accesslog/v4alpha/BUILD delete mode 100644 api/envoy/data/accesslog/v4alpha/accesslog.proto delete mode 100644 api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD delete mode 100644 api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto delete mode 100644 generated_api_shadow/envoy/config/endpoint/v4alpha/BUILD delete mode 100644 generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint.proto delete mode 100644 generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint_components.proto delete mode 100644 generated_api_shadow/envoy/config/endpoint/v4alpha/load_report.proto delete mode 100644 generated_api_shadow/envoy/data/accesslog/v4alpha/BUILD delete mode 100644 generated_api_shadow/envoy/data/accesslog/v4alpha/accesslog.proto delete mode 100644 generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD delete mode 100644 generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto diff --git a/api/envoy/config/cluster/v4alpha/BUILD b/api/envoy/config/cluster/v4alpha/BUILD index b5db8055b8d1e..02eb1b1917251 100644 --- a/api/envoy/config/cluster/v4alpha/BUILD +++ b/api/envoy/config/cluster/v4alpha/BUILD @@ -8,7 +8,7 @@ api_proto_package( deps = [ "//envoy/config/cluster/v3:pkg", "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v4alpha:pkg", + "//envoy/config/endpoint/v3:pkg", "//envoy/type/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", "@com_github_cncf_udpa//xds/core/v3:pkg", diff --git a/api/envoy/config/cluster/v4alpha/cluster.proto b/api/envoy/config/cluster/v4alpha/cluster.proto index a898c62affdd3..807b70a0ce8be 100644 --- a/api/envoy/config/cluster/v4alpha/cluster.proto +++ b/api/envoy/config/cluster/v4alpha/cluster.proto @@ -10,7 +10,7 @@ import "envoy/config/core/v4alpha/base.proto"; import "envoy/config/core/v4alpha/config_source.proto"; import "envoy/config/core/v4alpha/extension.proto"; import "envoy/config/core/v4alpha/health_check.proto"; -import "envoy/config/endpoint/v4alpha/endpoint.proto"; +import "envoy/config/endpoint/v3/endpoint.proto"; import "envoy/type/v3/percent.proto"; import "google/protobuf/any.proto"; @@ -638,7 +638,7 @@ message Cluster { // Configuration to use different transport sockets for different endpoints. // The entry of *envoy.transport_socket_match* in the - // :ref:`LbEndpoint.Metadata ` + // :ref:`LbEndpoint.Metadata ` // is used to match against the transport sockets as they appear in the list. The first // :ref:`match ` is used. // For example, with the following match @@ -739,9 +739,9 @@ message Cluster { // .. attention:: // // Setting this allows non-EDS cluster types to contain embedded EDS equivalent - // :ref:`endpoint assignments`. + // :ref:`endpoint assignments`. // - endpoint.v4alpha.ClusterLoadAssignment load_assignment = 33; + endpoint.v3.ClusterLoadAssignment load_assignment = 33; // Optional :ref:`active health checking ` // configuration for the cluster. If no diff --git a/api/envoy/config/core/v3/base.proto b/api/envoy/config/core/v3/base.proto index cedf678e8d88b..5069950360e01 100644 --- a/api/envoy/config/core/v3/base.proto +++ b/api/envoy/config/core/v3/base.proto @@ -236,17 +236,13 @@ message Metadata { // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. - // This is deprecated in favor of - // :ref:`typed_filter_metadata ` field. - map filter_metadata = 1 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; + map filter_metadata = 1; // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. // The value is encoded as google.protobuf.Any. - // If both :ref:`filter_metadata ` - // and typed_filter_metadata fields are present in the metadata with same keys, - // only typed_filter_metadata field will be parsed. + // If both filter_metadata and typed_filter_metadata fields are present in the + // metadata with same keys, only typed_filter_metadata field will be parsed. map typed_filter_metadata = 2; } diff --git a/api/envoy/config/core/v4alpha/base.proto b/api/envoy/config/core/v4alpha/base.proto index 30813e60f2773..d5a24da7934b8 100644 --- a/api/envoy/config/core/v4alpha/base.proto +++ b/api/envoy/config/core/v4alpha/base.proto @@ -71,7 +71,7 @@ message Locality { // Defines the local service zone where Envoy is running. Though optional, it // should be set if discovery service routing is used and the discovery - // service exposes :ref:`zone data `, + // service exposes :ref:`zone data `, // either in this message or via :option:`--service-zone`. The meaning of zone // is context dependent, e.g. `Availability Zone (AZ) // `_ @@ -224,16 +224,15 @@ message Node { message Metadata { option (udpa.annotations.versioning).previous_message_type = "envoy.config.core.v3.Metadata"; - reserved 1; - - reserved "filter_metadata"; + // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* + // namespace is reserved for Envoy's built-in filters. + map filter_metadata = 1; // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. // The value is encoded as google.protobuf.Any. - // If both :ref:`filter_metadata ` - // and typed_filter_metadata fields are present in the metadata with same keys, - // only typed_filter_metadata field will be parsed. + // If both filter_metadata and typed_filter_metadata fields are present in the + // metadata with same keys, only typed_filter_metadata field will be parsed. map typed_filter_metadata = 2; } diff --git a/api/envoy/config/core/v4alpha/health_check.proto b/api/envoy/config/core/v4alpha/health_check.proto index 5ef9369ccd15b..bf86f26e665e3 100644 --- a/api/envoy/config/core/v4alpha/health_check.proto +++ b/api/envoy/config/core/v4alpha/health_check.proto @@ -85,7 +85,7 @@ message HealthCheck { // The value of the host header in the HTTP health check request. If // left empty (default value), the name of the cluster this health check is associated // with will be used. The host header can be customized for a specific endpoint by setting the - // :ref:`hostname ` field. + // :ref:`hostname ` field. string host = 1 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; // Specifies the HTTP path that will be requested during health checking. For example @@ -170,7 +170,7 @@ message HealthCheck { // The value of the :authority header in the gRPC health check request. If // left empty (default value), the name of the cluster this health check is associated // with will be used. The authority header can be customized for a specific endpoint by setting - // the :ref:`hostname ` field. + // the :ref:`hostname ` field. string authority = 2 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; } @@ -360,7 +360,7 @@ message HealthCheck { // config: { ... } # tls socket configuration // // If this field is set, then for health checks it will supersede an entry of *envoy.transport_socket* in the - // :ref:`LbEndpoint.Metadata `. + // :ref:`LbEndpoint.Metadata `. // This allows using different transport socket capabilities for health checking versus proxying to the // endpoint. // diff --git a/api/envoy/config/endpoint/v4alpha/BUILD b/api/envoy/config/endpoint/v4alpha/BUILD deleted file mode 100644 index 79d52ad4cfbc6..0000000000000 --- a/api/envoy/config/endpoint/v4alpha/BUILD +++ /dev/null @@ -1,14 +0,0 @@ -# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. - -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") - -licenses(["notice"]) # Apache 2 - -api_proto_package( - deps = [ - "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v3:pkg", - "//envoy/type/v3:pkg", - "@com_github_cncf_udpa//udpa/annotations:pkg", - ], -) diff --git a/api/envoy/config/endpoint/v4alpha/endpoint.proto b/api/envoy/config/endpoint/v4alpha/endpoint.proto deleted file mode 100644 index 0d4d4684d2c10..0000000000000 --- a/api/envoy/config/endpoint/v4alpha/endpoint.proto +++ /dev/null @@ -1,119 +0,0 @@ -syntax = "proto3"; - -package envoy.config.endpoint.v4alpha; - -import "envoy/config/endpoint/v4alpha/endpoint_components.proto"; -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; -option java_outer_classname = "EndpointProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Endpoint configuration] -// Endpoint discovery :ref:`architecture overview ` - -// Each route from RDS will map to a single cluster or traffic split across -// clusters using weights expressed in the RDS WeightedCluster. -// -// With EDS, each cluster is treated independently from a LB perspective, with -// LB taking place between the Localities within a cluster and at a finer -// granularity between the hosts within a locality. The percentage of traffic -// for each endpoint is determined by both its load_balancing_weight, and the -// load_balancing_weight of its locality. First, a locality will be selected, -// then an endpoint within that locality will be chose based on its weight. -// [#next-free-field: 6] -message ClusterLoadAssignment { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.ClusterLoadAssignment"; - - // Load balancing policy settings. - // [#next-free-field: 6] - message Policy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.ClusterLoadAssignment.Policy"; - - // [#not-implemented-hide:] - message DropOverload { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload"; - - // Identifier for the policy specifying the drop. - string category = 1 [(validate.rules).string = {min_len: 1}]; - - // Percentage of traffic that should be dropped for the category. - type.v3.FractionalPercent drop_percentage = 2; - } - - reserved 1, 5; - - reserved "disable_overprovisioning"; - - // Action to trim the overall incoming traffic to protect the upstream - // hosts. This action allows protection in case the hosts are unable to - // recover from an outage, or unable to autoscale or unable to handle - // incoming traffic volume for any reason. - // - // At the client each category is applied one after the other to generate - // the 'actual' drop percentage on all outgoing traffic. For example: - // - // .. code-block:: json - // - // { "drop_overloads": [ - // { "category": "throttle", "drop_percentage": 60 } - // { "category": "lb", "drop_percentage": 50 } - // ]} - // - // The actual drop percentages applied to the traffic at the clients will be - // "throttle"_drop = 60% - // "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%. - // actual_outgoing_load = 20% // remaining after applying all categories. - // [#not-implemented-hide:] - repeated DropOverload drop_overloads = 2; - - // Priority levels and localities are considered overprovisioned with this - // factor (in percentage). This means that we don't consider a priority - // level or locality unhealthy until the fraction of healthy hosts - // multiplied by the overprovisioning factor drops below 100. - // With the default value 140(1.4), Envoy doesn't consider a priority level - // or a locality unhealthy until their percentage of healthy hosts drops - // below 72%. For example: - // - // .. code-block:: json - // - // { "overprovisioning_factor": 100 } - // - // Read more at :ref:`priority levels ` and - // :ref:`localities `. - google.protobuf.UInt32Value overprovisioning_factor = 3 [(validate.rules).uint32 = {gt: 0}]; - - // The max time until which the endpoints from this assignment can be used. - // If no new assignments are received before this time expires the endpoints - // are considered stale and should be marked unhealthy. - // Defaults to 0 which means endpoints never go stale. - google.protobuf.Duration endpoint_stale_after = 4 [(validate.rules).duration = {gt {}}]; - } - - // Name of the cluster. This will be the :ref:`service_name - // ` value if specified - // in the cluster :ref:`EdsClusterConfig - // `. - string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; - - // List of endpoints to load balance to. - repeated LocalityLbEndpoints endpoints = 2; - - // Map of named endpoints that can be referenced in LocalityLbEndpoints. - // [#not-implemented-hide:] - map named_endpoints = 5; - - // Load balancing policy settings. - Policy policy = 4; -} diff --git a/api/envoy/config/endpoint/v4alpha/endpoint_components.proto b/api/envoy/config/endpoint/v4alpha/endpoint_components.proto deleted file mode 100644 index 246d569d28464..0000000000000 --- a/api/envoy/config/endpoint/v4alpha/endpoint_components.proto +++ /dev/null @@ -1,158 +0,0 @@ -syntax = "proto3"; - -package envoy.config.endpoint.v4alpha; - -import "envoy/config/core/v4alpha/address.proto"; -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/core/v4alpha/health_check.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; -option java_outer_classname = "EndpointComponentsProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Endpoints] - -// Upstream host identifier. -message Endpoint { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.endpoint.v3.Endpoint"; - - // The optional health check configuration. - message HealthCheckConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.Endpoint.HealthCheckConfig"; - - // Optional alternative health check port value. - // - // By default the health check address port of an upstream host is the same - // as the host's serving address port. This provides an alternative health - // check port. Setting this with a non-zero value allows an upstream host - // to have different health check address port. - uint32 port_value = 1 [(validate.rules).uint32 = {lte: 65535}]; - - // By default, the host header for L7 health checks is controlled by cluster level configuration - // (see: :ref:`host ` and - // :ref:`authority `). Setting this - // to a non-empty value allows overriding the cluster level configuration for a specific - // endpoint. - string hostname = 2; - } - - // The upstream host address. - // - // .. attention:: - // - // The form of host address depends on the given cluster type. For STATIC or EDS, - // it is expected to be a direct IP address (or something resolvable by the - // specified :ref:`resolver ` - // in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname, - // and will be resolved via DNS. - core.v4alpha.Address address = 1; - - // The optional health check configuration is used as configuration for the - // health checker to contact the health checked host. - // - // .. attention:: - // - // This takes into effect only for upstream clusters with - // :ref:`active health checking ` enabled. - HealthCheckConfig health_check_config = 2; - - // The hostname associated with this endpoint. This hostname is not used for routing or address - // resolution. If provided, it will be associated with the endpoint, and can be used for features - // that require a hostname, like - // :ref:`auto_host_rewrite `. - string hostname = 3; -} - -// An Endpoint that Envoy can route traffic to. -// [#next-free-field: 6] -message LbEndpoint { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.LbEndpoint"; - - // Upstream host identifier or a named reference. - oneof host_identifier { - Endpoint endpoint = 1; - - // [#not-implemented-hide:] - string endpoint_name = 5; - } - - // Optional health status when known and supplied by EDS server. - core.v4alpha.HealthStatus health_status = 2; - - // The endpoint metadata specifies values that may be used by the load - // balancer to select endpoints in a cluster for a given request. The filter - // name should be specified as *envoy.lb*. An example boolean key-value pair - // is *canary*, providing the optional canary status of the upstream host. - // This may be matched against in a route's - // :ref:`RouteAction ` metadata_match field - // to subset the endpoints considered in cluster load balancing. - core.v4alpha.Metadata metadata = 3; - - // The optional load balancing weight of the upstream host; at least 1. - // Envoy uses the load balancing weight in some of the built in load - // balancers. The load balancing weight for an endpoint is divided by the sum - // of the weights of all endpoints in the endpoint's locality to produce a - // percentage of traffic for the endpoint. This percentage is then further - // weighted by the endpoint's locality's load balancing weight from - // LocalityLbEndpoints. If unspecified, each host is presumed to have equal - // weight in a locality. The sum of the weights of all endpoints in the - // endpoint's locality must not exceed uint32_t maximal value (4294967295). - google.protobuf.UInt32Value load_balancing_weight = 4 [(validate.rules).uint32 = {gte: 1}]; -} - -// A group of endpoints belonging to a Locality. -// One can have multiple LocalityLbEndpoints for a locality, but this is -// generally only done if the different groups need to have different load -// balancing weights or different priorities. -// [#next-free-field: 7] -message LocalityLbEndpoints { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.LocalityLbEndpoints"; - - // Identifies location of where the upstream hosts run. - core.v4alpha.Locality locality = 1; - - // The group of endpoints belonging to the locality specified. - repeated LbEndpoint lb_endpoints = 2; - - // Optional: Per priority/region/zone/sub_zone weight; at least 1. The load - // balancing weight for a locality is divided by the sum of the weights of all - // localities at the same priority level to produce the effective percentage - // of traffic for the locality. The sum of the weights of all localities at - // the same priority level must not exceed uint32_t maximal value (4294967295). - // - // Locality weights are only considered when :ref:`locality weighted load - // balancing ` is - // configured. These weights are ignored otherwise. If no weights are - // specified when locality weighted load balancing is enabled, the locality is - // assigned no load. - google.protobuf.UInt32Value load_balancing_weight = 3 [(validate.rules).uint32 = {gte: 1}]; - - // Optional: the priority for this LocalityLbEndpoints. If unspecified this will - // default to the highest priority (0). - // - // Under usual circumstances, Envoy will only select endpoints for the highest - // priority (0). In the event all endpoints for a particular priority are - // unavailable/unhealthy, Envoy will fail over to selecting endpoints for the - // next highest priority group. - // - // Priorities should range from 0 (highest) to N (lowest) without skipping. - uint32 priority = 5 [(validate.rules).uint32 = {lte: 128}]; - - // Optional: Per locality proximity value which indicates how close this - // locality is from the source locality. This value only provides ordering - // information (lower the value, closer it is to the source locality). - // This will be consumed by load balancing schemes that need proximity order - // to determine where to route the requests. - // [#not-implemented-hide:] - google.protobuf.UInt32Value proximity = 6; -} diff --git a/api/envoy/config/endpoint/v4alpha/load_report.proto b/api/envoy/config/endpoint/v4alpha/load_report.proto deleted file mode 100644 index 80be59041d742..0000000000000 --- a/api/envoy/config/endpoint/v4alpha/load_report.proto +++ /dev/null @@ -1,168 +0,0 @@ -syntax = "proto3"; - -package envoy.config.endpoint.v4alpha; - -import "envoy/config/core/v4alpha/address.proto"; -import "envoy/config/core/v4alpha/base.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; -option java_outer_classname = "LoadReportProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Load Report] - -// These are stats Envoy reports to the management server at a frequency defined by -// :ref:`LoadStatsResponse.load_reporting_interval`. -// Stats per upstream region/zone and optionally per subzone. -// [#next-free-field: 9] -message UpstreamLocalityStats { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.UpstreamLocalityStats"; - - // Name of zone, region and optionally endpoint group these metrics were - // collected from. Zone and region names could be empty if unknown. - core.v4alpha.Locality locality = 1; - - // The total number of requests successfully completed by the endpoints in the - // locality. - 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, - // aggregated over all endpoints in the locality. - uint64 total_error_requests = 4; - - // The total number of requests that were issued by this Envoy since - // the last report. This information is aggregated over all the - // upstream endpoints in the locality. - uint64 total_issued_requests = 8; - - // Stats for multi-dimensional load balancing. - repeated EndpointLoadMetricStats load_metric_stats = 5; - - // Endpoint granularity stats information for this locality. This information - // is populated if the Server requests it by setting - // :ref:`LoadStatsResponse.report_endpoint_granularity`. - repeated UpstreamEndpointStats upstream_endpoint_stats = 7; - - // [#not-implemented-hide:] The priority of the endpoint group these metrics - // were collected from. - uint32 priority = 6; -} - -// [#next-free-field: 8] -message UpstreamEndpointStats { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.UpstreamEndpointStats"; - - // Upstream host address. - core.v4alpha.Address address = 1; - - // Opaque and implementation dependent metadata of the - // endpoint. Envoy will pass this directly to the management server. - google.protobuf.Struct metadata = 6; - - // 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 successfully. 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 for this endpoint. - 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; - - // The total number of requests that were issued to this endpoint - // since the last report. A single TCP connection, HTTP or gRPC - // request or stream is counted as one request. - uint64 total_issued_requests = 7; - - // Stats for multi-dimensional load balancing. - repeated EndpointLoadMetricStats load_metric_stats = 5; -} - -message EndpointLoadMetricStats { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.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` -// Next ID: 7 -// [#next-free-field: 7] -message ClusterStats { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.ClusterStats"; - - message DroppedRequests { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.ClusterStats.DroppedRequests"; - - // Identifier for the policy specifying the drop. - string category = 1 [(validate.rules).string = {min_len: 1}]; - - // Total number of deliberately dropped requests for the category. - uint64 dropped_count = 2; - } - - // The name of the cluster. - string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; - - // The eds_cluster_config service_name of the cluster. - // It's possible that two clusters send the same service_name to EDS, - // in that case, the management server is supposed to do aggregation on the load reports. - string cluster_service_name = 6; - - // 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 total number of dropped requests. This covers requests - // deliberately dropped by the drop_overload policy and circuit breaking. - uint64 total_dropped_requests = 3; - - // Information about deliberately dropped requests for each category specified - // in the DropOverload policy. - repeated DroppedRequests dropped_requests = 5; - - // Period over which the actual load report occurred. This will be guaranteed to include every - // request reported. Due to system load and delays between the *LoadStatsRequest* sent from Envoy - // and the *LoadStatsResponse* message sent from the management server, this may be longer than - // the requested load reporting interval in the *LoadStatsResponse*. - google.protobuf.Duration load_report_interval = 4; -} diff --git a/api/envoy/data/accesslog/v4alpha/BUILD b/api/envoy/data/accesslog/v4alpha/BUILD deleted file mode 100644 index c02cec9d67f6c..0000000000000 --- a/api/envoy/data/accesslog/v4alpha/BUILD +++ /dev/null @@ -1,13 +0,0 @@ -# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. - -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") - -licenses(["notice"]) # Apache 2 - -api_proto_package( - deps = [ - "//envoy/config/core/v4alpha:pkg", - "//envoy/data/accesslog/v3:pkg", - "@com_github_cncf_udpa//udpa/annotations:pkg", - ], -) diff --git a/api/envoy/data/accesslog/v4alpha/accesslog.proto b/api/envoy/data/accesslog/v4alpha/accesslog.proto deleted file mode 100644 index 0e01ddc2dd784..0000000000000 --- a/api/envoy/data/accesslog/v4alpha/accesslog.proto +++ /dev/null @@ -1,431 +0,0 @@ -syntax = "proto3"; - -package envoy.data.accesslog.v4alpha; - -import "envoy/config/core/v4alpha/address.proto"; -import "envoy/config/core/v4alpha/base.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.data.accesslog.v4alpha"; -option java_outer_classname = "AccesslogProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: gRPC access logs] -// Envoy access logs describe incoming interaction with Envoy over a fixed -// period of time, and typically cover a single request/response exchange, -// (e.g. HTTP), stream (e.g. over HTTP/gRPC), or proxied connection (e.g. TCP). -// Access logs contain fields defined in protocol-specific protobuf messages. -// -// Except where explicitly declared otherwise, all fields describe -// *downstream* interaction between Envoy and a connected client. -// Fields describing *upstream* interaction will explicitly include ``upstream`` -// in their name. - -message TCPAccessLogEntry { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.TCPAccessLogEntry"; - - // Common properties shared by all Envoy access logs. - AccessLogCommon common_properties = 1; - - // Properties of the TCP connection. - ConnectionProperties connection_properties = 2; -} - -message HTTPAccessLogEntry { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.HTTPAccessLogEntry"; - - // HTTP version - enum HTTPVersion { - PROTOCOL_UNSPECIFIED = 0; - HTTP10 = 1; - HTTP11 = 2; - HTTP2 = 3; - HTTP3 = 4; - } - - // Common properties shared by all Envoy access logs. - AccessLogCommon common_properties = 1; - - HTTPVersion protocol_version = 2; - - // Description of the incoming HTTP request. - HTTPRequestProperties request = 3; - - // Description of the outgoing HTTP response. - HTTPResponseProperties response = 4; -} - -// Defines fields for a connection -message ConnectionProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.ConnectionProperties"; - - // Number of bytes received from downstream. - uint64 received_bytes = 1; - - // Number of bytes sent to downstream. - uint64 sent_bytes = 2; -} - -// Defines fields that are shared by all Envoy access logs. -// [#next-free-field: 22] -message AccessLogCommon { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.AccessLogCommon"; - - // [#not-implemented-hide:] - // This field indicates the rate at which this log entry was sampled. - // Valid range is (0.0, 1.0]. - double sample_rate = 1 [(validate.rules).double = {lte: 1.0 gt: 0.0}]; - - // This field is the remote/origin address on which the request from the user was received. - // Note: This may not be the physical peer. E.g, if the remote address is inferred from for - // example the x-forwarder-for header, proxy protocol, etc. - config.core.v4alpha.Address downstream_remote_address = 2; - - // This field is the local/destination address on which the request from the user was received. - config.core.v4alpha.Address downstream_local_address = 3; - - // If the connection is secure,S this field will contain TLS properties. - TLSProperties tls_properties = 4; - - // The time that Envoy started servicing this request. This is effectively the time that the first - // downstream byte is received. - google.protobuf.Timestamp start_time = 5; - - // Interval between the first downstream byte received and the last - // downstream byte received (i.e. time it takes to receive a request). - google.protobuf.Duration time_to_last_rx_byte = 6; - - // Interval between the first downstream byte received and the first upstream byte sent. There may - // by considerable delta between *time_to_last_rx_byte* and this value due to filters. - // Additionally, the same caveats apply as documented in *time_to_last_downstream_tx_byte* about - // not accounting for kernel socket buffer time, etc. - google.protobuf.Duration time_to_first_upstream_tx_byte = 7; - - // Interval between the first downstream byte received and the last upstream byte sent. There may - // by considerable delta between *time_to_last_rx_byte* and this value due to filters. - // Additionally, the same caveats apply as documented in *time_to_last_downstream_tx_byte* about - // not accounting for kernel socket buffer time, etc. - google.protobuf.Duration time_to_last_upstream_tx_byte = 8; - - // Interval between the first downstream byte received and the first upstream - // byte received (i.e. time it takes to start receiving a response). - google.protobuf.Duration time_to_first_upstream_rx_byte = 9; - - // Interval between the first downstream byte received and the last upstream - // byte received (i.e. time it takes to receive a complete response). - google.protobuf.Duration time_to_last_upstream_rx_byte = 10; - - // Interval between the first downstream byte received and the first downstream byte sent. - // There may be a considerable delta between the *time_to_first_upstream_rx_byte* and this field - // due to filters. Additionally, the same caveats apply as documented in - // *time_to_last_downstream_tx_byte* about not accounting for kernel socket buffer time, etc. - google.protobuf.Duration time_to_first_downstream_tx_byte = 11; - - // Interval between the first downstream byte received and the last downstream byte sent. - // Depending on protocol, buffering, windowing, filters, etc. there may be a considerable delta - // between *time_to_last_upstream_rx_byte* and this field. Note also that this is an approximate - // time. In the current implementation it does not include kernel socket buffer time. In the - // current implementation it also does not include send window buffering inside the HTTP/2 codec. - // In the future it is likely that work will be done to make this duration more accurate. - google.protobuf.Duration time_to_last_downstream_tx_byte = 12; - - // The upstream remote/destination address that handles this exchange. This does not include - // retries. - config.core.v4alpha.Address upstream_remote_address = 13; - - // The upstream local/origin address that handles this exchange. This does not include retries. - config.core.v4alpha.Address upstream_local_address = 14; - - // The upstream cluster that *upstream_remote_address* belongs to. - string upstream_cluster = 15; - - // Flags indicating occurrences during request/response processing. - ResponseFlags response_flags = 16; - - // All metadata encountered during request processing, including endpoint - // selection. - // - // This can be used to associate IDs attached to the various configurations - // used to process this request with the access log entry. For example, a - // route created from a higher level forwarding rule with some ID can place - // that ID in this field and cross reference later. It can also be used to - // determine if a canary endpoint was used or not. - config.core.v4alpha.Metadata metadata = 17; - - // If upstream connection failed due to transport socket (e.g. TLS handshake), provides the - // failure reason from the transport socket. The format of this field depends on the configured - // upstream transport socket. Common TLS failures are in - // :ref:`TLS trouble shooting `. - string upstream_transport_failure_reason = 18; - - // The name of the route - string route_name = 19; - - // This field is the downstream direct remote address on which the request from the user was - // received. Note: This is always the physical peer, even if the remote address is inferred from - // for example the x-forwarder-for header, proxy protocol, etc. - config.core.v4alpha.Address downstream_direct_remote_address = 20; - - // Map of filter state in stream info that have been configured to be logged. If the filter - // state serialized to any message other than `google.protobuf.Any` it will be packed into - // `google.protobuf.Any`. - map filter_state_objects = 21; -} - -// Flags indicating occurrences during request/response processing. -// [#next-free-field: 26] -message ResponseFlags { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.ResponseFlags"; - - message Unauthorized { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.ResponseFlags.Unauthorized"; - - // Reasons why the request was unauthorized - enum Reason { - REASON_UNSPECIFIED = 0; - - // The request was denied by the external authorization service. - EXTERNAL_SERVICE = 1; - } - - Reason reason = 1; - } - - // Indicates local server healthcheck failed. - bool failed_local_healthcheck = 1; - - // Indicates there was no healthy upstream. - bool no_healthy_upstream = 2; - - // Indicates an there was an upstream request timeout. - bool upstream_request_timeout = 3; - - // Indicates local codec level reset was sent on the stream. - bool local_reset = 4; - - // Indicates remote codec level reset was received on the stream. - bool upstream_remote_reset = 5; - - // Indicates there was a local reset by a connection pool due to an initial connection failure. - bool upstream_connection_failure = 6; - - // Indicates the stream was reset due to an upstream connection termination. - bool upstream_connection_termination = 7; - - // Indicates the stream was reset because of a resource overflow. - bool upstream_overflow = 8; - - // Indicates no route was found for the request. - bool no_route_found = 9; - - // Indicates that the request was delayed before proxying. - bool delay_injected = 10; - - // Indicates that the request was aborted with an injected error code. - bool fault_injected = 11; - - // Indicates that the request was rate-limited locally. - bool rate_limited = 12; - - // Indicates if the request was deemed unauthorized and the reason for it. - Unauthorized unauthorized_details = 13; - - // Indicates that the request was rejected because there was an error in rate limit service. - bool rate_limit_service_error = 14; - - // Indicates the stream was reset due to a downstream connection termination. - bool downstream_connection_termination = 15; - - // Indicates that the upstream retry limit was exceeded, resulting in a downstream error. - bool upstream_retry_limit_exceeded = 16; - - // Indicates that the stream idle timeout was hit, resulting in a downstream 408. - bool stream_idle_timeout = 17; - - // Indicates that the request was rejected because an envoy request header failed strict - // validation. - bool invalid_envoy_request_headers = 18; - - // Indicates there was an HTTP protocol error on the downstream request. - bool downstream_protocol_error = 19; - - // Indicates there was a max stream duration reached on the upstream request. - bool upstream_max_stream_duration_reached = 20; - - // Indicates the response was served from a cache filter. - bool response_from_cache_filter = 21; - - // Indicates that a filter configuration is not available. - bool no_filter_config_found = 22; - - // Indicates that request or connection exceeded the downstream connection duration. - bool duration_timeout = 23; - - // Indicates there was an HTTP protocol error in the upstream response. - bool upstream_protocol_error = 24; - - // Indicates no cluster was found for the request. - bool no_cluster_found = 25; -} - -// Properties of a negotiated TLS connection. -// [#next-free-field: 7] -message TLSProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.TLSProperties"; - - enum TLSVersion { - VERSION_UNSPECIFIED = 0; - TLSv1 = 1; - TLSv1_1 = 2; - TLSv1_2 = 3; - TLSv1_3 = 4; - } - - message CertificateProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.TLSProperties.CertificateProperties"; - - message SubjectAltName { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.TLSProperties.CertificateProperties.SubjectAltName"; - - oneof san { - string uri = 1; - - // [#not-implemented-hide:] - string dns = 2; - } - } - - // SANs present in the certificate. - repeated SubjectAltName subject_alt_name = 1; - - // The subject field of the certificate. - string subject = 2; - } - - // Version of TLS that was negotiated. - TLSVersion tls_version = 1; - - // TLS cipher suite negotiated during handshake. The value is a - // four-digit hex code defined by the IANA TLS Cipher Suite Registry - // (e.g. ``009C`` for ``TLS_RSA_WITH_AES_128_GCM_SHA256``). - // - // Here it is expressed as an integer. - google.protobuf.UInt32Value tls_cipher_suite = 2; - - // SNI hostname from handshake. - string tls_sni_hostname = 3; - - // Properties of the local certificate used to negotiate TLS. - CertificateProperties local_certificate_properties = 4; - - // Properties of the peer certificate used to negotiate TLS. - CertificateProperties peer_certificate_properties = 5; - - // The TLS session ID. - string tls_session_id = 6; -} - -// [#next-free-field: 14] -message HTTPRequestProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.HTTPRequestProperties"; - - // The request method (RFC 7231/2616). - config.core.v4alpha.RequestMethod request_method = 1 - [(validate.rules).enum = {defined_only: true}]; - - // The scheme portion of the incoming request URI. - string scheme = 2; - - // HTTP/2 ``:authority`` or HTTP/1.1 ``Host`` header value. - string authority = 3; - - // The port of the incoming request URI - // (unused currently, as port is composed onto authority). - google.protobuf.UInt32Value port = 4; - - // The path portion from the incoming request URI. - string path = 5; - - // Value of the ``User-Agent`` request header. - string user_agent = 6; - - // Value of the ``Referer`` request header. - string referer = 7; - - // Value of the ``X-Forwarded-For`` request header. - string forwarded_for = 8; - - // Value of the ``X-Request-Id`` request header - // - // This header is used by Envoy to uniquely identify a request. - // It will be generated for all external requests and internal requests that - // do not already have a request ID. - string request_id = 9; - - // Value of the ``X-Envoy-Original-Path`` request header. - string original_path = 10; - - // Size of the HTTP request headers in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. - uint64 request_headers_bytes = 11; - - // Size of the HTTP request body in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. - uint64 request_body_bytes = 12; - - // Map of additional headers that have been configured to be logged. - map request_headers = 13; -} - -// [#next-free-field: 7] -message HTTPResponseProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.HTTPResponseProperties"; - - // The HTTP response code returned by Envoy. - google.protobuf.UInt32Value response_code = 1; - - // Size of the HTTP response headers in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. - uint64 response_headers_bytes = 2; - - // Size of the HTTP response body in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. - uint64 response_body_bytes = 3; - - // Map of additional headers configured to be logged. - map response_headers = 4; - - // Map of trailers configured to be logged. - map response_trailers = 5; - - // The HTTP response code details. - string response_code_details = 6; -} diff --git a/api/envoy/extensions/access_loggers/grpc/v4alpha/als.proto b/api/envoy/extensions/access_loggers/grpc/v4alpha/als.proto index 81b254679fd66..9e6fb1e48386e 100644 --- a/api/envoy/extensions/access_loggers/grpc/v4alpha/als.proto +++ b/api/envoy/extensions/access_loggers/grpc/v4alpha/als.proto @@ -31,15 +31,15 @@ message HttpGrpcAccessLogConfig { CommonGrpcAccessLogConfig common_config = 1 [(validate.rules).message = {required: true}]; // Additional request headers to log in :ref:`HTTPRequestProperties.request_headers - // `. + // `. repeated string additional_request_headers_to_log = 2; // Additional response headers to log in :ref:`HTTPResponseProperties.response_headers - // `. + // `. repeated string additional_response_headers_to_log = 3; // Additional response trailers to log in :ref:`HTTPResponseProperties.response_trailers - // `. + // `. repeated string additional_response_trailers_to_log = 4; } @@ -83,7 +83,7 @@ message CommonGrpcAccessLogConfig { google.protobuf.UInt32Value buffer_size_bytes = 4; // Additional filter state objects to log in :ref:`filter_state_objects - // `. + // `. // Logger will call `FilterState::Object::serializeAsProto` to serialize the filter state object. repeated string filter_state_objects_to_log = 5; } diff --git a/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD b/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD deleted file mode 100644 index df5de314366ab..0000000000000 --- a/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD +++ /dev/null @@ -1,13 +0,0 @@ -# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. - -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") - -licenses(["notice"]) # Apache 2 - -api_proto_package( - deps = [ - "//envoy/config/core/v4alpha:pkg", - "//envoy/extensions/retry/host/omit_host_metadata/v3:pkg", - "@com_github_cncf_udpa//udpa/annotations:pkg", - ], -) diff --git a/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto b/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto deleted file mode 100644 index 043d5ce3cfa06..0000000000000 --- a/api/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.retry.host.omit_host_metadata.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.retry.host.omit_host_metadata.v4alpha"; -option java_outer_classname = "OmitHostMetadataConfigProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Omit host metadata retry predicate] - -// A retry host predicate that can be used to reject a host based on -// predefined metadata match criteria. -// [#extension: envoy.retry_host_predicates.omit_host_metadata] -message OmitHostMetadataConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.retry.host.omit_host_metadata.v3.OmitHostMetadataConfig"; - - // Retry host predicate metadata match criteria. The hosts in - // the upstream cluster with matching metadata will be omitted while - // attempting a retry of a failed request. The metadata should be specified - // under the *envoy.lb* key. - config.core.v4alpha.Metadata metadata_match = 1; -} diff --git a/api/envoy/service/accesslog/v4alpha/BUILD b/api/envoy/service/accesslog/v4alpha/BUILD index ef86c64ac7e5f..94c70bc66967b 100644 --- a/api/envoy/service/accesslog/v4alpha/BUILD +++ b/api/envoy/service/accesslog/v4alpha/BUILD @@ -8,7 +8,7 @@ api_proto_package( has_services = True, deps = [ "//envoy/config/core/v4alpha:pkg", - "//envoy/data/accesslog/v4alpha:pkg", + "//envoy/data/accesslog/v3:pkg", "//envoy/service/accesslog/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/api/envoy/service/accesslog/v4alpha/als.proto b/api/envoy/service/accesslog/v4alpha/als.proto index f3fbe731b6366..ab0ba0e15213e 100644 --- a/api/envoy/service/accesslog/v4alpha/als.proto +++ b/api/envoy/service/accesslog/v4alpha/als.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package envoy.service.accesslog.v4alpha; import "envoy/config/core/v4alpha/base.proto"; -import "envoy/data/accesslog/v4alpha/accesslog.proto"; +import "envoy/data/accesslog/v3/accesslog.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; @@ -58,7 +58,7 @@ message StreamAccessLogsMessage { option (udpa.annotations.versioning).previous_message_type = "envoy.service.accesslog.v3.StreamAccessLogsMessage.HTTPAccessLogEntries"; - repeated data.accesslog.v4alpha.HTTPAccessLogEntry log_entry = 1 + repeated data.accesslog.v3.HTTPAccessLogEntry log_entry = 1 [(validate.rules).repeated = {min_items: 1}]; } @@ -67,7 +67,7 @@ message StreamAccessLogsMessage { option (udpa.annotations.versioning).previous_message_type = "envoy.service.accesslog.v3.StreamAccessLogsMessage.TCPAccessLogEntries"; - repeated data.accesslog.v4alpha.TCPAccessLogEntry log_entry = 1 + repeated data.accesslog.v3.TCPAccessLogEntry log_entry = 1 [(validate.rules).repeated = {min_items: 1}]; } diff --git a/api/envoy/service/health/v4alpha/BUILD b/api/envoy/service/health/v4alpha/BUILD index ed1ef41e94009..60bd19511855e 100644 --- a/api/envoy/service/health/v4alpha/BUILD +++ b/api/envoy/service/health/v4alpha/BUILD @@ -9,7 +9,7 @@ api_proto_package( deps = [ "//envoy/config/cluster/v4alpha:pkg", "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v4alpha:pkg", + "//envoy/config/endpoint/v3:pkg", "//envoy/service/health/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/api/envoy/service/health/v4alpha/hds.proto b/api/envoy/service/health/v4alpha/hds.proto index 52a4c4129a7eb..9ce239f5e9cf9 100644 --- a/api/envoy/service/health/v4alpha/hds.proto +++ b/api/envoy/service/health/v4alpha/hds.proto @@ -5,7 +5,7 @@ package envoy.service.health.v4alpha; import "envoy/config/cluster/v4alpha/cluster.proto"; import "envoy/config/core/v4alpha/base.proto"; import "envoy/config/core/v4alpha/health_check.proto"; -import "envoy/config/endpoint/v4alpha/endpoint_components.proto"; +import "envoy/config/endpoint/v3/endpoint_components.proto"; import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; @@ -103,7 +103,7 @@ message EndpointHealth { option (udpa.annotations.versioning).previous_message_type = "envoy.service.health.v3.EndpointHealth"; - config.endpoint.v4alpha.Endpoint endpoint = 1; + config.endpoint.v3.Endpoint endpoint = 1; config.core.v4alpha.HealthStatus health_status = 2; } @@ -158,7 +158,7 @@ message LocalityEndpoints { config.core.v4alpha.Locality locality = 1; - repeated config.endpoint.v4alpha.Endpoint endpoints = 2; + repeated config.endpoint.v3.Endpoint endpoints = 2; } // The cluster name and locality is provided to Envoy for the endpoints that it diff --git a/api/envoy/service/load_stats/v4alpha/BUILD b/api/envoy/service/load_stats/v4alpha/BUILD index 870673013a0e6..91d914645041b 100644 --- a/api/envoy/service/load_stats/v4alpha/BUILD +++ b/api/envoy/service/load_stats/v4alpha/BUILD @@ -8,7 +8,7 @@ api_proto_package( has_services = True, deps = [ "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v4alpha:pkg", + "//envoy/config/endpoint/v3:pkg", "//envoy/service/load_stats/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/api/envoy/service/load_stats/v4alpha/lrs.proto b/api/envoy/service/load_stats/v4alpha/lrs.proto index 86bbe13186332..f99b6555f4a17 100644 --- a/api/envoy/service/load_stats/v4alpha/lrs.proto +++ b/api/envoy/service/load_stats/v4alpha/lrs.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package envoy.service.load_stats.v4alpha; import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/endpoint/v4alpha/load_report.proto"; +import "envoy/config/endpoint/v3/load_report.proto"; import "google/protobuf/duration.proto"; @@ -68,7 +68,7 @@ message LoadStatsRequest { config.core.v4alpha.Node node = 1; // A list of load stats to report. - repeated config.endpoint.v4alpha.ClusterStats cluster_stats = 2; + repeated config.endpoint.v3.ClusterStats cluster_stats = 2; } // The management server sends envoy a LoadStatsResponse with all clusters it diff --git a/generated_api_shadow/envoy/config/cluster/v4alpha/BUILD b/generated_api_shadow/envoy/config/cluster/v4alpha/BUILD index 49a44abbd4f75..2bac8db17256c 100644 --- a/generated_api_shadow/envoy/config/cluster/v4alpha/BUILD +++ b/generated_api_shadow/envoy/config/cluster/v4alpha/BUILD @@ -9,7 +9,7 @@ api_proto_package( "//envoy/annotations:pkg", "//envoy/config/cluster/v3:pkg", "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v4alpha:pkg", + "//envoy/config/endpoint/v3:pkg", "//envoy/type/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", "@com_github_cncf_udpa//xds/core/v3:pkg", diff --git a/generated_api_shadow/envoy/config/cluster/v4alpha/cluster.proto b/generated_api_shadow/envoy/config/cluster/v4alpha/cluster.proto index 06d967962336f..6cbc477cee886 100644 --- a/generated_api_shadow/envoy/config/cluster/v4alpha/cluster.proto +++ b/generated_api_shadow/envoy/config/cluster/v4alpha/cluster.proto @@ -11,7 +11,7 @@ import "envoy/config/core/v4alpha/config_source.proto"; import "envoy/config/core/v4alpha/extension.proto"; import "envoy/config/core/v4alpha/health_check.proto"; import "envoy/config/core/v4alpha/protocol.proto"; -import "envoy/config/endpoint/v4alpha/endpoint.proto"; +import "envoy/config/endpoint/v3/endpoint.proto"; import "envoy/type/v3/percent.proto"; import "google/protobuf/any.proto"; @@ -638,7 +638,7 @@ message Cluster { // Configuration to use different transport sockets for different endpoints. // The entry of *envoy.transport_socket_match* in the - // :ref:`LbEndpoint.Metadata ` + // :ref:`LbEndpoint.Metadata ` // is used to match against the transport sockets as they appear in the list. The first // :ref:`match ` is used. // For example, with the following match @@ -739,9 +739,9 @@ message Cluster { // .. attention:: // // Setting this allows non-EDS cluster types to contain embedded EDS equivalent - // :ref:`endpoint assignments`. + // :ref:`endpoint assignments`. // - endpoint.v4alpha.ClusterLoadAssignment load_assignment = 33; + endpoint.v3.ClusterLoadAssignment load_assignment = 33; // Optional :ref:`active health checking ` // configuration for the cluster. If no diff --git a/generated_api_shadow/envoy/config/core/v3/base.proto b/generated_api_shadow/envoy/config/core/v3/base.proto index ed49b86d5edb4..fc1ede89d25f4 100644 --- a/generated_api_shadow/envoy/config/core/v3/base.proto +++ b/generated_api_shadow/envoy/config/core/v3/base.proto @@ -235,17 +235,13 @@ message Metadata { // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. - // This is deprecated in favor of - // :ref:`typed_filter_metadata ` field. - map filter_metadata = 1 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; + map filter_metadata = 1; // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. // The value is encoded as google.protobuf.Any. - // If both :ref:`filter_metadata ` - // and typed_filter_metadata fields are present in the metadata with same keys, - // only typed_filter_metadata field will be parsed. + // If both filter_metadata and typed_filter_metadata fields are present in the + // metadata with same keys, only typed_filter_metadata field will be parsed. map typed_filter_metadata = 2; } diff --git a/generated_api_shadow/envoy/config/core/v4alpha/base.proto b/generated_api_shadow/envoy/config/core/v4alpha/base.proto index 192981f4c66a0..d1712e6fbbb0e 100644 --- a/generated_api_shadow/envoy/config/core/v4alpha/base.proto +++ b/generated_api_shadow/envoy/config/core/v4alpha/base.proto @@ -73,7 +73,7 @@ message Locality { // Defines the local service zone where Envoy is running. Though optional, it // should be set if discovery service routing is used and the discovery - // service exposes :ref:`zone data `, + // service exposes :ref:`zone data `, // either in this message or via :option:`--service-zone`. The meaning of zone // is context dependent, e.g. `Availability Zone (AZ) // `_ @@ -235,17 +235,13 @@ message Metadata { // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. - // This is deprecated in favor of - // :ref:`typed_filter_metadata ` field. - map hidden_envoy_deprecated_filter_metadata = 1 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; + map filter_metadata = 1; // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. // The value is encoded as google.protobuf.Any. - // If both :ref:`filter_metadata ` - // and typed_filter_metadata fields are present in the metadata with same keys, - // only typed_filter_metadata field will be parsed. + // If both filter_metadata and typed_filter_metadata fields are present in the + // metadata with same keys, only typed_filter_metadata field will be parsed. map typed_filter_metadata = 2; } diff --git a/generated_api_shadow/envoy/config/core/v4alpha/health_check.proto b/generated_api_shadow/envoy/config/core/v4alpha/health_check.proto index 5ef9369ccd15b..bf86f26e665e3 100644 --- a/generated_api_shadow/envoy/config/core/v4alpha/health_check.proto +++ b/generated_api_shadow/envoy/config/core/v4alpha/health_check.proto @@ -85,7 +85,7 @@ message HealthCheck { // The value of the host header in the HTTP health check request. If // left empty (default value), the name of the cluster this health check is associated // with will be used. The host header can be customized for a specific endpoint by setting the - // :ref:`hostname ` field. + // :ref:`hostname ` field. string host = 1 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; // Specifies the HTTP path that will be requested during health checking. For example @@ -170,7 +170,7 @@ message HealthCheck { // The value of the :authority header in the gRPC health check request. If // left empty (default value), the name of the cluster this health check is associated // with will be used. The authority header can be customized for a specific endpoint by setting - // the :ref:`hostname ` field. + // the :ref:`hostname ` field. string authority = 2 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}]; } @@ -360,7 +360,7 @@ message HealthCheck { // config: { ... } # tls socket configuration // // If this field is set, then for health checks it will supersede an entry of *envoy.transport_socket* in the - // :ref:`LbEndpoint.Metadata `. + // :ref:`LbEndpoint.Metadata `. // This allows using different transport socket capabilities for health checking versus proxying to the // endpoint. // diff --git a/generated_api_shadow/envoy/config/endpoint/v4alpha/BUILD b/generated_api_shadow/envoy/config/endpoint/v4alpha/BUILD deleted file mode 100644 index 79d52ad4cfbc6..0000000000000 --- a/generated_api_shadow/envoy/config/endpoint/v4alpha/BUILD +++ /dev/null @@ -1,14 +0,0 @@ -# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. - -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") - -licenses(["notice"]) # Apache 2 - -api_proto_package( - deps = [ - "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v3:pkg", - "//envoy/type/v3:pkg", - "@com_github_cncf_udpa//udpa/annotations:pkg", - ], -) diff --git a/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint.proto b/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint.proto deleted file mode 100644 index 0d4d4684d2c10..0000000000000 --- a/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint.proto +++ /dev/null @@ -1,119 +0,0 @@ -syntax = "proto3"; - -package envoy.config.endpoint.v4alpha; - -import "envoy/config/endpoint/v4alpha/endpoint_components.proto"; -import "envoy/type/v3/percent.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; -option java_outer_classname = "EndpointProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Endpoint configuration] -// Endpoint discovery :ref:`architecture overview ` - -// Each route from RDS will map to a single cluster or traffic split across -// clusters using weights expressed in the RDS WeightedCluster. -// -// With EDS, each cluster is treated independently from a LB perspective, with -// LB taking place between the Localities within a cluster and at a finer -// granularity between the hosts within a locality. The percentage of traffic -// for each endpoint is determined by both its load_balancing_weight, and the -// load_balancing_weight of its locality. First, a locality will be selected, -// then an endpoint within that locality will be chose based on its weight. -// [#next-free-field: 6] -message ClusterLoadAssignment { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.ClusterLoadAssignment"; - - // Load balancing policy settings. - // [#next-free-field: 6] - message Policy { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.ClusterLoadAssignment.Policy"; - - // [#not-implemented-hide:] - message DropOverload { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload"; - - // Identifier for the policy specifying the drop. - string category = 1 [(validate.rules).string = {min_len: 1}]; - - // Percentage of traffic that should be dropped for the category. - type.v3.FractionalPercent drop_percentage = 2; - } - - reserved 1, 5; - - reserved "disable_overprovisioning"; - - // Action to trim the overall incoming traffic to protect the upstream - // hosts. This action allows protection in case the hosts are unable to - // recover from an outage, or unable to autoscale or unable to handle - // incoming traffic volume for any reason. - // - // At the client each category is applied one after the other to generate - // the 'actual' drop percentage on all outgoing traffic. For example: - // - // .. code-block:: json - // - // { "drop_overloads": [ - // { "category": "throttle", "drop_percentage": 60 } - // { "category": "lb", "drop_percentage": 50 } - // ]} - // - // The actual drop percentages applied to the traffic at the clients will be - // "throttle"_drop = 60% - // "lb"_drop = 20% // 50% of the remaining 'actual' load, which is 40%. - // actual_outgoing_load = 20% // remaining after applying all categories. - // [#not-implemented-hide:] - repeated DropOverload drop_overloads = 2; - - // Priority levels and localities are considered overprovisioned with this - // factor (in percentage). This means that we don't consider a priority - // level or locality unhealthy until the fraction of healthy hosts - // multiplied by the overprovisioning factor drops below 100. - // With the default value 140(1.4), Envoy doesn't consider a priority level - // or a locality unhealthy until their percentage of healthy hosts drops - // below 72%. For example: - // - // .. code-block:: json - // - // { "overprovisioning_factor": 100 } - // - // Read more at :ref:`priority levels ` and - // :ref:`localities `. - google.protobuf.UInt32Value overprovisioning_factor = 3 [(validate.rules).uint32 = {gt: 0}]; - - // The max time until which the endpoints from this assignment can be used. - // If no new assignments are received before this time expires the endpoints - // are considered stale and should be marked unhealthy. - // Defaults to 0 which means endpoints never go stale. - google.protobuf.Duration endpoint_stale_after = 4 [(validate.rules).duration = {gt {}}]; - } - - // Name of the cluster. This will be the :ref:`service_name - // ` value if specified - // in the cluster :ref:`EdsClusterConfig - // `. - string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; - - // List of endpoints to load balance to. - repeated LocalityLbEndpoints endpoints = 2; - - // Map of named endpoints that can be referenced in LocalityLbEndpoints. - // [#not-implemented-hide:] - map named_endpoints = 5; - - // Load balancing policy settings. - Policy policy = 4; -} diff --git a/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint_components.proto b/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint_components.proto deleted file mode 100644 index 246d569d28464..0000000000000 --- a/generated_api_shadow/envoy/config/endpoint/v4alpha/endpoint_components.proto +++ /dev/null @@ -1,158 +0,0 @@ -syntax = "proto3"; - -package envoy.config.endpoint.v4alpha; - -import "envoy/config/core/v4alpha/address.proto"; -import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/core/v4alpha/health_check.proto"; - -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; -option java_outer_classname = "EndpointComponentsProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Endpoints] - -// Upstream host identifier. -message Endpoint { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.endpoint.v3.Endpoint"; - - // The optional health check configuration. - message HealthCheckConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.Endpoint.HealthCheckConfig"; - - // Optional alternative health check port value. - // - // By default the health check address port of an upstream host is the same - // as the host's serving address port. This provides an alternative health - // check port. Setting this with a non-zero value allows an upstream host - // to have different health check address port. - uint32 port_value = 1 [(validate.rules).uint32 = {lte: 65535}]; - - // By default, the host header for L7 health checks is controlled by cluster level configuration - // (see: :ref:`host ` and - // :ref:`authority `). Setting this - // to a non-empty value allows overriding the cluster level configuration for a specific - // endpoint. - string hostname = 2; - } - - // The upstream host address. - // - // .. attention:: - // - // The form of host address depends on the given cluster type. For STATIC or EDS, - // it is expected to be a direct IP address (or something resolvable by the - // specified :ref:`resolver ` - // in the Address). For LOGICAL or STRICT DNS, it is expected to be hostname, - // and will be resolved via DNS. - core.v4alpha.Address address = 1; - - // The optional health check configuration is used as configuration for the - // health checker to contact the health checked host. - // - // .. attention:: - // - // This takes into effect only for upstream clusters with - // :ref:`active health checking ` enabled. - HealthCheckConfig health_check_config = 2; - - // The hostname associated with this endpoint. This hostname is not used for routing or address - // resolution. If provided, it will be associated with the endpoint, and can be used for features - // that require a hostname, like - // :ref:`auto_host_rewrite `. - string hostname = 3; -} - -// An Endpoint that Envoy can route traffic to. -// [#next-free-field: 6] -message LbEndpoint { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.LbEndpoint"; - - // Upstream host identifier or a named reference. - oneof host_identifier { - Endpoint endpoint = 1; - - // [#not-implemented-hide:] - string endpoint_name = 5; - } - - // Optional health status when known and supplied by EDS server. - core.v4alpha.HealthStatus health_status = 2; - - // The endpoint metadata specifies values that may be used by the load - // balancer to select endpoints in a cluster for a given request. The filter - // name should be specified as *envoy.lb*. An example boolean key-value pair - // is *canary*, providing the optional canary status of the upstream host. - // This may be matched against in a route's - // :ref:`RouteAction ` metadata_match field - // to subset the endpoints considered in cluster load balancing. - core.v4alpha.Metadata metadata = 3; - - // The optional load balancing weight of the upstream host; at least 1. - // Envoy uses the load balancing weight in some of the built in load - // balancers. The load balancing weight for an endpoint is divided by the sum - // of the weights of all endpoints in the endpoint's locality to produce a - // percentage of traffic for the endpoint. This percentage is then further - // weighted by the endpoint's locality's load balancing weight from - // LocalityLbEndpoints. If unspecified, each host is presumed to have equal - // weight in a locality. The sum of the weights of all endpoints in the - // endpoint's locality must not exceed uint32_t maximal value (4294967295). - google.protobuf.UInt32Value load_balancing_weight = 4 [(validate.rules).uint32 = {gte: 1}]; -} - -// A group of endpoints belonging to a Locality. -// One can have multiple LocalityLbEndpoints for a locality, but this is -// generally only done if the different groups need to have different load -// balancing weights or different priorities. -// [#next-free-field: 7] -message LocalityLbEndpoints { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.LocalityLbEndpoints"; - - // Identifies location of where the upstream hosts run. - core.v4alpha.Locality locality = 1; - - // The group of endpoints belonging to the locality specified. - repeated LbEndpoint lb_endpoints = 2; - - // Optional: Per priority/region/zone/sub_zone weight; at least 1. The load - // balancing weight for a locality is divided by the sum of the weights of all - // localities at the same priority level to produce the effective percentage - // of traffic for the locality. The sum of the weights of all localities at - // the same priority level must not exceed uint32_t maximal value (4294967295). - // - // Locality weights are only considered when :ref:`locality weighted load - // balancing ` is - // configured. These weights are ignored otherwise. If no weights are - // specified when locality weighted load balancing is enabled, the locality is - // assigned no load. - google.protobuf.UInt32Value load_balancing_weight = 3 [(validate.rules).uint32 = {gte: 1}]; - - // Optional: the priority for this LocalityLbEndpoints. If unspecified this will - // default to the highest priority (0). - // - // Under usual circumstances, Envoy will only select endpoints for the highest - // priority (0). In the event all endpoints for a particular priority are - // unavailable/unhealthy, Envoy will fail over to selecting endpoints for the - // next highest priority group. - // - // Priorities should range from 0 (highest) to N (lowest) without skipping. - uint32 priority = 5 [(validate.rules).uint32 = {lte: 128}]; - - // Optional: Per locality proximity value which indicates how close this - // locality is from the source locality. This value only provides ordering - // information (lower the value, closer it is to the source locality). - // This will be consumed by load balancing schemes that need proximity order - // to determine where to route the requests. - // [#not-implemented-hide:] - google.protobuf.UInt32Value proximity = 6; -} diff --git a/generated_api_shadow/envoy/config/endpoint/v4alpha/load_report.proto b/generated_api_shadow/envoy/config/endpoint/v4alpha/load_report.proto deleted file mode 100644 index 80be59041d742..0000000000000 --- a/generated_api_shadow/envoy/config/endpoint/v4alpha/load_report.proto +++ /dev/null @@ -1,168 +0,0 @@ -syntax = "proto3"; - -package envoy.config.endpoint.v4alpha; - -import "envoy/config/core/v4alpha/address.proto"; -import "envoy/config/core/v4alpha/base.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.endpoint.v4alpha"; -option java_outer_classname = "LoadReportProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Load Report] - -// These are stats Envoy reports to the management server at a frequency defined by -// :ref:`LoadStatsResponse.load_reporting_interval`. -// Stats per upstream region/zone and optionally per subzone. -// [#next-free-field: 9] -message UpstreamLocalityStats { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.UpstreamLocalityStats"; - - // Name of zone, region and optionally endpoint group these metrics were - // collected from. Zone and region names could be empty if unknown. - core.v4alpha.Locality locality = 1; - - // The total number of requests successfully completed by the endpoints in the - // locality. - 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, - // aggregated over all endpoints in the locality. - uint64 total_error_requests = 4; - - // The total number of requests that were issued by this Envoy since - // the last report. This information is aggregated over all the - // upstream endpoints in the locality. - uint64 total_issued_requests = 8; - - // Stats for multi-dimensional load balancing. - repeated EndpointLoadMetricStats load_metric_stats = 5; - - // Endpoint granularity stats information for this locality. This information - // is populated if the Server requests it by setting - // :ref:`LoadStatsResponse.report_endpoint_granularity`. - repeated UpstreamEndpointStats upstream_endpoint_stats = 7; - - // [#not-implemented-hide:] The priority of the endpoint group these metrics - // were collected from. - uint32 priority = 6; -} - -// [#next-free-field: 8] -message UpstreamEndpointStats { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.UpstreamEndpointStats"; - - // Upstream host address. - core.v4alpha.Address address = 1; - - // Opaque and implementation dependent metadata of the - // endpoint. Envoy will pass this directly to the management server. - google.protobuf.Struct metadata = 6; - - // 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 successfully. 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 for this endpoint. - 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; - - // The total number of requests that were issued to this endpoint - // since the last report. A single TCP connection, HTTP or gRPC - // request or stream is counted as one request. - uint64 total_issued_requests = 7; - - // Stats for multi-dimensional load balancing. - repeated EndpointLoadMetricStats load_metric_stats = 5; -} - -message EndpointLoadMetricStats { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.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` -// Next ID: 7 -// [#next-free-field: 7] -message ClusterStats { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.ClusterStats"; - - message DroppedRequests { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.endpoint.v3.ClusterStats.DroppedRequests"; - - // Identifier for the policy specifying the drop. - string category = 1 [(validate.rules).string = {min_len: 1}]; - - // Total number of deliberately dropped requests for the category. - uint64 dropped_count = 2; - } - - // The name of the cluster. - string cluster_name = 1 [(validate.rules).string = {min_len: 1}]; - - // The eds_cluster_config service_name of the cluster. - // It's possible that two clusters send the same service_name to EDS, - // in that case, the management server is supposed to do aggregation on the load reports. - string cluster_service_name = 6; - - // 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 total number of dropped requests. This covers requests - // deliberately dropped by the drop_overload policy and circuit breaking. - uint64 total_dropped_requests = 3; - - // Information about deliberately dropped requests for each category specified - // in the DropOverload policy. - repeated DroppedRequests dropped_requests = 5; - - // Period over which the actual load report occurred. This will be guaranteed to include every - // request reported. Due to system load and delays between the *LoadStatsRequest* sent from Envoy - // and the *LoadStatsResponse* message sent from the management server, this may be longer than - // the requested load reporting interval in the *LoadStatsResponse*. - google.protobuf.Duration load_report_interval = 4; -} diff --git a/generated_api_shadow/envoy/data/accesslog/v4alpha/BUILD b/generated_api_shadow/envoy/data/accesslog/v4alpha/BUILD deleted file mode 100644 index c02cec9d67f6c..0000000000000 --- a/generated_api_shadow/envoy/data/accesslog/v4alpha/BUILD +++ /dev/null @@ -1,13 +0,0 @@ -# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. - -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") - -licenses(["notice"]) # Apache 2 - -api_proto_package( - deps = [ - "//envoy/config/core/v4alpha:pkg", - "//envoy/data/accesslog/v3:pkg", - "@com_github_cncf_udpa//udpa/annotations:pkg", - ], -) diff --git a/generated_api_shadow/envoy/data/accesslog/v4alpha/accesslog.proto b/generated_api_shadow/envoy/data/accesslog/v4alpha/accesslog.proto deleted file mode 100644 index 0e01ddc2dd784..0000000000000 --- a/generated_api_shadow/envoy/data/accesslog/v4alpha/accesslog.proto +++ /dev/null @@ -1,431 +0,0 @@ -syntax = "proto3"; - -package envoy.data.accesslog.v4alpha; - -import "envoy/config/core/v4alpha/address.proto"; -import "envoy/config/core/v4alpha/base.proto"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.data.accesslog.v4alpha"; -option java_outer_classname = "AccesslogProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: gRPC access logs] -// Envoy access logs describe incoming interaction with Envoy over a fixed -// period of time, and typically cover a single request/response exchange, -// (e.g. HTTP), stream (e.g. over HTTP/gRPC), or proxied connection (e.g. TCP). -// Access logs contain fields defined in protocol-specific protobuf messages. -// -// Except where explicitly declared otherwise, all fields describe -// *downstream* interaction between Envoy and a connected client. -// Fields describing *upstream* interaction will explicitly include ``upstream`` -// in their name. - -message TCPAccessLogEntry { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.TCPAccessLogEntry"; - - // Common properties shared by all Envoy access logs. - AccessLogCommon common_properties = 1; - - // Properties of the TCP connection. - ConnectionProperties connection_properties = 2; -} - -message HTTPAccessLogEntry { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.HTTPAccessLogEntry"; - - // HTTP version - enum HTTPVersion { - PROTOCOL_UNSPECIFIED = 0; - HTTP10 = 1; - HTTP11 = 2; - HTTP2 = 3; - HTTP3 = 4; - } - - // Common properties shared by all Envoy access logs. - AccessLogCommon common_properties = 1; - - HTTPVersion protocol_version = 2; - - // Description of the incoming HTTP request. - HTTPRequestProperties request = 3; - - // Description of the outgoing HTTP response. - HTTPResponseProperties response = 4; -} - -// Defines fields for a connection -message ConnectionProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.ConnectionProperties"; - - // Number of bytes received from downstream. - uint64 received_bytes = 1; - - // Number of bytes sent to downstream. - uint64 sent_bytes = 2; -} - -// Defines fields that are shared by all Envoy access logs. -// [#next-free-field: 22] -message AccessLogCommon { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.AccessLogCommon"; - - // [#not-implemented-hide:] - // This field indicates the rate at which this log entry was sampled. - // Valid range is (0.0, 1.0]. - double sample_rate = 1 [(validate.rules).double = {lte: 1.0 gt: 0.0}]; - - // This field is the remote/origin address on which the request from the user was received. - // Note: This may not be the physical peer. E.g, if the remote address is inferred from for - // example the x-forwarder-for header, proxy protocol, etc. - config.core.v4alpha.Address downstream_remote_address = 2; - - // This field is the local/destination address on which the request from the user was received. - config.core.v4alpha.Address downstream_local_address = 3; - - // If the connection is secure,S this field will contain TLS properties. - TLSProperties tls_properties = 4; - - // The time that Envoy started servicing this request. This is effectively the time that the first - // downstream byte is received. - google.protobuf.Timestamp start_time = 5; - - // Interval between the first downstream byte received and the last - // downstream byte received (i.e. time it takes to receive a request). - google.protobuf.Duration time_to_last_rx_byte = 6; - - // Interval between the first downstream byte received and the first upstream byte sent. There may - // by considerable delta between *time_to_last_rx_byte* and this value due to filters. - // Additionally, the same caveats apply as documented in *time_to_last_downstream_tx_byte* about - // not accounting for kernel socket buffer time, etc. - google.protobuf.Duration time_to_first_upstream_tx_byte = 7; - - // Interval between the first downstream byte received and the last upstream byte sent. There may - // by considerable delta between *time_to_last_rx_byte* and this value due to filters. - // Additionally, the same caveats apply as documented in *time_to_last_downstream_tx_byte* about - // not accounting for kernel socket buffer time, etc. - google.protobuf.Duration time_to_last_upstream_tx_byte = 8; - - // Interval between the first downstream byte received and the first upstream - // byte received (i.e. time it takes to start receiving a response). - google.protobuf.Duration time_to_first_upstream_rx_byte = 9; - - // Interval between the first downstream byte received and the last upstream - // byte received (i.e. time it takes to receive a complete response). - google.protobuf.Duration time_to_last_upstream_rx_byte = 10; - - // Interval between the first downstream byte received and the first downstream byte sent. - // There may be a considerable delta between the *time_to_first_upstream_rx_byte* and this field - // due to filters. Additionally, the same caveats apply as documented in - // *time_to_last_downstream_tx_byte* about not accounting for kernel socket buffer time, etc. - google.protobuf.Duration time_to_first_downstream_tx_byte = 11; - - // Interval between the first downstream byte received and the last downstream byte sent. - // Depending on protocol, buffering, windowing, filters, etc. there may be a considerable delta - // between *time_to_last_upstream_rx_byte* and this field. Note also that this is an approximate - // time. In the current implementation it does not include kernel socket buffer time. In the - // current implementation it also does not include send window buffering inside the HTTP/2 codec. - // In the future it is likely that work will be done to make this duration more accurate. - google.protobuf.Duration time_to_last_downstream_tx_byte = 12; - - // The upstream remote/destination address that handles this exchange. This does not include - // retries. - config.core.v4alpha.Address upstream_remote_address = 13; - - // The upstream local/origin address that handles this exchange. This does not include retries. - config.core.v4alpha.Address upstream_local_address = 14; - - // The upstream cluster that *upstream_remote_address* belongs to. - string upstream_cluster = 15; - - // Flags indicating occurrences during request/response processing. - ResponseFlags response_flags = 16; - - // All metadata encountered during request processing, including endpoint - // selection. - // - // This can be used to associate IDs attached to the various configurations - // used to process this request with the access log entry. For example, a - // route created from a higher level forwarding rule with some ID can place - // that ID in this field and cross reference later. It can also be used to - // determine if a canary endpoint was used or not. - config.core.v4alpha.Metadata metadata = 17; - - // If upstream connection failed due to transport socket (e.g. TLS handshake), provides the - // failure reason from the transport socket. The format of this field depends on the configured - // upstream transport socket. Common TLS failures are in - // :ref:`TLS trouble shooting `. - string upstream_transport_failure_reason = 18; - - // The name of the route - string route_name = 19; - - // This field is the downstream direct remote address on which the request from the user was - // received. Note: This is always the physical peer, even if the remote address is inferred from - // for example the x-forwarder-for header, proxy protocol, etc. - config.core.v4alpha.Address downstream_direct_remote_address = 20; - - // Map of filter state in stream info that have been configured to be logged. If the filter - // state serialized to any message other than `google.protobuf.Any` it will be packed into - // `google.protobuf.Any`. - map filter_state_objects = 21; -} - -// Flags indicating occurrences during request/response processing. -// [#next-free-field: 26] -message ResponseFlags { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.ResponseFlags"; - - message Unauthorized { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.ResponseFlags.Unauthorized"; - - // Reasons why the request was unauthorized - enum Reason { - REASON_UNSPECIFIED = 0; - - // The request was denied by the external authorization service. - EXTERNAL_SERVICE = 1; - } - - Reason reason = 1; - } - - // Indicates local server healthcheck failed. - bool failed_local_healthcheck = 1; - - // Indicates there was no healthy upstream. - bool no_healthy_upstream = 2; - - // Indicates an there was an upstream request timeout. - bool upstream_request_timeout = 3; - - // Indicates local codec level reset was sent on the stream. - bool local_reset = 4; - - // Indicates remote codec level reset was received on the stream. - bool upstream_remote_reset = 5; - - // Indicates there was a local reset by a connection pool due to an initial connection failure. - bool upstream_connection_failure = 6; - - // Indicates the stream was reset due to an upstream connection termination. - bool upstream_connection_termination = 7; - - // Indicates the stream was reset because of a resource overflow. - bool upstream_overflow = 8; - - // Indicates no route was found for the request. - bool no_route_found = 9; - - // Indicates that the request was delayed before proxying. - bool delay_injected = 10; - - // Indicates that the request was aborted with an injected error code. - bool fault_injected = 11; - - // Indicates that the request was rate-limited locally. - bool rate_limited = 12; - - // Indicates if the request was deemed unauthorized and the reason for it. - Unauthorized unauthorized_details = 13; - - // Indicates that the request was rejected because there was an error in rate limit service. - bool rate_limit_service_error = 14; - - // Indicates the stream was reset due to a downstream connection termination. - bool downstream_connection_termination = 15; - - // Indicates that the upstream retry limit was exceeded, resulting in a downstream error. - bool upstream_retry_limit_exceeded = 16; - - // Indicates that the stream idle timeout was hit, resulting in a downstream 408. - bool stream_idle_timeout = 17; - - // Indicates that the request was rejected because an envoy request header failed strict - // validation. - bool invalid_envoy_request_headers = 18; - - // Indicates there was an HTTP protocol error on the downstream request. - bool downstream_protocol_error = 19; - - // Indicates there was a max stream duration reached on the upstream request. - bool upstream_max_stream_duration_reached = 20; - - // Indicates the response was served from a cache filter. - bool response_from_cache_filter = 21; - - // Indicates that a filter configuration is not available. - bool no_filter_config_found = 22; - - // Indicates that request or connection exceeded the downstream connection duration. - bool duration_timeout = 23; - - // Indicates there was an HTTP protocol error in the upstream response. - bool upstream_protocol_error = 24; - - // Indicates no cluster was found for the request. - bool no_cluster_found = 25; -} - -// Properties of a negotiated TLS connection. -// [#next-free-field: 7] -message TLSProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.TLSProperties"; - - enum TLSVersion { - VERSION_UNSPECIFIED = 0; - TLSv1 = 1; - TLSv1_1 = 2; - TLSv1_2 = 3; - TLSv1_3 = 4; - } - - message CertificateProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.TLSProperties.CertificateProperties"; - - message SubjectAltName { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.TLSProperties.CertificateProperties.SubjectAltName"; - - oneof san { - string uri = 1; - - // [#not-implemented-hide:] - string dns = 2; - } - } - - // SANs present in the certificate. - repeated SubjectAltName subject_alt_name = 1; - - // The subject field of the certificate. - string subject = 2; - } - - // Version of TLS that was negotiated. - TLSVersion tls_version = 1; - - // TLS cipher suite negotiated during handshake. The value is a - // four-digit hex code defined by the IANA TLS Cipher Suite Registry - // (e.g. ``009C`` for ``TLS_RSA_WITH_AES_128_GCM_SHA256``). - // - // Here it is expressed as an integer. - google.protobuf.UInt32Value tls_cipher_suite = 2; - - // SNI hostname from handshake. - string tls_sni_hostname = 3; - - // Properties of the local certificate used to negotiate TLS. - CertificateProperties local_certificate_properties = 4; - - // Properties of the peer certificate used to negotiate TLS. - CertificateProperties peer_certificate_properties = 5; - - // The TLS session ID. - string tls_session_id = 6; -} - -// [#next-free-field: 14] -message HTTPRequestProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.HTTPRequestProperties"; - - // The request method (RFC 7231/2616). - config.core.v4alpha.RequestMethod request_method = 1 - [(validate.rules).enum = {defined_only: true}]; - - // The scheme portion of the incoming request URI. - string scheme = 2; - - // HTTP/2 ``:authority`` or HTTP/1.1 ``Host`` header value. - string authority = 3; - - // The port of the incoming request URI - // (unused currently, as port is composed onto authority). - google.protobuf.UInt32Value port = 4; - - // The path portion from the incoming request URI. - string path = 5; - - // Value of the ``User-Agent`` request header. - string user_agent = 6; - - // Value of the ``Referer`` request header. - string referer = 7; - - // Value of the ``X-Forwarded-For`` request header. - string forwarded_for = 8; - - // Value of the ``X-Request-Id`` request header - // - // This header is used by Envoy to uniquely identify a request. - // It will be generated for all external requests and internal requests that - // do not already have a request ID. - string request_id = 9; - - // Value of the ``X-Envoy-Original-Path`` request header. - string original_path = 10; - - // Size of the HTTP request headers in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. - uint64 request_headers_bytes = 11; - - // Size of the HTTP request body in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. - uint64 request_body_bytes = 12; - - // Map of additional headers that have been configured to be logged. - map request_headers = 13; -} - -// [#next-free-field: 7] -message HTTPResponseProperties { - option (udpa.annotations.versioning).previous_message_type = - "envoy.data.accesslog.v3.HTTPResponseProperties"; - - // The HTTP response code returned by Envoy. - google.protobuf.UInt32Value response_code = 1; - - // Size of the HTTP response headers in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. - uint64 response_headers_bytes = 2; - - // Size of the HTTP response body in bytes. - // - // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. - uint64 response_body_bytes = 3; - - // Map of additional headers configured to be logged. - map response_headers = 4; - - // Map of trailers configured to be logged. - map response_trailers = 5; - - // The HTTP response code details. - string response_code_details = 6; -} diff --git a/generated_api_shadow/envoy/extensions/access_loggers/grpc/v4alpha/als.proto b/generated_api_shadow/envoy/extensions/access_loggers/grpc/v4alpha/als.proto index 81b254679fd66..9e6fb1e48386e 100644 --- a/generated_api_shadow/envoy/extensions/access_loggers/grpc/v4alpha/als.proto +++ b/generated_api_shadow/envoy/extensions/access_loggers/grpc/v4alpha/als.proto @@ -31,15 +31,15 @@ message HttpGrpcAccessLogConfig { CommonGrpcAccessLogConfig common_config = 1 [(validate.rules).message = {required: true}]; // Additional request headers to log in :ref:`HTTPRequestProperties.request_headers - // `. + // `. repeated string additional_request_headers_to_log = 2; // Additional response headers to log in :ref:`HTTPResponseProperties.response_headers - // `. + // `. repeated string additional_response_headers_to_log = 3; // Additional response trailers to log in :ref:`HTTPResponseProperties.response_trailers - // `. + // `. repeated string additional_response_trailers_to_log = 4; } @@ -83,7 +83,7 @@ message CommonGrpcAccessLogConfig { google.protobuf.UInt32Value buffer_size_bytes = 4; // Additional filter state objects to log in :ref:`filter_state_objects - // `. + // `. // Logger will call `FilterState::Object::serializeAsProto` to serialize the filter state object. repeated string filter_state_objects_to_log = 5; } diff --git a/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD b/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD deleted file mode 100644 index df5de314366ab..0000000000000 --- a/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/BUILD +++ /dev/null @@ -1,13 +0,0 @@ -# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py. - -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") - -licenses(["notice"]) # Apache 2 - -api_proto_package( - deps = [ - "//envoy/config/core/v4alpha:pkg", - "//envoy/extensions/retry/host/omit_host_metadata/v3:pkg", - "@com_github_cncf_udpa//udpa/annotations:pkg", - ], -) diff --git a/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto b/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto deleted file mode 100644 index 043d5ce3cfa06..0000000000000 --- a/generated_api_shadow/envoy/extensions/retry/host/omit_host_metadata/v4alpha/omit_host_metadata_config.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; - -package envoy.extensions.retry.host.omit_host_metadata.v4alpha; - -import "envoy/config/core/v4alpha/base.proto"; - -import "udpa/annotations/status.proto"; -import "udpa/annotations/versioning.proto"; - -option java_package = "io.envoyproxy.envoy.extensions.retry.host.omit_host_metadata.v4alpha"; -option java_outer_classname = "OmitHostMetadataConfigProto"; -option java_multiple_files = true; -option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE; - -// [#protodoc-title: Omit host metadata retry predicate] - -// A retry host predicate that can be used to reject a host based on -// predefined metadata match criteria. -// [#extension: envoy.retry_host_predicates.omit_host_metadata] -message OmitHostMetadataConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.extensions.retry.host.omit_host_metadata.v3.OmitHostMetadataConfig"; - - // Retry host predicate metadata match criteria. The hosts in - // the upstream cluster with matching metadata will be omitted while - // attempting a retry of a failed request. The metadata should be specified - // under the *envoy.lb* key. - config.core.v4alpha.Metadata metadata_match = 1; -} diff --git a/generated_api_shadow/envoy/service/accesslog/v4alpha/BUILD b/generated_api_shadow/envoy/service/accesslog/v4alpha/BUILD index ef86c64ac7e5f..94c70bc66967b 100644 --- a/generated_api_shadow/envoy/service/accesslog/v4alpha/BUILD +++ b/generated_api_shadow/envoy/service/accesslog/v4alpha/BUILD @@ -8,7 +8,7 @@ api_proto_package( has_services = True, deps = [ "//envoy/config/core/v4alpha:pkg", - "//envoy/data/accesslog/v4alpha:pkg", + "//envoy/data/accesslog/v3:pkg", "//envoy/service/accesslog/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/generated_api_shadow/envoy/service/accesslog/v4alpha/als.proto b/generated_api_shadow/envoy/service/accesslog/v4alpha/als.proto index f3fbe731b6366..ab0ba0e15213e 100644 --- a/generated_api_shadow/envoy/service/accesslog/v4alpha/als.proto +++ b/generated_api_shadow/envoy/service/accesslog/v4alpha/als.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package envoy.service.accesslog.v4alpha; import "envoy/config/core/v4alpha/base.proto"; -import "envoy/data/accesslog/v4alpha/accesslog.proto"; +import "envoy/data/accesslog/v3/accesslog.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; @@ -58,7 +58,7 @@ message StreamAccessLogsMessage { option (udpa.annotations.versioning).previous_message_type = "envoy.service.accesslog.v3.StreamAccessLogsMessage.HTTPAccessLogEntries"; - repeated data.accesslog.v4alpha.HTTPAccessLogEntry log_entry = 1 + repeated data.accesslog.v3.HTTPAccessLogEntry log_entry = 1 [(validate.rules).repeated = {min_items: 1}]; } @@ -67,7 +67,7 @@ message StreamAccessLogsMessage { option (udpa.annotations.versioning).previous_message_type = "envoy.service.accesslog.v3.StreamAccessLogsMessage.TCPAccessLogEntries"; - repeated data.accesslog.v4alpha.TCPAccessLogEntry log_entry = 1 + repeated data.accesslog.v3.TCPAccessLogEntry log_entry = 1 [(validate.rules).repeated = {min_items: 1}]; } diff --git a/generated_api_shadow/envoy/service/health/v4alpha/BUILD b/generated_api_shadow/envoy/service/health/v4alpha/BUILD index dc88ee92239b0..37c2608f7c182 100644 --- a/generated_api_shadow/envoy/service/health/v4alpha/BUILD +++ b/generated_api_shadow/envoy/service/health/v4alpha/BUILD @@ -10,7 +10,7 @@ api_proto_package( "//envoy/annotations:pkg", "//envoy/config/cluster/v4alpha:pkg", "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v4alpha:pkg", + "//envoy/config/endpoint/v3:pkg", "//envoy/service/health/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/generated_api_shadow/envoy/service/health/v4alpha/hds.proto b/generated_api_shadow/envoy/service/health/v4alpha/hds.proto index f9428b6381ae3..1b2446b109d8b 100644 --- a/generated_api_shadow/envoy/service/health/v4alpha/hds.proto +++ b/generated_api_shadow/envoy/service/health/v4alpha/hds.proto @@ -5,7 +5,7 @@ package envoy.service.health.v4alpha; import "envoy/config/cluster/v4alpha/cluster.proto"; import "envoy/config/core/v4alpha/base.proto"; import "envoy/config/core/v4alpha/health_check.proto"; -import "envoy/config/endpoint/v4alpha/endpoint_components.proto"; +import "envoy/config/endpoint/v3/endpoint_components.proto"; import "google/api/annotations.proto"; import "google/protobuf/duration.proto"; @@ -104,7 +104,7 @@ message EndpointHealth { option (udpa.annotations.versioning).previous_message_type = "envoy.service.health.v3.EndpointHealth"; - config.endpoint.v4alpha.Endpoint endpoint = 1; + config.endpoint.v3.Endpoint endpoint = 1; config.core.v4alpha.HealthStatus health_status = 2; } @@ -159,7 +159,7 @@ message LocalityEndpoints { config.core.v4alpha.Locality locality = 1; - repeated config.endpoint.v4alpha.Endpoint endpoints = 2; + repeated config.endpoint.v3.Endpoint endpoints = 2; } // The cluster name and locality is provided to Envoy for the endpoints that it diff --git a/generated_api_shadow/envoy/service/load_stats/v4alpha/BUILD b/generated_api_shadow/envoy/service/load_stats/v4alpha/BUILD index 870673013a0e6..91d914645041b 100644 --- a/generated_api_shadow/envoy/service/load_stats/v4alpha/BUILD +++ b/generated_api_shadow/envoy/service/load_stats/v4alpha/BUILD @@ -8,7 +8,7 @@ api_proto_package( has_services = True, deps = [ "//envoy/config/core/v4alpha:pkg", - "//envoy/config/endpoint/v4alpha:pkg", + "//envoy/config/endpoint/v3:pkg", "//envoy/service/load_stats/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/generated_api_shadow/envoy/service/load_stats/v4alpha/lrs.proto b/generated_api_shadow/envoy/service/load_stats/v4alpha/lrs.proto index 86bbe13186332..f99b6555f4a17 100644 --- a/generated_api_shadow/envoy/service/load_stats/v4alpha/lrs.proto +++ b/generated_api_shadow/envoy/service/load_stats/v4alpha/lrs.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package envoy.service.load_stats.v4alpha; import "envoy/config/core/v4alpha/base.proto"; -import "envoy/config/endpoint/v4alpha/load_report.proto"; +import "envoy/config/endpoint/v3/load_report.proto"; import "google/protobuf/duration.proto"; @@ -68,7 +68,7 @@ message LoadStatsRequest { config.core.v4alpha.Node node = 1; // A list of load stats to report. - repeated config.endpoint.v4alpha.ClusterStats cluster_stats = 2; + repeated config.endpoint.v3.ClusterStats cluster_stats = 2; } // The management server sends envoy a LoadStatsResponse with all clusters it From 476783484e7cf2549d068c09022d6d189e6eb30e Mon Sep 17 00:00:00 2001 From: Yanjun Xiang Date: Mon, 17 May 2021 16:07:01 +0000 Subject: [PATCH 11/11] address comments regarding base.proto document format Signed-off-by: Yanjun Xiang --- api/envoy/config/core/v3/base.proto | 9 +++++++-- api/envoy/config/core/v4alpha/base.proto | 9 +++++++-- generated_api_shadow/envoy/config/core/v3/base.proto | 9 +++++++-- .../envoy/config/core/v4alpha/base.proto | 9 +++++++-- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/api/envoy/config/core/v3/base.proto b/api/envoy/config/core/v3/base.proto index 5069950360e01..d6c507b8dec9a 100644 --- a/api/envoy/config/core/v3/base.proto +++ b/api/envoy/config/core/v3/base.proto @@ -236,13 +236,18 @@ message Metadata { // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. + // If both *filter_metadata* and + // :ref:`typed_filter_metadata ` + // fields are present in the metadata with same keys, + // only *typed_filter_metadata* field will be parsed. map filter_metadata = 1; // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. // The value is encoded as google.protobuf.Any. - // If both filter_metadata and typed_filter_metadata fields are present in the - // metadata with same keys, only typed_filter_metadata field will be parsed. + // If both :ref:`filter_metadata ` + // and *typed_filter_metadata* fields are present in the metadata with same keys, + // only *typed_filter_metadata* field will be parsed. map typed_filter_metadata = 2; } diff --git a/api/envoy/config/core/v4alpha/base.proto b/api/envoy/config/core/v4alpha/base.proto index d5a24da7934b8..b9980eff49ca5 100644 --- a/api/envoy/config/core/v4alpha/base.proto +++ b/api/envoy/config/core/v4alpha/base.proto @@ -226,13 +226,18 @@ message Metadata { // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. + // If both *filter_metadata* and + // :ref:`typed_filter_metadata ` + // fields are present in the metadata with same keys, + // only *typed_filter_metadata* field will be parsed. map filter_metadata = 1; // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. // The value is encoded as google.protobuf.Any. - // If both filter_metadata and typed_filter_metadata fields are present in the - // metadata with same keys, only typed_filter_metadata field will be parsed. + // If both :ref:`filter_metadata ` + // and *typed_filter_metadata* fields are present in the metadata with same keys, + // only *typed_filter_metadata* field will be parsed. map typed_filter_metadata = 2; } diff --git a/generated_api_shadow/envoy/config/core/v3/base.proto b/generated_api_shadow/envoy/config/core/v3/base.proto index fc1ede89d25f4..9b1ca815723b2 100644 --- a/generated_api_shadow/envoy/config/core/v3/base.proto +++ b/generated_api_shadow/envoy/config/core/v3/base.proto @@ -235,13 +235,18 @@ message Metadata { // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. + // If both *filter_metadata* and + // :ref:`typed_filter_metadata ` + // fields are present in the metadata with same keys, + // only *typed_filter_metadata* field will be parsed. map filter_metadata = 1; // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. // The value is encoded as google.protobuf.Any. - // If both filter_metadata and typed_filter_metadata fields are present in the - // metadata with same keys, only typed_filter_metadata field will be parsed. + // If both :ref:`filter_metadata ` + // and *typed_filter_metadata* fields are present in the metadata with same keys, + // only *typed_filter_metadata* field will be parsed. map typed_filter_metadata = 2; } diff --git a/generated_api_shadow/envoy/config/core/v4alpha/base.proto b/generated_api_shadow/envoy/config/core/v4alpha/base.proto index d1712e6fbbb0e..99ce121ddf63f 100644 --- a/generated_api_shadow/envoy/config/core/v4alpha/base.proto +++ b/generated_api_shadow/envoy/config/core/v4alpha/base.proto @@ -235,13 +235,18 @@ message Metadata { // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. + // If both *filter_metadata* and + // :ref:`typed_filter_metadata ` + // fields are present in the metadata with same keys, + // only *typed_filter_metadata* field will be parsed. map filter_metadata = 1; // Key is the reverse DNS filter name, e.g. com.acme.widget. The envoy.* // namespace is reserved for Envoy's built-in filters. // The value is encoded as google.protobuf.Any. - // If both filter_metadata and typed_filter_metadata fields are present in the - // metadata with same keys, only typed_filter_metadata field will be parsed. + // If both :ref:`filter_metadata ` + // and *typed_filter_metadata* fields are present in the metadata with same keys, + // only *typed_filter_metadata* field will be parsed. map typed_filter_metadata = 2; }