api: xDS API version specifier (#9468)

It enables to specify API versioning for xDS for #8421, allow to write like this config

eds_cluster_config:
    eds_config:
       version: V2
       api_config_source:
          api_type: GRPC
	  grpc_services:
            envoy_grpc:
               cluster_name: eds_cluster

Risk Level: Low
Testing: unit test(maybe it is needed to add integration test)

Signed-off-by: shikugawa <rei@tetrate.io>

Mirrored from https://github.com/envoyproxy/envoy @ e3717b54b8d91d1862b096f73efbe96086862183
master-ci-test
data-plane-api(CircleCI) 5 years ago
parent dac5cc0fba
commit b63170034a
  1. 17
      envoy/api/v2/core/config_source.proto
  2. 17
      envoy/api/v3alpha/core/config_source.proto

@ -103,8 +103,20 @@ message RateLimitSettings {
// <arch_overview_service_discovery>` etc. may either be sourced from the
// filesystem or from an xDS API source. Filesystem configs are watched with
// inotify for updates.
// [#next-free-field: 6]
// [#next-free-field: 7]
message ConfigSource {
enum XdsApiVersion {
// use for describing explicitly that xDS API version is set automatically. In default, xDS API
// version is V2
AUTO = 0;
// use xDS v2 API
V2 = 1;
// use xDS v3alpha API
V3ALPHA = 2;
}
oneof config_source_specifier {
option (validate.required) = true;
@ -150,4 +162,7 @@ message ConfigSource {
// means no timeout - Envoy will wait indefinitely for the first xDS config (unless another
// timeout applies). The default is 15s.
google.protobuf.Duration initial_fetch_timeout = 4;
// API version for xDS endpoint
XdsApiVersion xds_api_version = 6;
}

@ -113,10 +113,22 @@ message RateLimitSettings {
// <arch_overview_service_discovery>` etc. may either be sourced from the
// filesystem or from an xDS API source. Filesystem configs are watched with
// inotify for updates.
// [#next-free-field: 6]
// [#next-free-field: 7]
message ConfigSource {
option (udpa.annotations.versioning).previous_message_type = "envoy.api.v2.core.ConfigSource";
enum XdsApiVersion {
// use for describing explicitly that xDS API version is set automatically. In default, xDS API
// version is V2
AUTO = 0;
// use xDS v2 API
V2 = 1;
// use xDS v3alpha API
V3ALPHA = 2;
}
oneof config_source_specifier {
option (validate.required) = true;
@ -162,4 +174,7 @@ message ConfigSource {
// means no timeout - Envoy will wait indefinitely for the first xDS config (unless another
// timeout applies). The default is 15s.
google.protobuf.Duration initial_fetch_timeout = 4;
// API version for xDS endpoint
XdsApiVersion xds_api_version = 6;
}

Loading…
Cancel
Save