aboutsummaryrefslogtreecommitdiff
path: root/plugin/etcd/handler.go (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-02-22plugin/etcd+kubernetes: Persist truncated state to client if CNAME lookup ↵Gravatar Chris O'Haver 1-4/+6
response is truncated (#4715) Persist the TC bit to client response for truncated CNAME lookups. Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-01-03Resolve TXT records via CNAME (#3557)Gravatar Jonathan Nagy 1-1/+1
* Add test case for TXT lookup via CNAME Signed-off-by: Jonathan Nagy <nagytech@users.noreply.github.com> * Return HostType of explicit TXT records Signed-off-by: Jonathan Nagy <nagytech@users.noreply.github.com> * Adapt TXT method lookup to allow lookup via CNAME Signed-off-by: Jonathan Nagy <nagytech@users.noreply.github.com> * Implement lookup of TXT records via CNAME Signed-off-by: Jonathan Nagy <nagytech@users.noreply.github.com>
2019-03-26Remove context.Context from request.Request (#2726)Gravatar Miek Gieben 1-14/+14
* Remove context.Context from request.Request This removes the context from request.Request and makes all the changes in the code to make it compile again. It's all mechanical. It did unearth some weirdness in that the context was kept in handler structs which may cause havoc with concurrently handling of requests. Fixes #2721 Signed-off-by: Miek Gieben <miek@miek.nl> * Make test compile Signed-off-by: Miek Gieben <miek@miek.nl>
2019-01-13Default to upstream to self (#2436)Gravatar Miek Gieben 1-14/+0
* Default to upstream to self This is a backwards incompatible change. This is a massive (cleanup) PR where we default to resolving external names by the coredns process itself, instead of directly forwarding them to some upstream. This ignores any arguments `upstream` may have had and makes it depend on proxy/forward configuration in the Corefile. This allows resolved upstream names to be cached and we have better healthchecking of the upstreams. It also means there is only one way to resolve names, by either using the proxy or forward plugin. The proxy/forward lookup.go functions have been removed. This also lessen the dependency on proxy, meaning deprecating proxy will become easier. Some tests have been removed as well, or moved to the top-level test directory as they now require a full coredns process instead of just the plugin. For the etcd plugin, the entire StubZone resolving is *dropped*! This was a hacky (but working) solution to say the least. If someone cares deeply it can be brought back (maybe)? The pkg/upstream is now very small and almost does nothing. Also the New() function was changed to return a pointer to upstream.Upstream. It also returns only one parameter, so any stragglers using it will encounter a compile error. All documentation has been adapted. This affected the following plugins: * etcd * file * auto * secondary * federation * template * route53 A followup PR will make any upstream directives with arguments an error, right now they are ignored. Signed-off-by: Miek Gieben <miek@miek.nl> * Fix etcd build - probably still fails unit test Signed-off-by: Miek Gieben <miek@miek.nl> * Slightly smarter lookup check in upstream Signed-off-by: Miek Gieben <miek@miek.nl> * Compilez Signed-off-by: Miek Gieben <miek@miek.nl>
2018-12-30disable ra flag for several plugins (#2408)Gravatar Isolus 1-1/+1
* disable ra flag for several plugins * removed unnecessary assignment * removed more unnecessary assignments
2018-08-29Default to scrubbing replies in the server (#2012)Gravatar Miek Gieben 1-2/+0
Every plugin needs to deal with EDNS0 and should call Scrub to make a message fit the client's buffer. Move this functionality into the server and wrapping the ResponseWriter into a ScrubWriter that handles these bits for us. Result: Less code and faster, because multiple chained plugins could all be calling scrub and SizeAndDo - now there is just one place. Most tests in file/* and dnssec/* needed adjusting because in those unit tests you don't see OPT RRs anymore. The DNSSEC signer was also looking at the returned OPT RR to see if it needed to sign - as those are now added by the server (and thus later), this needed to change slightly. Scrub itself still exist (for backward compat reasons), but has been made a noop. Scrub has been renamed to scrub as it should not be used by external plugins. Fixes: #2010 Signed-off-by: Miek Gieben <miek@miek.nl>
2018-06-30plugin/etcdv3: Add etcd v3 plugin (#1702)Gravatar Nitish Tiwari 1-2/+1
* Update dependencies and add etcdv3 client * Update etcd plugin to support etcd v3 clients Fixes #341
2018-06-11Remove dnsutil.Dedup (#1867)Gravatar Miek Gieben 1-3/+0
Remove the code and remove the call in etcd and kubernetes handlers. This does mean we should not add dups in the first place, which means adding maps in backend_lookup to prevent dups from begin added. This should cut down on the allocations because dnsutil.Dedup is very expensive by converting everything to strings, we avoid doing that now.
2018-05-01Do Compress only when need in request.Scrub (#1760)Gravatar Miek Gieben 1-1/+2
* Remove Compress by default Set Compress = true in Scrub only when the message doesn not fit the advertized buffer. Doing compression is expensive, so try to avoid it. Master vs this branch pkg: github.com/coredns/coredns/plugin/cache BenchmarkCacheResponse-2 50000 24774 ns/op pkg: github.com/coredns/coredns/plugin/cache BenchmarkCacheResponse-2 100000 21960 ns/op * and make it compile
2018-04-22all: fix plugin import ordering (#1717)Gravatar Miek Gieben 1-2/+2
Got a bit messed up with stb lib "context" usage.
2018-04-20global: move to context (#1699)Gravatar Miek Gieben 1-1/+2
* global: move to context Move from golang.org/x/net/context to std lib's context. Change done with: for i in $(grep -l '/context' **/*.go); do sed -e 's|golang.org/x/net/context|context|' -i $i; echo $i; done for i in **/*.go; do goimports -w $i; done * drop from dns.pb.go as well
2018-02-14plugin/kubernetes: Add upstream @self and loop count (#1484)Gravatar Chris O'Haver 1-1/+1
* add upstream @self and loop count * 1st round of feedback * allow argless upstream * update test * readmes * feedback
2018-01-07Add pkg/fall for Fallthrough (#1355)Gravatar Miek Gieben 1-1/+1
* Add pkg/fall for Fallthrough Move this into it's own package to facilitate tests. Important bug was fixed: make the names fully qualified. Add fall package to hosts, reverse, etcd, and fix kubernetes and any tests. The k8s tests are still as-is, might need a future cleanup.
2017-12-07Changing switch to compare on constants versus strings (#1285)Gravatar Brad Beam 1-10/+11
2017-09-14Remove the word middleware (#1067)Gravatar Miek Gieben 1-0/+97
* Rename middleware to plugin first pass; mostly used 'sed', few spots where I manually changed text. This still builds a coredns binary. * fmt error * Rename AddMiddleware to AddPlugin * Readd AddMiddleware to remain backwards compat