diff --git a/source/common/config/BUILD b/source/common/config/BUILD index b7a0a5f14d29..7cfc645bc1cc 100644 --- a/source/common/config/BUILD +++ b/source/common/config/BUILD @@ -395,6 +395,7 @@ envoy_cc_library( "//source/common/stats:stats_lib", "//source/common/stats:stats_matcher_lib", "//source/common/stats:tag_producer_lib", + "//source/common/version:api_version_lib", "@com_github_cncf_udpa//udpa/type/v1:pkg_cc_proto", "@com_github_cncf_udpa//xds/type/v3:pkg_cc_proto", "@envoy_api//envoy/config/bootstrap/v3:pkg_cc_proto", diff --git a/source/common/config/utility.h b/source/common/config/utility.h index 80bbdc69e587..e9453e28f966 100644 --- a/source/common/config/utility.h +++ b/source/common/config/utility.h @@ -29,6 +29,8 @@ #include "source/common/protobuf/utility.h" #include "source/common/runtime/runtime_features.h" #include "source/common/singleton/const_singleton.h" +#include "source/common/version/api_version.h" +#include "source/common/version/api_version_struct.h" #include "udpa/type/v1/typed_struct.pb.h" #include "xds/type/v3/typed_struct.pb.h" @@ -198,12 +200,13 @@ class Utility { if (transport_api_version == envoy::config::core::v3::ApiVersion::AUTO || transport_api_version == envoy::config::core::v3::ApiVersion::V2) { Runtime::LoaderSingleton::getExisting()->countDeprecatedFeatureUse(); + const ApiVersion version = ApiVersionInfo::apiVersion(); const std::string& warning = fmt::format( "V2 (and AUTO) xDS transport protocol versions are deprecated in {}. " - "The v2 xDS major version is deprecated and disabled by default. Support for v2 will be " - "removed from Envoy at the start of Q1 2021. You may make use of v2 in Q4 2020 by " - "following the advice in https://www.envoyproxy.io/docs/envoy/latest/faq/api/transition.", - api_config_source.DebugString()); + "The v2 xDS major version has been removed and is no longer supported. " + "You may be missing explicit V3 configuration of the transport API version, " + "see the advice in https://www.envoyproxy.io/docs/envoy/v{}.{}.{}/faq/api/envoy_v3.", + api_config_source.DebugString(), version.major, version.minor, version.patch); ENVOY_LOG_MISC(warn, warning); throw DeprecatedMajorVersionException(warning); }