From a1bbe5396e1e68019235f75f2835b3ae1e1b6ed3 Mon Sep 17 00:00:00 2001 From: "data-plane-api(CircleCI)" Date: Thu, 10 Jan 2019 03:19:41 +0000 Subject: [PATCH] config: add support Any as opaque config (#5435) Add support of Any as opaque config for extensions. Deprecates Struct configs. Fixes #4475. Risk Level: Low Testing: CI Docs Changes: Added. Release Notes: Added. Signed-off-by: Lizan Zhou Mirrored from https://github.com/envoyproxy/envoy @ 851f591f4ed84594e5e5041e7ada4167a4f3a273 --- envoy/api/v2/cds.proto | 3 +-- envoy/api/v2/core/base.proto | 3 +-- envoy/api/v2/core/grpc_service.proto | 3 +-- envoy/api/v2/core/health_check.proto | 3 +-- envoy/api/v2/listener/listener.proto | 6 ++---- envoy/api/v2/route/route.proto | 15 +++++---------- envoy/config/filter/accesslog/v2/accesslog.proto | 3 +-- .../v2/http_connection_manager.proto | 3 +-- .../thrift_proxy/v2alpha1/thrift_proxy.proto | 3 +-- envoy/config/metrics/v2/stats.proto | 3 +-- envoy/config/overload/v2alpha/overload.proto | 3 +-- envoy/config/trace/v2/trace.proto | 3 +-- 12 files changed, 17 insertions(+), 34 deletions(-) diff --git a/envoy/api/v2/cds.proto b/envoy/api/v2/cds.proto index e8f86e9b..d4daac7b 100644 --- a/envoy/api/v2/cds.proto +++ b/envoy/api/v2/cds.proto @@ -233,9 +233,8 @@ message Cluster { // for upstream connections. The key should match the extension filter name, such as // "envoy.filters.network.thrift_proxy". See the extension's documentation for details on // specific options. - map extension_protocol_options = 35; + map extension_protocol_options = 35 [deprecated = true]; - // [#not-implemented-hide:] // The extension_protocol_options field is used to provide extension-specific protocol options // for upstream connections. The key should match the extension filter name, such as // "envoy.filters.network.thrift_proxy". See the extension's documentation for details on diff --git a/envoy/api/v2/core/base.proto b/envoy/api/v2/core/base.proto index 82482099..e764df9c 100644 --- a/envoy/api/v2/core/base.proto +++ b/envoy/api/v2/core/base.proto @@ -190,9 +190,8 @@ message TransportSocket { // Implementation specific configuration which depends on the implementation being instantiated. // See the supported transport socket implementations for further documentation. oneof config_type { - google.protobuf.Struct config = 2; + google.protobuf.Struct config = 2 [deprecated = true]; - // [#not-implemented-hide:] google.protobuf.Any typed_config = 3; } } diff --git a/envoy/api/v2/core/grpc_service.proto b/envoy/api/v2/core/grpc_service.proto index 7a009d81..923a9313 100644 --- a/envoy/api/v2/core/grpc_service.proto +++ b/envoy/api/v2/core/grpc_service.proto @@ -82,9 +82,8 @@ message GrpcService { message MetadataCredentialsFromPlugin { string name = 1; oneof config_type { - google.protobuf.Struct config = 2; + google.protobuf.Struct config = 2 [deprecated = true]; - // [#not-implemented-hide:] google.protobuf.Any typed_config = 3; } } diff --git a/envoy/api/v2/core/health_check.proto b/envoy/api/v2/core/health_check.proto index ea2e245a..24082c1f 100644 --- a/envoy/api/v2/core/health_check.proto +++ b/envoy/api/v2/core/health_check.proto @@ -163,9 +163,8 @@ message HealthCheck { // A custom health checker specific configuration which depends on the custom health checker // being instantiated. See :api:`envoy/config/health_checker` for reference. oneof config_type { - google.protobuf.Struct config = 2; + google.protobuf.Struct config = 2 [deprecated = true]; - // [#not-implemented-hide:] google.protobuf.Any typed_config = 3; } } diff --git a/envoy/api/v2/listener/listener.proto b/envoy/api/v2/listener/listener.proto index 0d617cea..6824de96 100644 --- a/envoy/api/v2/listener/listener.proto +++ b/envoy/api/v2/listener/listener.proto @@ -39,9 +39,8 @@ message Filter { // Filter specific configuration which depends on the filter being // instantiated. See the supported filters for further documentation. oneof config_type { - google.protobuf.Struct config = 2; + google.protobuf.Struct config = 2 [deprecated = true]; - // [#not-implemented-hide:] google.protobuf.Any typed_config = 4; } @@ -209,9 +208,8 @@ message ListenerFilter { // Filter specific configuration which depends on the filter being instantiated. // See the supported filters for further documentation. oneof config_type { - google.protobuf.Struct config = 2; + google.protobuf.Struct config = 2 [deprecated = true]; - // [#not-implemented-hide:] google.protobuf.Any typed_config = 3; } } diff --git a/envoy/api/v2/route/route.proto b/envoy/api/v2/route/route.proto index 27554e31..9a8ec23c 100644 --- a/envoy/api/v2/route/route.proto +++ b/envoy/api/v2/route/route.proto @@ -113,9 +113,8 @@ message VirtualHost { // *envoy.buffer* for the HTTP buffer filter. Use of this field is filter // specific; see the :ref:`HTTP filter documentation ` // for if and how it is utilized. - map per_filter_config = 12; + map per_filter_config = 12 [deprecated = true]; - // [#not-implemented-hide:] // The per_filter_config field can be used to provide virtual host-specific // configurations for filters. The key should match the filter name, such as // *envoy.buffer* for the HTTP buffer filter. Use of this field is filter @@ -181,9 +180,8 @@ message Route { // *envoy.buffer* for the HTTP buffer filter. Use of this field is filter // specific; see the :ref:`HTTP filter documentation ` for // if and how it is utilized. - map per_filter_config = 8; + map per_filter_config = 8 [deprecated = true]; - // [#not-implemented-hide:] // The per_filter_config field can be used to provide route-specific // configurations for filters. The key should match the filter name, such as // *envoy.buffer* for the HTTP buffer filter. Use of this field is filter @@ -279,9 +277,8 @@ message WeightedCluster { // *envoy.buffer* for the HTTP buffer filter. Use of this field is filter // specific; see the :ref:`HTTP filter documentation ` // for if and how it is utilized. - map per_filter_config = 8; + map per_filter_config = 8 [deprecated = true]; - // [#not-implemented-hide:] // The per_filter_config field can be used to provide weighted cluster-specific // configurations for filters. The key should match the filter name, such as // *envoy.buffer* for the HTTP buffer filter. Use of this field is filter @@ -805,9 +802,8 @@ message RetryPolicy { message RetryPriority { string name = 1 [(validate.rules).string.min_bytes = 1]; oneof config_type { - google.protobuf.Struct config = 2; + google.protobuf.Struct config = 2 [deprecated = true]; - // [#not-implemented-hide:] google.protobuf.Any typed_config = 3; } } @@ -820,9 +816,8 @@ message RetryPolicy { message RetryHostPredicate { string name = 1 [(validate.rules).string.min_bytes = 1]; oneof config_type { - google.protobuf.Struct config = 2; + google.protobuf.Struct config = 2 [deprecated = true]; - // [#not-implemented-hide:] google.protobuf.Any typed_config = 3; } } diff --git a/envoy/config/filter/accesslog/v2/accesslog.proto b/envoy/config/filter/accesslog/v2/accesslog.proto index 76f5994a..0ec539d1 100644 --- a/envoy/config/filter/accesslog/v2/accesslog.proto +++ b/envoy/config/filter/accesslog/v2/accesslog.proto @@ -35,9 +35,8 @@ message AccessLog { // #. "envoy.http_grpc_access_log": :ref:`HttpGrpcAccessLogConfig // ` oneof config_type { - google.protobuf.Struct config = 3; + google.protobuf.Struct config = 3 [deprecated = true]; - // [#not-implemented-hide:] google.protobuf.Any typed_config = 4; } } diff --git a/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto b/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto index 440188ef..b6da80c6 100644 --- a/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto +++ b/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto @@ -410,9 +410,8 @@ message HttpFilter { // Filter specific configuration which depends on the filter being instantiated. See the supported // filters for further documentation. oneof config_type { - google.protobuf.Struct config = 2; + google.protobuf.Struct config = 2 [deprecated = true]; - // [#not-implemented-hide:] google.protobuf.Any typed_config = 4; } diff --git a/envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.proto b/envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.proto index 7d17a6aa..4887bc11 100644 --- a/envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.proto +++ b/envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.proto @@ -95,9 +95,8 @@ message ThriftFilter { // Filter specific configuration which depends on the filter being instantiated. See the supported // filters for further documentation. oneof config_type { - google.protobuf.Struct config = 2; + google.protobuf.Struct config = 2 [deprecated = true]; - // [#not-implemented-hide:] google.protobuf.Any typed_config = 3; } } diff --git a/envoy/config/metrics/v2/stats.proto b/envoy/config/metrics/v2/stats.proto index 1cd4b146..3bd20540 100644 --- a/envoy/config/metrics/v2/stats.proto +++ b/envoy/config/metrics/v2/stats.proto @@ -33,9 +33,8 @@ message StatsSink { // Stats sink specific configuration which depends on the sink being instantiated. See // :ref:`StatsdSink ` for an example. oneof config_type { - google.protobuf.Struct config = 2; + google.protobuf.Struct config = 2 [deprecated = true]; - // [#not-implemented-hide:] google.protobuf.Any typed_config = 3; } } diff --git a/envoy/config/overload/v2alpha/overload.proto b/envoy/config/overload/v2alpha/overload.proto index cbb34e17..a22b1679 100644 --- a/envoy/config/overload/v2alpha/overload.proto +++ b/envoy/config/overload/v2alpha/overload.proto @@ -30,9 +30,8 @@ message ResourceMonitor { // Configuration for the resource monitor being instantiated. oneof config_type { - google.protobuf.Struct config = 2; + google.protobuf.Struct config = 2 [deprecated = true]; - // [#not-implemented-hide:] google.protobuf.Any typed_config = 3; } } diff --git a/envoy/config/trace/v2/trace.proto b/envoy/config/trace/v2/trace.proto index 058bc99b..607ce7e6 100644 --- a/envoy/config/trace/v2/trace.proto +++ b/envoy/config/trace/v2/trace.proto @@ -41,9 +41,8 @@ message Tracing { // - :ref:`DynamicOtConfig ` // - :ref:`DatadogConfig ` oneof config_type { - google.protobuf.Struct config = 2; + google.protobuf.Struct config = 2 [deprecated = true]; - // [#not-implemented-hide:] google.protobuf.Any typed_config = 3; } }