Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(coredns) Add FORMERR and NOTIMP in alternate default coredns conf #2756

Merged
merged 3 commits into from
Sep 13, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
6 changes: 5 additions & 1 deletion app/kuma-dp/pkg/dataplane/dnsserver/dnsserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ type Opts struct {
Quit chan struct{}
}

// DefaultCoreFileTemplate defines the template to use to configure coreDNS to use the envoy dns filter.
const DefaultCoreFileTemplate = `.:{{ .CoreDNSPort }} {
forward . 127.0.0.1:{{ .EnvoyDNSPort }}
alternate NXDOMAIN,SERVFAIL,REFUSED . /etc/resolv.conf
# We want all requests to be sent to the Envoy DNS Filter, unsuccessful responses should be forwarded to the original DNS server.
# For example: requests other than A, AAAA and SRV will return NOTIMP when hitting the envoy filter and should be sent to the original DNS server.
# Codes from: https://github.com/miekg/dns/blob/master/msg.go#L138
alternate NOTIMP,FORMERR,NXDOMAIN,SERVFAIL,REFUSED . /etc/resolv.conf
jpeach marked this conversation as resolved.
Show resolved Hide resolved
prometheus localhost:{{ .PrometheusPort }}
errors
}
Expand Down
2 changes: 1 addition & 1 deletion app/kuma-dp/pkg/dataplane/dnsserver/dnsserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ var _ = Describe("DNS Server", func() {
// and
Expect(string(actual)).To(Equal(`.:16001 {
forward . 127.0.0.1:16002
alternate NXDOMAIN,SERVFAIL,REFUSED . /etc/resolv.conf
alternate NOTIMP,FORMERR,NXDOMAIN,SERVFAIL,REFUSED . /etc/resolv.conf
prometheus localhost:16003
errors
}
Expand Down