aboutsummaryrefslogtreecommitdiff
path: root/plugin (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-10-10Revert "plugin/log: Change time format to be consistent with pkg/log ↵Gravatar Miek Gieben 1-1/+1
(#2135)" (#2179) This reverts commit ae2a0c62b71f18e594bc5565b00fb8a4d6ef44fc.
2018-10-10use keys (#2167)Gravatar Chris O'Haver 13-379/+290
2018-10-10plugin/route53: add split zone support (#2160)Gravatar Can Yucel 5-60/+123
Automatically submitted.
2018-10-09plugin/kubernetes: allow trimming down of cached items. (#2128)Gravatar Miek Gieben 21-983/+1155
* Convert to runtime.Object to smaller structs This adds conversion for all the objects we want to keep in the cache. It keeps the minimum for CoreDNS to function and throws away the rest. The conversion: api.Endpoints -> object.Endpoints api.Pod -> object.Pod api.Serivce -> object.Service We needed to copy some client-go stuff to insert a conversion function into NewIndexInformers. Some unrelated cleanups in the watch functionality as that needed to be touched because of the above translation of objects. Signed-off-by: Miek Gieben <miek@miek.nl> * Reduce test line-count Signed-off-by: Miek Gieben <miek@miek.nl> * ....and fix test Signed-off-by: Miek Gieben <miek@miek.nl> * Drop use of append Signed-off-by: Miek Gieben <miek@miek.nl> * cosmetic changes Signed-off-by: Miek Gieben <miek@miek.nl> * that was a typo Signed-off-by: Miek Gieben <miek@miek.nl> * re-introduce append here We can't really use len() here because we don't know the number before hand. Signed-off-by: Miek Gieben <miek@miek.nl> * comment in better place Signed-off-by: Miek Gieben <miek@miek.nl> * Make the timestamp a bool; thats where it is used for Signed-off-by: Miek Gieben <miek@miek.nl> * Set incoming object to nil Explicataliy discard the converted object; we did a deep copy it's not needed anymore. Signed-off-by: Miek Gieben <miek@miek.nl> * Per Chris's comment Signed-off-by: Miek Gieben <miek@miek.nl>
2018-10-09plugin/forward: fix healthchecker crash (#2165)Gravatar Ruslan Drozhdzh 3-0/+9
2018-10-05Add request and response context to traces (#2162)Gravatar Nic Cope 2-13/+104
Automatically submitted.
2018-10-02Add Kubernetes auth providers (#2147)Gravatar John Belamaric 1-0/+8
* Import auth providers for K8s * Vendor updates for K8s auth providers * Remove Azure since it is not compiling * Update vendor to remove Azure dependencies
2018-09-29Configurable zone reload interval in file plugin (#2110)Gravatar marqc 11-19/+50
* Configurable zone reload interval in file plugin * passing reload config from auto plugin to file plugin. removed noReload property from Zone struct. fixed tests based on short file reload hack
2018-09-29Benchmark for k8s services (#2107)Gravatar Brad Beam 2-10/+169
* Benchmark for k8s services * Adding k8s.io/client-go/kubernetes/fake dep
2018-09-28Support for kubeconfig files (#2053)Gravatar Zach Eddy 4-0/+59
* Add support for authentication with kubeconfig files * Update k8s plugin documentation * Fix whitespace in README and tests * Use clientcmd package to load kubeconfig file
2018-09-27plugin/log: Change time format to be consistent with pkg/log (#2135)Gravatar Eugen Kleiner 1-1/+1
2018-09-25plugins/route53: add AWS credentials file support (#2118)Gravatar Can Yucel 3-5/+75
Automatically submitted.
2018-09-25plugin/route53: add fallthrough (#2132)Gravatar Can Yucel 5-2/+65
Automatically submitted.
2018-09-22plugin/kubernetes: use struct{} was map values (#2125)Gravatar Miek Gieben 1-3/+3
This takes less space than a bool, the value isn't used for anything else than "present in map" any way. Signed-off-by: Miek Gieben <miek@miek.nl>
2018-09-22plugin/kubernetes: remove unnecessary checks (#2124)Gravatar Miek Gieben 1-39/+13
These checks are not needed and also use a var for all obj errors. Signed-off-by: Miek Gieben <miek@miek.nl>
2018-09-22plugin/kubernetes: remove var namespace (#2122)Gravatar Miek Gieben 2-9/+7
* WIP: trying stuff out Signed-off-by: Miek Gieben <miek@miek.nl> * Fixes Signed-off-by: Miek Gieben <miek@miek.nl> * Revert "WIP: trying stuff out" This reverts commit a18a6ae1233d5f34c98164fd693294c36b3240b7.
2018-09-22plugin/rewrite: silence these tests (#2120)Gravatar Miek Gieben 1-16/+3
* plugin/rewrite: silence these tests The old Unix saying: no news, is good news. Signed-off-by: Miek Gieben <miek@miek.nl> * Fix da tests Signed-off-by: Miek Gieben <miek@miek.nl>
2018-09-22K8s remove string ops (#2119)Gravatar Miek Gieben 11-44/+31
* plugin/kubernetes: remove bunch a string ops This removes a bunch of appends to where not needed, makes dnsutil.Join take variadic args which removes the need to wrap in a new string slice. Signed-off-by: Miek Gieben <miek@miek.nl> * Fix calls to dnsutil.Join Signed-off-by: Miek Gieben <miek@miek.nl> * Revert these Signed-off-by: Miek Gieben <miek@miek.nl>
2018-09-22plugin/route53: fix multiple route 53 zones issue (#2117)Gravatar Can Yucel 2-3/+3
2018-09-22Add test for #2003 (#2115)Gravatar Miek Gieben 1-0/+54
This adds a test for cleanup in c349446a Signed-off-by: Miek Gieben <miek@miek.nl>
2018-09-19plugin/health: close codeblockGravatar Miek Gieben 1-1/+1
Codeblock wasn't properly closed in the README. Signed-off-by: Miek Gieben <miek@miek.nl>
2018-09-19Ensure Re-register of metrics variables after a reload (#2080)Gravatar Francois Tur 12-39/+9
* - ensure plugins that use prometheus.MustRegister, re-register after reload - removing once.Do on the startup function was simplest way to do it. * - fix underscored names (advice of bot) * - tune existing UT for reload, and add a test verifying failing reload does not prevent correct registering for metrics * - ensure different ports for tests that can run in same time ..
2018-09-19Better naming (#2104)Gravatar Miek Gieben 12-79/+90
* Move functions from pkg/transport to pkg/parse Although "parse" is a fairly generic name I believe this is somewhat better named. pkg/transport keeps a few constants that are uses throughout for the rest is is renaming a bunch (and the fallout from there to make things compile again). Signed-off-by: Miek Gieben <miek@miek.nl> * Fix tests Signed-off-by: Miek Gieben <miek@miek.nl>
2018-09-19Cleanup ParseHostOrFile (#2100)Gravatar Miek Gieben 17-130/+150
Create plugin/pkg/transport that holds the transport related functions. This needed to be a new pkg to prevent cyclic import errors. This cleans up a bunch of duplicated code in core/dnsserver that also tried to parse a transport (now all done in transport.Parse). Signed-off-by: Miek Gieben <miek@miek.nl>
2018-09-17Move suffix example out of EDNS0 section (#2102)Gravatar Chris O'Haver 1-6/+6
2018-09-17[plugin/route53]: Support batch mode operation. (#2050)Gravatar dilyevsky 5-148/+354
* [plugin/route53]: Support batch mode operation. Cache all Route53 records internally using `ListResourceRecordPagesWithContext` and serve them from memory. Bonus features: * Support additional r53 record types (`CNAME`, `SOA`, etc) * Support `upstream` option (#2099 filed to support argument optionality) Signed-off-by: Dmitry Ilyevskiy <dmitry.ilyevskiy@getcruise.com> Signed-off-by: Dmitry Ilyevskiy <ilyevsky@gmail.com>
2018-09-17[plugin/proxy]: Return on WriteMsg err. (#2096)Gravatar dilyevsky 1-8/+5
* [plugin/proxy]: Return on WriteMsg err. Followup PR on the heels of #2050. Short-circut and log on error from `WriteMsg`. This will prevent code getting stuck on `ReadMsg` and allow for easier debugging. Also simply the `ReadMsg` calling code a little - remove double `Close` (already called above).
2018-09-13Add @dilyevsky to reviewers. (#2094)Gravatar dilyevsky 1-0/+2
* Add @dilyevsky to reviewers. Per @miekg suggestion on https://github.com/coredns/coredns/pull/2050#pullrequestreview-149538954 adding myself to OWNERS file. * Also add me into plugin/route53-specific reviewers/approvers.
2018-09-12plugin/federation: handle missing avail-zone/region labels better (#2092)Gravatar Chris O'Haver 3-5/+49
* handle missing avail-zone/region labels better * oops forgot a file
2018-09-03Add MINTTL parameter to cache configuration. (#2055)Gravatar Aaron Riekenberg 5-31/+111
* Add success min TTL parameter to cache. * Add MINTTL to README. * Update README. * Add MINTTL to negative cache. * Remove unnecessary variable name. * Address review comments. * Configure cache in TestCacheZeroTTL to have 0 min ttl.
2018-08-31Move cache Keys to 64bit for a better dispersion and lower collision ↵Gravatar Francois Tur 6-41/+43
frequency (#2077) * - change Key for cache to 64bits. * - change Key for cache to 64bits.
2018-08-29plugin/rewrite: add handling of TTL field rewrites (#2048)Gravatar Paul G 6-25/+453
Resolves: #1981 Signed-off-by: Paul Greenberg <greenpau@outlook.com>
2018-08-29Default to scrubbing replies in the server (#2012)Gravatar Miek Gieben 23-119/+28
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-08-29lower cache min limit (#2065)Gravatar Chris O'Haver 2-6/+17
2018-08-27handle blank name and namespaces (#2042)Gravatar Chris O'Haver 4-6/+33
2018-08-27plugin/kubernetes: dont transfer unexposed namespaces (#2044)Gravatar Chris O'Haver 3-0/+20
dont transfer unexposed namespaces
2018-08-27plugin/kubernetes: Create records for portless services (#2052)Gravatar Chris O'Haver 3-1/+64
inject sentinels for portless services
2018-08-25fix kubernetes in-cluster CNAME lookup (#2040)Gravatar Bingshen Wang 3-29/+52
fix #2038 Signed-off-by: bingshen.wbs <bingshen.wbs@alibaba-inc.com>
2018-08-23Add suffix example to docs (#2049)Gravatar Chris O'Haver 1-0/+6
2018-08-22plugin/kubernetes: Note that deprecated style pod records are not ↵Gravatar Chris O'Haver 1-0/+1
transferred (#2045) * Update README.md * Update README.md
2018-08-21Metrics listener fix (#2036)Gravatar Zach Eddy 2-13/+31
* Create test to verify correct listener behavior * Create Unset function to remove todo items * Reset address for prometheus listener before restarting * Add inline documentation for Unset function * Make shutdownTimeout a constant and change to five seconds * Revert ForEach behavior in uniq package
2018-08-15plugin/forward: Split setup to reuse it from external plugins (#2034)Gravatar Eugen Kleiner 1-49/+62
2018-08-14Typo fixes (#2031)Gravatar Karsten Weiss 28-35/+35
2018-08-01dnstap.TapperFromContext always returns nil (#2018)Gravatar varyoo 2-1/+16
Automatically submitted.
2018-07-30fixed typo in kubernetes plugin man page and README. (#2014)Gravatar Stanislav Zapolsky 1-1/+1
2018-07-28Fix ineffassign (#1959)Gravatar Yong Tang 7-9/+8
* Fix ineffassign This fix tries to fix ineffassign, as was reported in: https://goreportcard.com/report/github.com/coredns/coredns#ineffassign Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Update setup.go Revert this one change, so this can be merged.
2018-07-23Document current limitations of loop (#1996)Gravatar Chris O'Haver 1-2/+9
* Document current limitations of loop * Update README.md
2018-07-22plugin/loop: add missing break (#1992)Gravatar Miek Gieben 1-2/+4
The Onstartup loop wouldn't call break after the first success, thereby sending the query multiple times and halting the process. Some small other optimizations as well. Signed-off-by: Miek Gieben <miek@miek.nl>
2018-07-20New plugin: loop (#1989)Gravatar Miek Gieben 9-0/+269
* New plugin: loop Add a plugin that detects loops. It does this by sending an unique query to our selves. If we see the query more than twice we stop the process. If there isn't a loop, the plugin disables it self and becomes a noop plugin. Signed-off-by: Miek Gieben <miek@miek.nl>
2018-07-20Logfatalf (#1990)Gravatar Miek Gieben 1-1/+11
* bliep Signed-off-by: Miek Gieben <miek@miek.nl> * plugin/log: add log.Fatal[f] Add log.Fatal(f) to mimic more of the log package. The first and only use is in the (new) loop plugin. Signed-off-by: Miek Gieben <miek@miek.nl>