api: add google.protobuf.Any for opaque configs (#4739)

API for #4475.

Risk Level: Low (not implemented)
Testing: CI
Docs Changes: Added but hided
Release Notes: N/A, will add when adding impl.

Signed-off-by: Lizan Zhou <lizan@tetrate.io>

Mirrored from https://github.com/envoyproxy/envoy @ 45a460fabf34698a875060482de96f7f618bdc9f
pull/620/head
data-plane-api(CircleCI) 6 years ago
parent 66bfcd6efa
commit 3fdb1a99c5
  1. 10
      envoy/api/v2/cds.proto
  2. 8
      envoy/api/v2/core/base.proto
  3. 8
      envoy/api/v2/core/grpc_service.proto
  4. 8
      envoy/api/v2/core/health_check.proto
  5. 18
      envoy/api/v2/listener/listener.proto
  6. 45
      envoy/api/v2/route/route.proto
  7. 12
      envoy/config/filter/accesslog/v2/accesslog.proto
  8. 12
      envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto
  9. 12
      envoy/config/filter/network/thrift_proxy/v2alpha1/thrift_proxy.proto
  10. 13
      envoy/config/metrics/v2/stats.proto
  11. 8
      envoy/config/overload/v2alpha/overload.proto
  12. 12
      envoy/config/trace/v2/trace.proto

@ -17,6 +17,7 @@ import "envoy/api/v2/eds.proto";
import "envoy/type/percent.proto"; import "envoy/type/percent.proto";
import "google/api/annotations.proto"; import "google/api/annotations.proto";
import "google/protobuf/any.proto";
import "google/protobuf/duration.proto"; import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto"; import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto"; import "google/protobuf/wrappers.proto";
@ -46,7 +47,7 @@ service ClusterDiscoveryService {
// [#protodoc-title: Clusters] // [#protodoc-title: Clusters]
// Configuration for a single upstream cluster. // Configuration for a single upstream cluster.
// [#comment:next free field: 36] // [#comment:next free field: 37]
message Cluster { message Cluster {
// Supplies the name of the cluster which must be unique across all clusters. // Supplies the name of the cluster which must be unique across all clusters.
// The cluster name is used when emitting // The cluster name is used when emitting
@ -232,6 +233,13 @@ message Cluster {
// specific options. // specific options.
map<string, google.protobuf.Struct> extension_protocol_options = 35; map<string, google.protobuf.Struct> extension_protocol_options = 35;
// [#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
// specific options.
map<string, google.protobuf.Any> typed_extension_protocol_options = 36;
reserved 15; reserved 15;
// If the DNS refresh rate is specified and the cluster type is either // If the DNS refresh rate is specified and the cluster type is either

@ -3,6 +3,7 @@ syntax = "proto3";
package envoy.api.v2.core; package envoy.api.v2.core;
option go_package = "core"; option go_package = "core";
import "google/protobuf/any.proto";
import "google/protobuf/struct.proto"; import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto"; import "google/protobuf/wrappers.proto";
@ -186,7 +187,12 @@ message TransportSocket {
// Implementation specific configuration which depends on the implementation being instantiated. // Implementation specific configuration which depends on the implementation being instantiated.
// See the supported transport socket implementations for further documentation. // See the supported transport socket implementations for further documentation.
google.protobuf.Struct config = 2; oneof config_type {
google.protobuf.Struct config = 2;
// [#not-implemented-hide:]
google.protobuf.Any typed_config = 3;
}
} }
// Generic socket option message. This would be used to set socket options that // Generic socket option message. This would be used to set socket options that

@ -4,6 +4,7 @@ package envoy.api.v2.core;
import "envoy/api/v2/core/base.proto"; import "envoy/api/v2/core/base.proto";
import "google/protobuf/any.proto";
import "google/protobuf/duration.proto"; import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto"; import "google/protobuf/struct.proto";
import "google/protobuf/empty.proto"; import "google/protobuf/empty.proto";
@ -78,7 +79,12 @@ message GrpcService {
message MetadataCredentialsFromPlugin { message MetadataCredentialsFromPlugin {
string name = 1; string name = 1;
google.protobuf.Struct config = 2; oneof config_type {
google.protobuf.Struct config = 2;
// [#not-implemented-hide:]
google.protobuf.Any typed_config = 3;
}
} }
oneof credential_specifier { oneof credential_specifier {

@ -4,6 +4,7 @@ package envoy.api.v2.core;
import "envoy/api/v2/core/base.proto"; import "envoy/api/v2/core/base.proto";
import "google/protobuf/any.proto";
import "google/protobuf/duration.proto"; import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto"; import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto"; import "google/protobuf/wrappers.proto";
@ -154,7 +155,12 @@ message HealthCheck {
// A custom health checker specific configuration which depends on the custom health checker // A custom health checker specific configuration which depends on the custom health checker
// being instantiated. See :api:`envoy/config/health_checker` for reference. // being instantiated. See :api:`envoy/config/health_checker` for reference.
google.protobuf.Struct config = 2; oneof config_type {
google.protobuf.Struct config = 2;
// [#not-implemented-hide:]
google.protobuf.Any typed_config = 3;
}
} }
oneof health_checker { oneof health_checker {

@ -8,6 +8,7 @@ import "envoy/api/v2/core/address.proto";
import "envoy/api/v2/auth/cert.proto"; import "envoy/api/v2/auth/cert.proto";
import "envoy/api/v2/core/base.proto"; import "envoy/api/v2/core/base.proto";
import "google/protobuf/any.proto";
import "google/protobuf/struct.proto"; import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto"; import "google/protobuf/wrappers.proto";
@ -35,8 +36,12 @@ message Filter {
// Filter specific configuration which depends on the filter being // Filter specific configuration which depends on the filter being
// instantiated. See the supported filters for further documentation. // instantiated. See the supported filters for further documentation.
google.protobuf.Struct config = 2; oneof config_type {
google.protobuf.Struct config = 2;
// [#not-implemented-hide:]
google.protobuf.Any typed_config = 4;
}
// [#not-implemented-hide:] // [#not-implemented-hide:]
message DeprecatedV1 { message DeprecatedV1 {
string type = 1; string type = 1;
@ -191,7 +196,12 @@ message ListenerFilter {
// * :ref:`envoy.listener.tls_inspector <config_listener_filters_tls_inspector>` // * :ref:`envoy.listener.tls_inspector <config_listener_filters_tls_inspector>`
string name = 1 [(validate.rules).string.min_bytes = 1]; string name = 1 [(validate.rules).string.min_bytes = 1];
// Filter specific configuration which depends on the filter being // Filter specific configuration which depends on the filter being instantiated.
// instantiated. See the supported filters for further documentation. // See the supported filters for further documentation.
google.protobuf.Struct config = 2; oneof config_type {
google.protobuf.Struct config = 2;
// [#not-implemented-hide:]
google.protobuf.Any typed_config = 3;
}
} }

@ -7,6 +7,7 @@ option java_generic_services = true;
import "envoy/api/v2/core/base.proto"; import "envoy/api/v2/core/base.proto";
import "envoy/type/range.proto"; import "envoy/type/range.proto";
import "google/protobuf/any.proto";
import "google/protobuf/duration.proto"; import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto"; import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto"; import "google/protobuf/wrappers.proto";
@ -25,7 +26,7 @@ option (gogoproto.equal_all) = true;
// host header. This allows a single listener to service multiple top level domain path trees. Once // host header. This allows a single listener to service multiple top level domain path trees. Once
// a virtual host is selected based on the domain, the routes are processed in order to see which // a virtual host is selected based on the domain, the routes are processed in order to see which
// upstream cluster to route to or whether to perform a redirect. // upstream cluster to route to or whether to perform a redirect.
// [#comment:next free field: 15] // [#comment:next free field: 16]
message VirtualHost { message VirtualHost {
// The logical name of the virtual host. This is used when emitting certain // The logical name of the virtual host. This is used when emitting certain
// statistics but is not relevant for routing. // statistics but is not relevant for routing.
@ -112,6 +113,14 @@ message VirtualHost {
// for if and how it is utilized. // for if and how it is utilized.
map<string, google.protobuf.Struct> per_filter_config = 12; map<string, google.protobuf.Struct> per_filter_config = 12;
// [#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
// specific; see the :ref:`HTTP filter documentation <config_http_filters>`
// for if and how it is utilized.
map<string, google.protobuf.Any> typed_per_filter_config = 15;
// Decides whether the :ref:`x-envoy-attempt-count // Decides whether the :ref:`x-envoy-attempt-count
// <config_http_filters_router_x-envoy-attempt-count>` header should be included // <config_http_filters_router_x-envoy-attempt-count>` header should be included
// in the upstream request. Setting this option will cause it to override any existing header // in the upstream request. Setting this option will cause it to override any existing header
@ -130,7 +139,7 @@ message VirtualHost {
// //
// Envoy supports routing on HTTP method via :ref:`header matching // Envoy supports routing on HTTP method via :ref:`header matching
// <envoy_api_msg_route.HeaderMatcher>`. // <envoy_api_msg_route.HeaderMatcher>`.
// [#comment:next free field: 13] // [#comment:next free field: 14]
message Route { message Route {
// Route matching parameters. // Route matching parameters.
RouteMatch match = 1 [(validate.rules).message.required = true, (gogoproto.nullable) = false]; RouteMatch match = 1 [(validate.rules).message.required = true, (gogoproto.nullable) = false];
@ -167,6 +176,14 @@ message Route {
// if and how it is utilized. // if and how it is utilized.
map<string, google.protobuf.Struct> per_filter_config = 8; map<string, google.protobuf.Struct> per_filter_config = 8;
// [#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
// specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
// if and how it is utilized.
map<string, google.protobuf.Any> typed_per_filter_config = 13;
// Specifies a set of headers that will be added to requests matching this // Specifies a set of headers that will be added to requests matching this
// route. Headers specified at this level are applied before headers from the // route. Headers specified at this level are applied before headers from the
// enclosing :ref:`envoy_api_msg_route.VirtualHost` and // enclosing :ref:`envoy_api_msg_route.VirtualHost` and
@ -200,7 +217,7 @@ message Route {
// multiple upstream clusters along with weights that indicate the percentage of // multiple upstream clusters along with weights that indicate the percentage of
// traffic to be forwarded to each cluster. The router selects an upstream cluster based on the // traffic to be forwarded to each cluster. The router selects an upstream cluster based on the
// weights. // weights.
// [#comment:next free field: 10] // [#comment:next free field: 11]
message WeightedCluster { message WeightedCluster {
message ClusterWeight { message ClusterWeight {
// Name of the upstream cluster. The cluster must exist in the // Name of the upstream cluster. The cluster must exist in the
@ -256,6 +273,14 @@ message WeightedCluster {
// specific; see the :ref:`HTTP filter documentation <config_http_filters>` // specific; see the :ref:`HTTP filter documentation <config_http_filters>`
// for if and how it is utilized. // for if and how it is utilized.
map<string, google.protobuf.Struct> per_filter_config = 8; map<string, google.protobuf.Struct> per_filter_config = 8;
// [#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
// specific; see the :ref:`HTTP filter documentation <config_http_filters>`
// for if and how it is utilized.
map<string, google.protobuf.Any> typed_per_filter_config = 10;
} }
// Specifies one or more upstream clusters associated with the route. // Specifies one or more upstream clusters associated with the route.
@ -510,7 +535,12 @@ message RouteAction {
message RetryPriority { message RetryPriority {
string name = 1 [(validate.rules).string.min_bytes = 1]; string name = 1 [(validate.rules).string.min_bytes = 1];
google.protobuf.Struct config = 2; oneof config_type {
google.protobuf.Struct config = 2;
// [#not-implemented-hide:]
google.protobuf.Any typed_config = 3;
}
} }
// Specifies an implementation of a RetryPriority which is used to determine the // Specifies an implementation of a RetryPriority which is used to determine the
@ -520,7 +550,12 @@ message RouteAction {
message RetryHostPredicate { message RetryHostPredicate {
string name = 1 [(validate.rules).string.min_bytes = 1]; string name = 1 [(validate.rules).string.min_bytes = 1];
google.protobuf.Struct config = 2; oneof config_type {
google.protobuf.Struct config = 2;
// [#not-implemented-hide:]
google.protobuf.Any typed_config = 3;
}
} }
// Specifies a collection of RetryHostPredicates that will be consulted when selecting a host // Specifies a collection of RetryHostPredicates that will be consulted when selecting a host

@ -7,6 +7,7 @@ import "envoy/api/v2/core/base.proto";
import "envoy/api/v2/route/route.proto"; import "envoy/api/v2/route/route.proto";
import "envoy/type/percent.proto"; import "envoy/type/percent.proto";
import "google/protobuf/any.proto";
import "google/protobuf/struct.proto"; import "google/protobuf/struct.proto";
import "validate/validate.proto"; import "validate/validate.proto";
@ -24,14 +25,19 @@ message AccessLog {
// Filter which is used to determine if the access log needs to be written. // Filter which is used to determine if the access log needs to be written.
AccessLogFilter filter = 2; AccessLogFilter filter = 2;
// Custom configuration that depends on the access log being instantiated. Built-in configurations // Custom configuration that depends on the access log being instantiated. Built-in
// include: // configurations include:
// //
// #. "envoy.file_access_log": :ref:`FileAccessLog // #. "envoy.file_access_log": :ref:`FileAccessLog
// <envoy_api_msg_config.accesslog.v2.FileAccessLog>` // <envoy_api_msg_config.accesslog.v2.FileAccessLog>`
// #. "envoy.http_grpc_access_log": :ref:`HttpGrpcAccessLogConfig // #. "envoy.http_grpc_access_log": :ref:`HttpGrpcAccessLogConfig
// <envoy_api_msg_config.accesslog.v2.HttpGrpcAccessLogConfig>` // <envoy_api_msg_config.accesslog.v2.HttpGrpcAccessLogConfig>`
google.protobuf.Struct config = 3; oneof config_type {
google.protobuf.Struct config = 3;
// [#not-implemented-hide:]
google.protobuf.Any typed_config = 4;
}
} }
message AccessLogFilter { message AccessLogFilter {

@ -9,6 +9,7 @@ import "envoy/api/v2/rds.proto";
import "envoy/config/filter/accesslog/v2/accesslog.proto"; import "envoy/config/filter/accesslog/v2/accesslog.proto";
import "envoy/type/percent.proto"; import "envoy/type/percent.proto";
import "google/protobuf/any.proto";
import "google/protobuf/duration.proto"; import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto"; import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto"; import "google/protobuf/wrappers.proto";
@ -393,9 +394,14 @@ message HttpFilter {
// * :ref:`envoy.squash <config_http_filters_squash>` // * :ref:`envoy.squash <config_http_filters_squash>`
string name = 1 [(validate.rules).string.min_bytes = 1]; string name = 1 [(validate.rules).string.min_bytes = 1];
// Filter specific configuration which depends on the filter being // Filter specific configuration which depends on the filter being instantiated. See the supported
// instantiated. See the supported filters for further documentation. // filters for further documentation.
google.protobuf.Struct config = 2; oneof config_type {
google.protobuf.Struct config = 2;
// [#not-implemented-hide:]
google.protobuf.Any typed_config = 4;
}
reserved 3; reserved 3;
} }

@ -5,6 +5,7 @@ option go_package = "v2";
import "envoy/config/filter/network/thrift_proxy/v2alpha1/route.proto"; import "envoy/config/filter/network/thrift_proxy/v2alpha1/route.proto";
import "google/protobuf/any.proto";
import "google/protobuf/struct.proto"; import "google/protobuf/struct.proto";
import "validate/validate.proto"; import "validate/validate.proto";
@ -89,9 +90,14 @@ message ThriftFilter {
// * :ref:`envoy.filters.thrift.rate_limit <config_thrift_filters_rate_limit>` // * :ref:`envoy.filters.thrift.rate_limit <config_thrift_filters_rate_limit>`
string name = 1 [(validate.rules).string.min_bytes = 1]; string name = 1 [(validate.rules).string.min_bytes = 1];
// Filter specific configuration which depends on the filter being // Filter specific configuration which depends on the filter being instantiated. See the supported
// instantiated. See the supported filters for further documentation. // filters for further documentation.
google.protobuf.Struct config = 2; oneof config_type {
google.protobuf.Struct config = 2;
// [#not-implemented-hide:]
google.protobuf.Any typed_config = 3;
}
} }
// ThriftProtocolOptions specifies Thrift upstream protocol options. This object is used in // ThriftProtocolOptions specifies Thrift upstream protocol options. This object is used in

@ -9,6 +9,7 @@ option go_package = "v2";
import "envoy/api/v2/core/address.proto"; import "envoy/api/v2/core/address.proto";
import "envoy/type/matcher/string.proto"; import "envoy/type/matcher/string.proto";
import "google/protobuf/any.proto";
import "google/protobuf/struct.proto"; import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto"; import "google/protobuf/wrappers.proto";
@ -27,10 +28,14 @@ message StatsSink {
// Sinks optionally support tagged/multiple dimensional metrics. // Sinks optionally support tagged/multiple dimensional metrics.
string name = 1; string name = 1;
// Stats sink specific configuration which depends on the sink being // Stats sink specific configuration which depends on the sink being instantiated. See
// instantiated. See :ref:`StatsdSink <envoy_api_msg_config.metrics.v2.StatsdSink>` for an // :ref:`StatsdSink <envoy_api_msg_config.metrics.v2.StatsdSink>` for an example.
// example. oneof config_type {
google.protobuf.Struct config = 2; google.protobuf.Struct config = 2;
// [#not-implemented-hide:]
google.protobuf.Any typed_config = 3;
}
} }
// Statistics configuration such as tagging. // Statistics configuration such as tagging.

@ -3,6 +3,7 @@ syntax = "proto3";
package envoy.config.overload.v2alpha; package envoy.config.overload.v2alpha;
option go_package = "v2alpha"; option go_package = "v2alpha";
import "google/protobuf/any.proto";
import "google/protobuf/duration.proto"; import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto"; import "google/protobuf/struct.proto";
@ -26,7 +27,12 @@ message ResourceMonitor {
string name = 1 [(validate.rules).string.min_bytes = 1]; string name = 1 [(validate.rules).string.min_bytes = 1];
// Configuration for the resource monitor being instantiated. // Configuration for the resource monitor being instantiated.
google.protobuf.Struct config = 2; oneof config_type {
google.protobuf.Struct config = 2;
// [#not-implemented-hide:]
google.protobuf.Any typed_config = 3;
}
} }
message ThresholdTrigger { message ThresholdTrigger {

@ -8,6 +8,7 @@ option go_package = "v2";
import "envoy/api/v2/core/grpc_service.proto"; import "envoy/api/v2/core/grpc_service.proto";
import "google/protobuf/any.proto";
import "google/protobuf/struct.proto"; import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto"; import "google/protobuf/wrappers.proto";
@ -26,12 +27,17 @@ message Tracing {
// *envoy.dynamic.ot* are built-in trace drivers. // *envoy.dynamic.ot* are built-in trace drivers.
string name = 1 [(validate.rules).string.min_bytes = 1]; string name = 1 [(validate.rules).string.min_bytes = 1];
// Trace driver specific configuration which depends on the driver being // Trace driver specific configuration which depends on the driver being instantiated.
// instantiated. See the :ref:`LightstepConfig // See the :ref:`LightstepConfig
// <envoy_api_msg_config.trace.v2.LightstepConfig>`, :ref:`ZipkinConfig // <envoy_api_msg_config.trace.v2.LightstepConfig>`, :ref:`ZipkinConfig
// <envoy_api_msg_config.trace.v2.ZipkinConfig>`, and :ref:`DynamicOtConfig // <envoy_api_msg_config.trace.v2.ZipkinConfig>`, and :ref:`DynamicOtConfig
// <envoy_api_msg_config.trace.v2.DynamicOtConfig>` trace drivers for examples. // <envoy_api_msg_config.trace.v2.DynamicOtConfig>` trace drivers for examples.
google.protobuf.Struct config = 2; oneof config_type {
google.protobuf.Struct config = 2;
// [#not-implemented-hide:]
google.protobuf.Any typed_config = 3;
}
} }
// Provides configuration for the HTTP tracer. // Provides configuration for the HTTP tracer.
Http http = 1; Http http = 1;

Loading…
Cancel
Save