Allow empty resolver list for cares dns (#36735)

For https://github.com/istio/istio/issues/53577

I'm trying to configure DNS resolvers (specifically
`CaresDnsResolverConfig.udp_max_queries`) while using the default system
resolvers. Right now, I need to add one resolver, otherwise I get a
proto validation error.

Commit Message: Allow empty resolver list for cares dns
Additional Description:
Risk Level: low
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional [API
Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):]

Signed-off-by: Steven Jin Xuan <sjinxuan@microsoft.com>

Mirrored from https://github.com/envoyproxy/envoy @ 27083e8f153a074f6a26428f84444ce213b3fbd0
main
update-envoy[bot] 4 months ago
parent f24a5a8b6c
commit 82f7eaa7eb
  1. 3
      envoy/extensions/network/dns_resolver/cares/v3/cares_dns_resolver.proto

@ -8,7 +8,6 @@ import "envoy/config/core/v3/resolver.proto";
import "google/protobuf/wrappers.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";
@ -26,7 +25,7 @@ message CaresDnsResolverConfig {
// :ref:`use_resolvers_as_fallback<envoy_v3_api_field_extensions.network.dns_resolver.cares.v3.CaresDnsResolverConfig.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}];
repeated config.core.v3.Address resolvers = 1;
// If true use the resolvers listed in the
// :ref:`resolvers<envoy_v3_api_field_extensions.network.dns_resolver.cares.v3.CaresDnsResolverConfig.resolvers>`

Loading…
Cancel
Save