From bc055e45633a8a2463736f08a98b36f2bc6801cc Mon Sep 17 00:00:00 2001 From: "data-plane-api(Azure Pipelines)" Date: Tue, 14 Dec 2021 23:54:36 +0000 Subject: [PATCH] c-ares resolver: add option to use nameservers as fallback (#19010) Commit Message: c-ares resolver: add option to use name servers as fallback. Risk Level: low - opt in behavior Testing: existing and additional tests Docs Changes: added Release Notes: added Signed-off-by: Jose Nino Mirrored from https://github.com/envoyproxy/envoy @ b1219ef0decc22040d45fe8bf2fa86bd16ea4e3c --- .../cares/v3/cares_dns_resolver.proto | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.proto b/envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.proto index eb6c0ea7..97356624 100644 --- a/envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.proto +++ b/envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.proto @@ -19,11 +19,20 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // Configuration for c-ares DNS resolver. message CaresDnsResolverConfig { - // A list of dns resolver addresses. If specified, the DNS client library will perform resolution - // via the underlying DNS resolvers. Otherwise, the default system resolvers - // (e.g., /etc/resolv.conf) will be used. + // A list of dns resolver addresses. + // :ref:`use_resolvers_as_fallback` + // below dictates if the DNS client should override system defaults or only use the provided + // resolvers if the system defaults are not available, i.e., as a fallback. repeated config.core.v3.Address resolvers = 1 [(validate.rules).repeated = {min_items: 1}]; + // If true use the resolvers listed in the + // :ref:`resolvers` + // field only if c-ares is unable to obtain a + // nameserver from the system (e.g., /etc/resolv.conf). + // Otherwise, the resolvers listed in the resolvers list will override the default system + // resolvers. Defaults to false. + bool use_resolvers_as_fallback = 3; + // Configuration of DNS resolver option flags which control the behavior of the DNS resolver. config.core.v3.DnsResolverOptions dns_resolver_options = 2; }