feat: Front Authoritative queries with dnsdist - #125
Open
mattdjenkinson wants to merge 1 commit into
Open
Conversation
PowerDNS Authoritative has no dnstap; query metering needs a Frame Stream from dnsdist. Bind dnsdist on :53, keep Auth on loopback :5301, and emit dnstap to /run/dnsdist/dnstap.sock for Vector.
Contributor
Author
|
@scotwells & @0xmc could you have a quick browse over this please? |
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.
Summary
Public DNS queries currently hit PowerDNS Authoritative, which cannot emit dnstap. The in-pod recursor can, but it only expands ALIAS records on loopback and never sees those queries. Nothing on the serving path produces a stream Vector can consume.
dnsdist now binds UDP and TCP port 53 and forwards to Authoritative on 127.0.0.1:5301. Recursor stays on 5300. The pdns-auth Service still targets port 53, so in-cluster lookups do not change.
dnsdist writes dnstap to
/run/dnsdist/dnstap.sockas a Frame Stream client. There is no listener in the pod yet. dnsdist reconnects until Vector (or another fstrm process) binds the socket. Query billing is not in this change.Writer and edge share this StatefulSet, so both get the same query path. Authoritative no longer listens on the pod IP, and it runs as uid 953 now that it does not bind a privileged port.
Test plan
dig @pdns-auth.dns-agent-system.svc.cluster.local/run/dnsdist/dnstap.sockhas no listenerNotes for reviewers
Vector still needs to listen on
/run/dnsdist/dnstap.sock. dnstap has qname, rcode, and type. It does not have a Milo project or DNSZone UID.Related to #49