Switched health and autopath plugin to allow any plugins to be used instead
of a hardcoded list. I did not switch federation over since it wasn't
obvious that anything other than kubernetes could be used with it.
Fixes#1291
When z.Tree.Prev returns zero we should break out of this loop, not
use elem as if nothing has happened.
Can be triggered by sending edns0 to unsigned zone.
DS is peculiar and needs some special cases to do the right things.
For a direct query return the DS, but if we're hitting below the
delegation return the NS+DS in a delegation response.
Don't put NS records in the answer section; if we see it is delegated
we should put the records in the AUTHORITY section.
This removes a special case, which is good.
If protocol is https_google we do the health checks wrong, i.e. we're healthchecking the wrong
endpoint, hence the health check code below should not be executed. See issue #1202.
This is an ugly hack and the thing requires a rethink. Possibly in conjunction with moving
to the *forward* plugin.
- added dnstapEncoder object which incapsulates marshalling of dnstap
messages to protobuf and writing data to connection
- dnstapEncoder writes data directly to connection object. It doesn't
use the framestream's "write" method, because it writes data to
intermediate buffer (bufio.Writer) which leads to unnecessary
data copying and drops the performance
- dnstapEncoder reuses a preallocated buffer for marshalling dnstap
messages. Many messages are added to the same buffer. They are
separated with a "frame length" 4-byte values, so the buffer content
is writen to connection object in the format compatible with
framestream library
- added test which guarantees that dnstapEncoder output is the same
as framestream Encoder output
- the performance increase is about 50% in (dio *dnstapIO) serve() method
of dnstap plugin. The overall coredns performance increase is about 10%
in the following configuration:
.:1053 {
erratic {
drop 0
truncate 0
delay 0
}
dnstap tcp://127.0.0.1:6000 full
errors stdout
}
tested with dnsperf tool
This fix tries to address the issue raised in 1275 to clarify
the syntax for multiple endpoints specification.
This fix also adds additional test cases to demo the usage.
This fix fixes 1275.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add NSID plugin support for CoreDNS
This fix adds NSID plugin support for CoreDNS, as was proposed
in 1256.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test cases for NSID plugin
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Generate code for NSID plugin
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Use hostname as the default (as with bind), and remove unneeded copy
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add README.md
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
When we failing the healthcheck we should increate the fails for this
host; which is the *bleeping* point of doing the HC in the first place.
Add the missing atomic.Adds.
Fixes#1247
HC for google_https does not work because it does not HC the correct
set of IPs. Hard to solve in the current code - rather use forward as
the new impl. and leave this as legacy.
Remove superfluous println that we are refreshing the dns.google.com IP
address.
* plugin/rewrite: don't set or use ecs.DraftOption
Don't know why we are accessing this and explicitally setting it to
False (the default).
Any kill with fire - makes the build, build again.
* remove this
* plugin/kubernetes: Add GetNamespaceByName
A bare or wildcard query for just the namespace should return NODATA,
not NXDOMAIN, otherwise we deny the entirety of the names under the
namespace.
Add test to check for this in pod verified mode.
* Review
More comments and move namespace code to namespace.go
Implement health.Healther in erratic and kubernetes plugin. The
kubernetes' healtcheck is only performed on startup - i.e. turn
healthy after the initial loading.
Erratic follow the drop count: every query%drop turns the healthcheck
unhealthy.
Fixes: #985
* plugin/log: remove need to specify stdout
Since log will only be output to stdout is doesn't make sense to
specify it in Corefile.
Fixes: #1218
* fixup! plugin/log: remove need to specify stdout
Change to use a new 'endpoints' directive and use a constant
Add initial docs for 'endpoints' directive
Add tests to Kubernetes setup for endpoints
Changes based on PR feedback
endpoint_pod_names is a boolean config option. Chahanged docs to reflect this.
Add a test when endpoints_pod_names is not set
Update README.md
Remove endpointNameModeName as it is no longer used
Add a dynamic SOA record (at least the serial and minttl). This create
another interface that should be implemented by the backends.
For now default to returning epoch in as a uint32 (no change from
before).
Lower the minTTL returned to 30s (from 60s)
Fix typo in kubernetes/README.md and remove DEV-README.md as it is stale
and information on the website is more up to date.
Remove large sections of text in plugin.md; just talk about how to
structure your plugin and docs.
* readme: more tests
Add dnssec and file plugin to the test readme. This requires creating a
bunch of files with the right content. Doing so already unconvered an
unconditional type assertion in DNSSEC. This PR will include the fix for
that as well.
Also extended the snippets in the file plugin README, so that they are
whole Corefile - showing more value and checking all corefile snippets.
Create outliner right now is the kubernetes plugin, because even setting
the right env vars will result in:
open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory":
Which we can't create for a test.
* lint
Some cleanup in proxy and dnstap:
* just use time pkg directly and side step the indirection for Epoch
* Use Set in SetQueryEpoch to be more Go like. (Looked like a reader)
* Don't maintain two sets of time, we already track start, so use that.
* Use time.Time and convert when needed
* dedent the toDnstap function and put in a separate file