-
Notifications
You must be signed in to change notification settings - Fork 859
[API Proposal]: Choose specific AddressFamily to resolve / allow disable ipv6 address resolution in service discovery dns resolver #7437
Copy link
Copy link
Open
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementationarea-telemetryuntriaged
Description
Background and motivation
By using service discovery within a kubernetes cluster (with DnsServiceEndpointProvider) we have a lot of warnings for Query AAAA xxx-service.default.svc.cluster.local on 11.0.0.10:53 attempt 1: no data matching given query type. which is "ok" because no ipv6 is provided / enabled by kubernetes cluster.
API Proposal
public class DnsResolverOptions
{
+ /// <summary>
+ /// Gets or sets family address that will be resolved.
+ /// </summary>
+ /// <remarks>
+ /// Only <see="AddressFamily.InterNetwork" /> and / or <see="AddressFamily.InterNetworkV6" /> can be used.
+ /// </remarks>
+ public AddressFamily[]? AddressFamilies { get; set; }
}cons: user must know what address family can set, so it can set wrong values which need to be checked.
or
public class DnsResolverOptions
{
+ /// <summary>
+ /// Gets or sets whether the IPV6 address will be resolved or not.
+ /// </summary>
+ public bool DisableIPV6AddressResolution { get; set; }
}more explicit, the IPV4 is always resolved.
API Usage
.ConfigureDnsResolver(options =>
{
// Disable IPV6 address resolution not provided by kubernetes
options.AddressFamilies = [AddressFamily.InterNetwork];
// or
options.DisableIPV6AddressResolution = true;
})Alternative Designs
No response
Risks
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementationarea-telemetryuntriaged