Repository navigation
Conversation
Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
dns_sd_configsschema validation,/etc/resolv.confsearch path andndotsresolution, record-to-TargetGroupmapping (SRV,A,AAAA,MX,NS), and an async UDP/EDNS0 + TCP fallback DNS wire resolver underfeature = "discovery". Part of prometheus/scrape.rs#36.Stack:
discovery: add TargetGroup, StaticConfig, and Prometheus duration helpersdiscovery/dns: add DNS service discovery (dns_sd_configs)(this PR)http_config: add Prometheus HTTPClientConfig and reqwest client builderdiscovery/kubernetes: add pod service discovery (role: pod)Commits in reading order:
discovery/dns: add DnsSdConfig, ResolvConf, and target group mappingdiscovery/dns: add async UDP/EDNS0 and TCP wire resolverIntentional differences from Go
DnsDiscoveryimplements a minimal RFC 1035 and RFC 6891 EDNS0 UDP/TCP wire codec directly overtokio::net::{UdpSocket, TcpStream}instead of adding an external DNS dependency equivalent tomiekg/dnsin discovery/dns/dns.go#L27 and discovery/dns/dns.go#L292. Futures require noSendbounds and run on!Sendtokio::task::LocalSetexecutors.DnsDiscovery::discoverexecutes one discovery poll cycle returningResult<Vec<TargetGroup>, DiscoveryError>rather than spawning an internal refresh loop as in discovery/dns/dns.go#L121, leaving scheduling to the caller.