Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
7046a2c
This is the code change for refactoring Envoy DNS resolution as first…
yanjunxiang-google Jul 25, 2021
aea3243
checking whether typed_dns_resolver_config based on typed_url not by …
yanjunxiang-google Jul 25, 2021
c1c5fc8
Adding Typed DNS resolver config Extension in dns_filter.proto
yanjunxiang-google Jul 30, 2021
6576f1c
Adding proto message for apple and cares DNS resolver
yanjunxiang-google Jul 30, 2021
1658c1b
Put cares and apple DNS resolver as extension in build file
yanjunxiang-google Jul 30, 2021
d292bb1
construct typed_dns_resolver_config in a template function
yanjunxiang-google Aug 3, 2021
31f4c73
get dns_filter code compile with typed_dns_resolver_config
yanjunxiang-google Aug 3, 2021
8fc3390
change message copy from CopyFrom to MergeFrom for efficiency
yanjunxiang-google Aug 3, 2021
eb83596
removing use_apple_api_for_dns_lookups from documents since this run …
yanjunxiang-google Aug 3, 2021
4d2f55a
fix format
yanjunxiang-google Aug 3, 2021
4363842
only copy config protobuf fields if they exists
yanjunxiang-google Aug 6, 2021
3629afb
Using Apple DNS library by default in MacOS system
yanjunxiang-google Aug 6, 2021
23c8d53
Revert "removing use_apple_api_for_dns_lookups from documents since t…
yanjunxiang-google Aug 6, 2021
7cb85ba
support default Apple DNS in MacOS and support fallback to default be…
yanjunxiang-google Aug 6, 2021
c487995
fixing comments errors
yanjunxiang-google Aug 9, 2021
cafdfce
add unit test for cluster manager
yanjunxiang-google Aug 12, 2021
7011364
Revert "checking whether typed_dns_resolver_config based on typed_url…
yanjunxiang-google Aug 12, 2021
601302f
adding test code for DNS cache impl
yanjunxiang-google Aug 13, 2021
93765c5
add test for DNS filter
yanjunxiang-google Aug 13, 2021
7db98f0
fixing integration test in dns_impl_test.cc
yanjunxiang-google Aug 13, 2021
0c27d9a
move DNS related test files to extension directory
yanjunxiang-google Aug 13, 2021
0d66904
fixing Apple DNS integration testing issue
yanjunxiang-google Aug 13, 2021
9e01e1c
moving dns_factory.h to source/common
yanjunxiang-google Aug 14, 2021
38bbb91
git pull upstream main
yanjunxiang-google Aug 14, 2021
5a388b1
remove the DNS apple cross cares options check documentation
yanjunxiang-google Aug 14, 2021
1c39827
fix target naming
yanjunxiang-google Aug 14, 2021
da77357
proto format
yanjunxiang-google Aug 14, 2021
1b0a396
proto file naming change
yanjunxiang-google Aug 14, 2021
23b6974
fixing CI error in pre_submit check
yanjunxiang-google Aug 16, 2021
1726de4
address comments
yanjunxiang-google Aug 16, 2021
9cfcb8e
fixing CI doc failure
yanjunxiang-google Aug 17, 2021
395b21a
merge upstream main
yanjunxiang-google Aug 17, 2021
81b6774
re-wording some comments
yanjunxiang-google Aug 17, 2021
84af29e
fixing CI pre_format check error
yanjunxiang-google Aug 17, 2021
0f2d3d9
Merge branch 'main' of https://github.com/envoyproxy/envoy into dns-a…
yanjunxiang-google Aug 17, 2021
cab5d81
fixing CI error: fix_format
yanjunxiang-google Aug 17, 2021
3bc187f
fixing check_format CI error
yanjunxiang-google Aug 17, 2021
37380ce
merge conflicts with commits: Dns resolve fuzz bug #17107
yanjunxiang-google Aug 17, 2021
050e123
Always include cares DNS resolver extension in Envoy build
yanjunxiang-google Aug 19, 2021
fb1766d
merge upstream main
yanjunxiang-google Aug 19, 2021
930e3ef
fix CI errors
yanjunxiang-google Aug 19, 2021
0ea1797
adding cares resolver in metadata file to get DOCs build in CI passing
yanjunxiang-google Aug 19, 2021
297a725
fixing dns_filter integration test issues
yanjunxiang-google Aug 19, 2021
3e155ed
fixing CI errors
yanjunxiang-google Aug 20, 2021
52c7255
white space causing CI failure
yanjunxiang-google Aug 20, 2021
5eb5e64
fixing macos CI clang-tidy error and macos build error
yanjunxiang-google Aug 20, 2021
4ca3763
fixing CI errors appledns_impl_test.cc failure
yanjunxiang-google Aug 21, 2021
be61bac
fixing CI error
yanjunxiang-google Aug 21, 2021
d46bf12
fix CI error
yanjunxiang-google Aug 22, 2021
ed9b4ad
fixing apple build error
yanjunxiang-google Aug 22, 2021
2e2322b
revert the last two commits
yanjunxiang-google Aug 22, 2021
34717fd
lower dns_factory.h line coverage to 80%
yanjunxiang-google Aug 22, 2021
a1ed897
addressing comments for name conventions
yanjunxiang-google Aug 23, 2021
5026b4d
merge upstream main
yanjunxiang-google Aug 24, 2021
ae0b5e2
refactoring the template function
yanjunxiang-google Aug 24, 2021
53e901b
pull upstream main
yanjunxiang-google Aug 24, 2021
66738f7
Merge branch 'dns-as-extension' of https://github.com/yanjunxiang-goo…
yanjunxiang-google Aug 24, 2021
8b29cd7
addressing comments, adding more test cases
yanjunxiang-google Aug 25, 2021
02d8fef
Merge branch 'main' of https://github.com/envoyproxy/envoy into dns-a…
yanjunxiang-google Aug 25, 2021
8953123
fixing CI errors
yanjunxiang-google Aug 25, 2021
4035236
merge upstream resolve conflicts
yanjunxiang-google Aug 25, 2021
cabd1a6
fixing CI error after merge upstream
yanjunxiang-google Aug 25, 2021
4d047a8
changing std::string to absl::string_view and refactor test code
yanjunxiang-google Aug 25, 2021
88a0731
merge upstream main
yanjunxiang-google Aug 25, 2021
b775b4e
proto format scripts
yanjunxiang-google Aug 25, 2021
c1639b9
fixing format error
yanjunxiang-google Aug 26, 2021
923011a
fix format error
yanjunxiang-google Aug 26, 2021
054ad4e
cleanup the build dependancy to move the DNS extensions out from core
yanjunxiang-google Aug 26, 2021
afff32f
Merge branch 'main' of https://github.com/envoyproxy/envoy into dns-a…
yanjunxiang-google Aug 26, 2021
78b3d16
adding unitest and fixing CI error
yanjunxiang-google Aug 27, 2021
a80c02b
adding more unit test for dns_factory, and addressing comments
yanjunxiang-google Aug 27, 2021
c5ea7d6
fixing CI issue
yanjunxiang-google Aug 27, 2021
bbb1a61
fixing white space error
yanjunxiang-google Aug 27, 2021
71d7839
remove unnessary assert
yanjunxiang-google Aug 28, 2021
76f48c8
Merge branch 'main' of https://github.com/envoyproxy/envoy into dns-a…
yanjunxiang-google Aug 30, 2021
d1468d8
addressing comments
yanjunxiang-google Sep 2, 2021
a0e1284
merge upstream main
yanjunxiang-google Sep 7, 2021
ff6200d
fixing api compat issues
yanjunxiang-google Sep 7, 2021
9a643bd
Merge branch 'main' of https://github.com/envoyproxy/envoy into dns-a…
yanjunxiang-google Sep 7, 2021
c8adfd3
Revert "fixing api compat issues"
yanjunxiang-google Sep 8, 2021
3696dc5
addressing comments
yanjunxiang-google Sep 8, 2021
6c96669
addressing comments
yanjunxiang-google Sep 9, 2021
ad98ecb
fixing format error
yanjunxiang-google Sep 9, 2021
be9ea18
addressing comments that createDnsResolver() can not be called with e…
yanjunxiang-google Sep 9, 2021
a1bbff7
Addressing documentation comments, also put apple DNS as required ext…
yanjunxiang-google Sep 9, 2021
6dd626c
put dns_resolution_config proto field as deprecated
yanjunxiang-google Sep 10, 2021
e299f44
not put dns_resolution_config in dns_filter.proto as deprecated for now
yanjunxiang-google Sep 14, 2021
a458d94
merge upstream main
yanjunxiang-google Sep 14, 2021
1361d47
addressing comments also adding dns_resolution_config deprecation in …
yanjunxiang-google Sep 14, 2021
b0d8dde
merge upstream main
yanjunxiang-google Sep 14, 2021
426aa09
Merge branch 'main' of https://github.com/envoyproxy/envoy into dns-a…
yanjunxiang-google Sep 15, 2021
e448474
removing generated_api_shadow/*
yanjunxiang-google Sep 15, 2021
19291e3
Using Utility::addressToProtobufAddress to setup address in test fun…
yanjunxiang-google Sep 15, 2021
e43ddf3
Addressing comments about documentation also just fail/throw exceptio…
yanjunxiang-google Sep 18, 2021
b1a7b78
merge upstream
yanjunxiang-google Sep 18, 2021
27280fe
fixing documenation format
yanjunxiang-google Sep 19, 2021
0ad2f17
fixing documentation
yanjunxiang-google Sep 19, 2021
de7889f
fixing documentation error
yanjunxiang-google Sep 19, 2021
3a598d1
adding ASSERT(isMainThread) in createDnsResolver
yanjunxiang-google Sep 21, 2021
b67da06
create DnsResolverFactory based on proto config, and passing it to th…
yanjunxiang-google Sep 29, 2021
d1b9570
merge upstream main
yanjunxiang-google Sep 29, 2021
c2346fc
Merge branch 'main' of https://github.com/envoyproxy/envoy into dns-a…
yanjunxiang-google Sep 29, 2021
d851cfe
fix formats
yanjunxiang-google Sep 29, 2021
6cc11f9
fixing test failure
yanjunxiang-google Sep 29, 2021
109d248
merge upstream main
yanjunxiang-google Sep 29, 2021
2ddec0c
fix format
yanjunxiang-google Sep 29, 2021
afa29a6
fix clangTidy issue
yanjunxiang-google Sep 29, 2021
c034a0d
cleaning up createDnsResolver() from dispatcher interface
yanjunxiang-google Sep 30, 2021
6ce81c8
remove unnecessary #include head file
yanjunxiang-google Sep 30, 2021
febc37d
fixing wasm_speed_test build error
yanjunxiang-google Sep 30, 2021
9baefa0
fixing CI errors
yanjunxiang-google Sep 30, 2021
8c2ac6c
run fixing format scripts
yanjunxiang-google Sep 30, 2021
e3ee969
fixing CI errors
yanjunxiang-google Sep 30, 2021
065a31f
fixing clang-tidy error
yanjunxiang-google Oct 1, 2021
a447ced
fixing macos testing issue
yanjunxiang-google Oct 1, 2021
1ba1c00
adjust line coverage due to removed code not tested any more
yanjunxiang-google Oct 1, 2021
768cf2c
Merge branch 'main' of https://github.com/envoyproxy/envoy into dns-a…
yanjunxiang-google Oct 2, 2021
addfd6c
fixing documentation
yanjunxiang-google Oct 4, 2021
bf7122c
merge upstream main
yanjunxiang-google Oct 4, 2021
0d94ed7
Adjust changes due to dns_filter changed from v3aplha to v3
yanjunxiang-google Oct 4, 2021
dc284b2
Merge branch 'main' of https://github.com/envoyproxy/envoy into dns-a…
yanjunxiang-google Oct 5, 2021
8fd2eb1
Merge branch 'main' of https://github.com/envoyproxy/envoy into dns-a…
yanjunxiang-google Oct 5, 2021
404b0e9
change method name from createDnsResolverImpl to createDnsResolver
yanjunxiang-google Oct 5, 2021
9924c2b
merge upstream main
yanjunxiang-google Oct 5, 2021
ebdfda1
fixing build issue after merge upstream
yanjunxiang-google Oct 6, 2021
e47b315
Merge branch 'main' of https://github.com/envoyproxy/envoy into dns-a…
yanjunxiang-google Oct 7, 2021
c013c63
fixing current.rst contents due to bad merge
yanjunxiang-google Oct 7, 2021
522ff6e
fixing current.rst merge issue
yanjunxiang-google Oct 7, 2021
0e743a2
merge upstream main to resolver conflicts
yanjunxiang-google Oct 7, 2021
cb37d3c
change to check isMainOrTestThread()
yanjunxiang-google Oct 7, 2021
cb104fd
fixing test issue
yanjunxiang-google Oct 7, 2021
cb69b97
adjusting test coverage numbers to address CI coverage failure
yanjunxiang-google Oct 7, 2021
c3d6e50
Merge branch 'main' of https://github.com/envoyproxy/envoy into dns-a…
yanjunxiang-google Oct 11, 2021
da637e8
resolving conflicts with upstream main
yanjunxiang-google Oct 13, 2021
02a18d1
merge upstream main to resolver conflicts in per_file_coverage
yanjunxiang-google Oct 13, 2021
f72ddd1
adding a debug log when creating Apple DNS resolver
yanjunxiang-google Oct 14, 2021
83027cc
Merge branch 'main' of https://github.com/envoyproxy/envoy into dns-a…
yanjunxiang-google Oct 14, 2021
1d46667
fixing current.rst merging issue
yanjunxiang-google Oct 14, 2021
2a7c60f
adjusting per_file_coverage numbers based on test results
yanjunxiang-google Oct 14, 2021
b4470d1
dns-as-extension
yanjunxiang-google Oct 14, 2021
8fbc51a
Merge branch 'main' of https://github.com/envoyproxy/envoy into dns-a…
yanjunxiang-google Oct 14, 2021
d7a9faa
Adding #ifdef __APPLE__ to flag build file issue if apple DNS resolv…
yanjunxiang-google Oct 14, 2021
b49db1b
fixing macOS integration test failure
yanjunxiang-google Oct 15, 2021
8757f5f
bump up dns_resolver test coverage number
yanjunxiang-google Oct 15, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ extensions/filters/http/oauth2 @rgs1 @derekargueta @snowp
/*/extensions/matching/input_matchers/ip @aguinet @snowp
# Key Value store
/*/extensions/key_value @alyssawilk @ryantheoptimist
# DNS Resolver
/*/extensions/network/dns_resolver/cares @junr03 @yanavlasov
/*/extensions/network/dns_resolver/apple @junr03 @yanavlasov

# Contrib
/contrib/exe/ @mattklein123 @lizan
Expand Down
2 changes: 2 additions & 0 deletions api/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ proto_library(
"//envoy/extensions/matching/common_inputs/environment_variable/v3:pkg",
"//envoy/extensions/matching/input_matchers/consistent_hashing/v3:pkg",
"//envoy/extensions/matching/input_matchers/ip/v3:pkg",
"//envoy/extensions/network/dns_resolver/apple/v3:pkg",
"//envoy/extensions/network/dns_resolver/cares/v3:pkg",
"//envoy/extensions/network/socket_interface/v3:pkg",
"//envoy/extensions/quic/crypto_stream/v3:pkg",
"//envoy/extensions/quic/proof_source/v3:pkg",
Expand Down
26 changes: 11 additions & 15 deletions api/envoy/config/bootstrap/v3/bootstrap.proto
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,6 @@ message Bootstrap {
// when :ref:`dns_resolvers <envoy_v3_api_field_config.cluster.v3.Cluster.dns_resolvers>` and
// :ref:`use_tcp_for_dns_lookups <envoy_v3_api_field_config.cluster.v3.Cluster.use_tcp_for_dns_lookups>` are
// specified.
// Setting this value causes failure if the
// ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during
// server startup. Apple' API only uses UDP for DNS resolution.
// This field is deprecated in favor of *dns_resolution_config*
// which aggregates all of the DNS resolver configuration in a single message.
bool use_tcp_for_dns_lookups = 20
Expand All @@ -260,23 +257,22 @@ message Bootstrap {
// This may be overridden on a per-cluster basis in cds_config, when
// :ref:`dns_resolution_config <envoy_v3_api_field_config.cluster.v3.Cluster.dns_resolution_config>`
// is specified.
// *dns_resolution_config* will be deprecated once
// :ref:'typed_dns_resolver_config <envoy_v3_api_field_config.bootstrap.v3.Bootstrap.typed_dns_resolver_config>'
// is fully supported.
core.v3.DnsResolutionConfig dns_resolution_config = 30;
// This field is deprecated in favor of
// :ref:`typed_dns_resolver_config <envoy_v3_api_field_config.bootstrap.v3.Bootstrap.typed_dns_resolver_config>`.
core.v3.DnsResolutionConfig dns_resolution_config = 30
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];

// DNS resolver type configuration extension. This extension can be used to configure c-ares, apple,
// or any other DNS resolver types and the related parameters.
// For example, an object of :ref:`DnsResolutionConfig <envoy_v3_api_msg_config.core.v3.DnsResolutionConfig>`
// can be packed into this *typed_dns_resolver_config*. This configuration will replace the
// :ref:'dns_resolution_config <envoy_v3_api_field_config.bootstrap.v3.Bootstrap.dns_resolution_config>'
// configuration eventually.
// TODO(yanjunxiang): Investigate the deprecation plan for *dns_resolution_config*.
// For example, an object of
// :ref:`CaresDnsResolverConfig <envoy_v3_api_msg_extensions.network.dns_resolver.cares.v3.CaresDnsResolverConfig>`
// can be packed into this *typed_dns_resolver_config*. This configuration replaces the
// :ref:`dns_resolution_config <envoy_v3_api_field_config.bootstrap.v3.Bootstrap.dns_resolution_config>`
// configuration.
// During the transition period when both *dns_resolution_config* and *typed_dns_resolver_config* exists,
// this configuration is optional.
// When *typed_dns_resolver_config* is in place, Envoy will use it and ignore *dns_resolution_config*.
// when *typed_dns_resolver_config* is in place, Envoy will use it and ignore *dns_resolution_config*.
// When *typed_dns_resolver_config* is missing, the default behavior is in place.
// [#not-implemented-hide:]
// [#extension-category: envoy.network.dns_resolver]
core.v3.TypedExtensionConfig typed_dns_resolver_config = 31;

// Specifies optional bootstrap extensions to be instantiated at startup time.
Expand Down
29 changes: 11 additions & 18 deletions api/envoy/config/cluster/v3/cluster.proto
Original file line number Diff line number Diff line change
Expand Up @@ -900,41 +900,34 @@ message Cluster {
// :ref:`STRICT_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.STRICT_DNS>`
// and :ref:`LOGICAL_DNS<envoy_v3_api_enum_value_config.cluster.v3.Cluster.DiscoveryType.LOGICAL_DNS>`
// this setting is ignored.
// Setting this value causes failure if the
// ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during
// server startup. Apple's API only allows overriding DNS resolvers via system settings.
// This field is deprecated in favor of *dns_resolution_config*
// which aggregates all of the DNS resolver configuration in a single message.
repeated core.v3.Address dns_resolvers = 18
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];

// Always use TCP queries instead of UDP queries for DNS lookups.
// Setting this value causes failure if the
// ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during
// server startup. Apple' API only uses UDP for DNS resolution.
// This field is deprecated in favor of *dns_resolution_config*
// which aggregates all of the DNS resolver configuration in a single message.
bool use_tcp_for_dns_lookups = 45
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];

// DNS resolution configuration which includes the underlying dns resolver addresses and options.
// *dns_resolution_config* will be deprecated once
// :ref:'typed_dns_resolver_config <envoy_v3_api_field_config.cluster.v3.Cluster.typed_dns_resolver_config>'
// is fully supported.
core.v3.DnsResolutionConfig dns_resolution_config = 53;
// This field is deprecated in favor of
// :ref:`typed_dns_resolver_config <envoy_v3_api_field_config.cluster.v3.Cluster.typed_dns_resolver_config>`.
core.v3.DnsResolutionConfig dns_resolution_config = 53
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];

// DNS resolver type configuration extension. This extension can be used to configure c-ares, apple,
// or any other DNS resolver types and the related parameters.
// For example, an object of :ref:`DnsResolutionConfig <envoy_v3_api_msg_config.core.v3.DnsResolutionConfig>`
// can be packed into this *typed_dns_resolver_config*. This configuration will replace the
// :ref:'dns_resolution_config <envoy_v3_api_field_config.cluster.v3.Cluster.dns_resolution_config>'
// configuration eventually.
// TODO(yanjunxiang): Investigate the deprecation plan for *dns_resolution_config*.
// For example, an object of
// :ref:`CaresDnsResolverConfig <envoy_v3_api_msg_extensions.network.dns_resolver.cares.v3.CaresDnsResolverConfig>`
// can be packed into this *typed_dns_resolver_config*. This configuration replaces the
// :ref:`dns_resolution_config <envoy_v3_api_field_config.cluster.v3.Cluster.dns_resolution_config>`
// configuration.
// During the transition period when both *dns_resolution_config* and *typed_dns_resolver_config* exists,
// this configuration is optional.
// When *typed_dns_resolver_config* is in place, Envoy will use it and ignore *dns_resolution_config*.
// when *typed_dns_resolver_config* is in place, Envoy will use it and ignore *dns_resolution_config*.
// When *typed_dns_resolver_config* is missing, the default behavior is in place.
// [#not-implemented-hide:]
// [#extension-category: envoy.network.dns_resolver]
core.v3.TypedExtensionConfig typed_dns_resolver_config = 55;

// Optional configuration for having cluster readiness block on warm-up. Currently, only applicable for
Expand Down
6 changes: 0 additions & 6 deletions api/envoy/config/core/v3/resolver.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
// Configuration of DNS resolver option flags which control the behavior of the DNS resolver.
message DnsResolverOptions {
// Use TCP for all DNS queries instead of the default protocol UDP.
// Setting this value causes failure if the
// ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during
// server startup. Apple's API only uses UDP for DNS resolution.
bool use_tcp_for_dns_lookups = 1;

// Do not use the default search domains; only query hostnames as-is or as aliases.
Expand All @@ -31,9 +28,6 @@ message DnsResolutionConfig {
// 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.
// Setting this value causes failure if the
// ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during
// server startup. Apple's API only allows overriding DNS resolvers via system settings.
repeated Address resolvers = 1 [(validate.rules).repeated = {min_items: 1}];

// Configuration of DNS resolver option flags which control the behavior of the DNS resolver.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,32 +97,28 @@ message DnsCacheConfig {
DnsCacheCircuitBreakers dns_cache_circuit_breaker = 7;

// Always use TCP queries instead of UDP queries for DNS lookups.
// Setting this value causes failure if the
// ``envoy.restart_features.use_apple_api_for_dns_lookups`` runtime value is true during
// server startup. Apple' API only uses UDP for DNS resolution.
// This field is deprecated in favor of *dns_resolution_config*
// which aggregates all of the DNS resolver configuration in a single message.
bool use_tcp_for_dns_lookups = 8
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];

// DNS resolution configuration which includes the underlying dns resolver addresses and options.
// *dns_resolution_config* will be deprecated once
// :ref:'typed_dns_resolver_config <envoy_v3_api_field_extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig.typed_dns_resolver_config>'
// is fully supported.
config.core.v3.DnsResolutionConfig dns_resolution_config = 9;
// This field is deprecated in favor of
// :ref:`typed_dns_resolver_config <envoy_v3_api_field_extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig.typed_dns_resolver_config>`.
config.core.v3.DnsResolutionConfig dns_resolution_config = 9
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];

// DNS resolver type configuration extension. This extension can be used to configure c-ares, apple,
// or any other DNS resolver types and the related parameters.
// For example, an object of :ref:`DnsResolutionConfig <envoy_v3_api_msg_config.core.v3.DnsResolutionConfig>`
// can be packed into this *typed_dns_resolver_config*. This configuration will replace the
// :ref:'dns_resolution_config <envoy_v3_api_field_extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig.dns_resolution_config>'
// configuration eventually.
// TODO(yanjunxiang): Investigate the deprecation plan for *dns_resolution_config*.
// For example, an object of
// :ref:`CaresDnsResolverConfig <envoy_v3_api_msg_extensions.network.dns_resolver.cares.v3.CaresDnsResolverConfig>`
// can be packed into this *typed_dns_resolver_config*. This configuration replaces the
// :ref:`dns_resolution_config <envoy_v3_api_field_extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig.dns_resolution_config>`
// configuration.
// During the transition period when both *dns_resolution_config* and *typed_dns_resolver_config* exists,
// this configuration is optional.
// When *typed_dns_resolver_config* is in place, Envoy will use it and ignore *dns_resolution_config*.
// when *typed_dns_resolver_config* is in place, Envoy will use it and ignore *dns_resolution_config*.
// When *typed_dns_resolver_config* is missing, the default behavior is in place.
// [#not-implemented-hide:]
// [#extension-category: envoy.network.dns_resolver]
config.core.v3.TypedExtensionConfig typed_dns_resolver_config = 12;

// Hostnames that should be preresolved into the cache upon creation. This might provide a
Expand Down
16 changes: 16 additions & 0 deletions api/envoy/extensions/filters/udp/dns_filter/v3/dns_filter.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package envoy.extensions.filters.udp.dns_filter.v3;

import "envoy/config/core/v3/address.proto";
import "envoy/config/core/v3/base.proto";
import "envoy/config/core/v3/extension.proto";
import "envoy/config/core/v3/resolver.proto";
import "envoy/data/dns/v3/dns_table.proto";

Expand Down Expand Up @@ -67,8 +68,23 @@ message DnsFilterConfig {
[deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];

// DNS resolution configuration which includes the underlying dns resolver addresses and options.
// This field will be deprecated in favor of
// :ref:`typed_dns_resolver_config <envoy_v3_api_field_extensions.filters.udp.dns_filter.v3.DnsFilterConfig.ClientContextConfig.typed_dns_resolver_config>`.
config.core.v3.DnsResolutionConfig dns_resolution_config = 5;

// DNS resolver type configuration extension. This extension can be used to configure c-ares, apple,
// or any other DNS resolver types and the related parameters.
// For example, an object of
// :ref:`CaresDnsResolverConfig <envoy_v3_api_msg_extensions.network.dns_resolver.cares.v3.CaresDnsResolverConfig>`
// can be packed into this *typed_dns_resolver_config*. This configuration replaces the
// :ref:`dns_resolution_config <envoy_v3_api_field_extensions.filters.udp.dns_filter.v3.DnsFilterConfig.ClientContextConfig.dns_resolution_config>`
// configuration.
// During the transition period when both *dns_resolution_config* and *typed_dns_resolver_config* exists,
// when *typed_dns_resolver_config* is in place, Envoy will use it and ignore *dns_resolution_config*.
// When *typed_dns_resolver_config* is missing, the default behavior is in place.
// [#extension-category: envoy.network.dns_resolver]
config.core.v3.TypedExtensionConfig typed_dns_resolver_config = 4;

// Controls how many outstanding external lookup contexts the filter tracks.
// The context structure allows the filter to respond to every query even if the external
// resolution times out or is otherwise unsuccessful
Expand Down
9 changes: 9 additions & 0 deletions api/envoy/extensions/network/dns_resolver/apple/v3/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.

load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")

licenses(["notice"]) # Apache 2

api_proto_package(
deps = ["@com_github_cncf_udpa//udpa/annotations:pkg"],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
syntax = "proto3";

package envoy.extensions.network.dns_resolver.apple.v3;

import "udpa/annotations/status.proto";

option java_package = "io.envoyproxy.envoy.extensions.network.dns_resolver.apple.v3";
option java_outer_classname = "AppleDnsResolverProto";
option java_multiple_files = true;
option (udpa.annotations.file_status).package_version_status = ACTIVE;

// [#protodoc-title: apple DNS resolver]
// [#extension: envoy.network.dns_resolver.apple]

// Configuration for apple DNS resolver.
message AppleDnsResolverConfig {
}
12 changes: 12 additions & 0 deletions api/envoy/extensions/network/dns_resolver/cares/v3/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.

load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")

licenses(["notice"]) # Apache 2

api_proto_package(
deps = [
"//envoy/config/core/v3:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
syntax = "proto3";

package envoy.extensions.network.dns_resolver.cares.v3;

import "envoy/config/core/v3/address.proto";
import "envoy/config/core/v3/resolver.proto";

import "udpa/annotations/status.proto";
import "validate/validate.proto";

option java_package = "io.envoyproxy.envoy.extensions.network.dns_resolver.cares.v3";
option java_outer_classname = "CaresDnsResolverProto";
option java_multiple_files = true;
option (udpa.annotations.file_status).package_version_status = ACTIVE;

// [#protodoc-title: c-ares DNS resolver]
// [#extension: envoy.network.dns_resolver.cares]

// 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.
repeated config.core.v3.Address resolvers = 1 [(validate.rules).repeated = {min_items: 1}];

// Configuration of DNS resolver option flags which control the behavior of the DNS resolver.
config.core.v3.DnsResolverOptions dns_resolver_options = 2;
}
2 changes: 2 additions & 0 deletions api/versioning/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ proto_library(
"//envoy/extensions/matching/common_inputs/environment_variable/v3:pkg",
"//envoy/extensions/matching/input_matchers/consistent_hashing/v3:pkg",
"//envoy/extensions/matching/input_matchers/ip/v3:pkg",
"//envoy/extensions/network/dns_resolver/apple/v3:pkg",
"//envoy/extensions/network/dns_resolver/cares/v3:pkg",
"//envoy/extensions/network/socket_interface/v3:pkg",
"//envoy/extensions/quic/crypto_stream/v3:pkg",
"//envoy/extensions/quic/proof_source/v3:pkg",
Expand Down
2 changes: 1 addition & 1 deletion ci/mac_ci_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ fi
bazel test "${BAZEL_BUILD_OPTIONS[@]}" "${TEST_TARGETS[@]}"

# Additionally run macOS specific test suites
bazel test "${BAZEL_BUILD_OPTIONS[@]}" //test/common/network:apple_dns_impl_test
bazel test "${BAZEL_BUILD_OPTIONS[@]}" //test/extensions/network/dns_resolver/apple:apple_dns_impl_test
2 changes: 2 additions & 0 deletions ci/osx-build-config/extensions_build_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ EXTENSIONS = {
"envoy.stat_sinks.metrics_service": "//source/extensions/stat_sinks/metrics_service:config",
"envoy.transport_sockets.raw_buffer": "//source/extensions/transport_sockets/raw_buffer:config",
"envoy.transport_sockets.tls": "//source/extensions/transport_sockets/tls:config",
"envoy.network.dns_resolver.cares": "//source/extensions/network/dns_resolver/cares:config",
"envoy.network.dns_resolver.apple": "//source/extensions/network/dns_resolver/apple:config",
}
WINDOWS_EXTENSIONS = {}
EXTENSION_CONFIG_VISIBILITY = ["//:extension_config"]
Expand Down
2 changes: 1 addition & 1 deletion ci/run_clang_tidy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function exclude_win32_impl() {
# Do not run clang-tidy against macOS impl
# TODO: We should run clang-tidy against macOS impl for completeness
function exclude_macos_impl() {
grep -v source/common/filesystem/kqueue/ | grep -v source/common/network/apple_dns_impl | grep -v test/common/network/apple_dns_impl_test
grep -v source/common/filesystem/kqueue/ | grep -v source/extensions/network/dns_resolver/apple/apple_dns_impl | grep -v test/extensions/network/dns_resolver/apple/apple_dns_impl_test
}

# Do not run incremental clang-tidy on check_format testdata files.
Expand Down
1 change: 1 addition & 0 deletions docs/root/api-v3/config/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Extensions
rbac/rbac
health_checker/health_checker
transport_socket/transport_socket
dns_resolver/dns_resolver.rst
resource_monitor/resource_monitor
common/common
compression/compression
Expand Down
8 changes: 8 additions & 0 deletions docs/root/api-v3/config/dns_resolver/dns_resolver.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
DNS Resolver
=================

.. toctree::
:glob:
:maxdepth: 2

../../extensions/network/dns_resolver/*/v3/*
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
typed_dns_resolver_config:
name: envoy.network.dns_resolver.apple
typed_config:
"@type": type.googleapis.com/envoy.extensions.network.dns_resolver.apple.v3.AppleDnsResolverConfig
Loading