aboutsummaryrefslogtreecommitdiff
path: root/plugin (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-08-02auto go fmtGravatar coredns[bot] 1-2/+2
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-07-29kubernetes: Improve namespace usage (#4767)Gravatar Mat Lowery 9-47/+100
* Use GetByKey instead of List in GetNamespaceByName. * Add ToNamespace to reduce memory for namespace cache. Signed-off-by: Mat Lowery <mlowery@ebay.com>
2021-07-20auto remove trailing whitespacesGravatar coredns[bot] 2-2/+2
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-07-19auto go fmtGravatar coredns[bot] 1-3/+3
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-07-16plugin/forward : add proxy address as tag (#4757)Gravatar Ondřej Benkovský 1-0/+2
Signed-off-by: Ondrej Benkovsky <ondrej.benkovsky@wandera.com>
2021-07-15plugin/header: run go gen and small doc updates (#4754)Gravatar Miek Gieben 3-10/+9
* plugin/header: run go gen and small doc updates Run go gen to enable the new plugin, this should fix the CI failures. Small tweaks to the docs. Signed-off-by: Miek Gieben <miek@miek.nl> * another typo Signed-off-by: Miek Gieben <miek@miek.nl> * gofmt Signed-off-by: Miek Gieben <miek@miek.nl>
2021-07-15plugin/header: Introduce header plugin (#4752)Gravatar Qasim Sarfraz 6-0/+355
* Add header plugin Signed-off-by: MQasimSarfraz <syed.qasim.sarfraz@gmail.com> * fix import format * improve README.md * Add codeowners for header plugin
2021-07-14Fix typo on kubernetes plugin (#4753)Gravatar Jeongwook Park 1-6/+6
- modifed -> modified Signed-off-by: jeongwook-park <jeongwook.park@navercorp.com>
2021-07-14Create geoip plugin (#4688)Gravatar Sven Nebel 11-6/+563
* Create geoip plugin Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Update plugin/geoip/README.md Co-authored-by: Miek Gieben <miek@miek.nl> Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Update plugin/geoip/README.md Co-authored-by: Miek Gieben <miek@miek.nl> Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Update plugin/geoip/README.md Co-authored-by: Miek Gieben <miek@miek.nl> Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Move DBFILE bullet below example Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Update plugin/geoip/README.md Co-authored-by: Miek Gieben <miek@miek.nl> Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Remove plugin name test case Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Remove languages option Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Update free database link Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Remove last language bits Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Use 127.0.0.1 as probing IP Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Update plugin/geoip/geoip.go Co-authored-by: Miek Gieben <miek@miek.nl> Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Update plugin/geoip/geoip.go Co-authored-by: Miek Gieben <miek@miek.nl> Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Use relative path for fixtures dir Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Set names with default string zero value Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Remove unused db types Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Remove non city databases in testdata Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Remove create databases main Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Fix metadata label format test case Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Fix import path block Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * go fmt after changes Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Tidy up go.mod and go.sum Signed-off-by: Sven Nebel <nebel.sven@gmail.com> * Add plugin to CODEOWNERS Signed-off-by: Sven Nebel <nebel.sven@gmail.com> Co-authored-by: Miek Gieben <miek@miek.nl>
2021-07-14publish trace id as metadata from trace plugin (#4749)Gravatar Ondřej Benkovský 2-0/+17
Signed-off-by: Ondrej Benkovsky <ondrej.benkovsky@wandera.com>
2021-07-12auto go fmtGravatar coredns[bot] 1-2/+2
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-07-10plugin/trace: fix rcode tag in case of no response (#4742)Gravatar Ondřej Benkovský 2-8/+25
Signed-off-by: Ondrej Benkovsky <ondrej.benkovsky@wandera.com>
2021-07-09fix example (#4740)Gravatar Chris O'Haver 1-1/+1
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-07-09update example description to match example (#4739)Gravatar Chris O'Haver 1-1/+3
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-07-09plugin/error: use warning instead of warn (#4738)Gravatar Miek Gieben 3-5/+5
We use the 'WARNING' in the logs, instead of warn, so make the change here as well for consistency sake. Signed-off-by: Miek Gieben <miek@miek.nl>
2021-07-09when no response is written, fallback to status of next plugin in prometheus ↵Gravatar Ondřej Benkovský 1-1/+8
plugin (#4727) * when no response is written, fallback to status of next plugin in prometheus plugin Signed-off-by: Ondrej Benkovsky <ondrej.benkovsky@wandera.com> * fixup! when no response is written, fallback to status of next plugin in prometheus plugin Signed-off-by: Ondrej Benkovsky <ondrej.benkovsky@wandera.com>
2021-07-09add configurable log level to errors plugin (#4718)Gravatar Ondřej Benkovský 5-24/+151
Automatically submitted.
2021-07-09do not log NOERROR in log plugin when response is not available (#4725)Gravatar Ondřej Benkovský 2-1/+50
Signed-off-by: Ondrej Benkovsky <ondrej.benkovsky@wandera.com>
2021-07-09plugin/cache: Unset AD flag when DO is not set for cache miss (#4736)Gravatar Chris O'Haver 3-9/+19
* unset AD bit when client DO is 0 Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * add flag check to existing tests Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-07-05auto go fmtGravatar coredns[bot] 1-1/+1
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-06-30fix to docs; add acl example (#4711)Gravatar Chris O'Haver 1-3/+23
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-06-29trace plugin can mark traces with error tag (#4720)Gravatar Ondřej Benkovský 2-1/+21
Signed-off-by: Ondrej Benkovsky <ondrej.benkovsky@wandera.com>
2021-06-24Correct newdnsController's documented function signature (#4717)Gravatar mfleader 1-1/+1
Signed-off-by: mleader <mleader@redhat.com>
2021-06-14Add NS+hosts records to xfr response. Add coredns service to test data. (#4696)Gravatar Chris O'Haver 3-3/+49
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-06-11plugin/secondary: doc updates (#4686)Gravatar Miek Gieben 1-0/+4
Add retry behavior on startup and point to RFC 5936 Signed-off-by: Miek Gieben <miek@miek.nl>
2021-06-10fix cidr multi-zone check (#4682)Gravatar Chris O'Haver 1-2/+3
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-06-10plugin/secondary: Retry initial transfer until successful (#4663)Gravatar Chris O'Haver 1-1/+20
* retry initial transfer Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * fix import grouping Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * add test; use backoff timeout Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * fix import order Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * manual backoff Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-06-08plugin/log: fix closing of codeblock (#4680)Gravatar Miek Gieben 1-1/+1
This fixes the rendering of this README as html. The codeblock was closed with 4 ~, should be 3. Signed-off-by: Miek Gieben <miek@miek.nl>
2021-06-07Fix Route53 plugin cannot retrieve ECS Task Role (#4669)Gravatar Licht Takeuchi 1-5/+2
Signed-off-by: Licht Takeuchi <licht-t@outlook.jp>
2021-06-07auto go fmtGravatar coredns[bot] 1-1/+1
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-06-05Fix plugin file reload comment (#4665)Gravatar Sven Nebel 2-2/+2
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
2021-06-04Fix IPv6 case for CIDR format reverse zones (#4652)Gravatar Chris O'Haver 4-9/+67
* fix ipv6 case for cidr.Class Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * add check and test case for invalid ipv6 cidr Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * net package is bad at detecting ipv6/ipv4 Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * rename Class -> Split Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-27Reduce the cardinality of health endpoint metrics (#4650)Gravatar Ben Kochie 3-4/+17
The health endpoint histogram has a large amount of cardinality for a simple endpoint. Introduce a new "Slim" set of buckets for `/health` to reduce the metrics load on large deployments. Especially those that have per-node DNS caching services. Add a metric to count internal health check failures rather than use the timeout value as side effect monitor of the check error. This avoids incorrectly recording the timeout value if there is an error that is not a timeout (ex. refused) Signed-off-by: SuperQ <superq@gmail.com>
2021-05-27plugin/kubernetes: consistently choose EndpointSlices or Endpoints for ↵Gravatar uesyn 1-13/+23
unstable API (#4647) * confirm endpointslices is served or not Signed-off-by: uesyn <suemura@zlab.co.jp> * Apply suggestions Signed-off-by: uesyn <suemura@zlab.co.jp>
2021-05-27deprecate Normalize and MustNormalize (#4648)Gravatar Chris O'Haver 6-11/+61
* deprecate normalize and mustnormalize Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * add runtime warning Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * elaborate runtime warning Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * include caller info Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-20Revert "plugin/file: Fix in wrong answers returned when wildcard and ↵Gravatar Miek Gieben 3-110/+6
concrete records exist (#4599)" (#4633) reverting as I don't want to release 1.8.4 with this enabled. This reverts commit fbf3f07f469a99fcbb5985a41c260a3fad26f908.
2021-05-20plugin/forward: Document and warn for unsupported FROM CIDR notations (#4639)Gravatar Chris O'Haver 3-2/+9
* trap unsupported FROM cidr notations Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * make is a warning Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-19Fix obsure crash in Corefile parsing (#4637)Gravatar Miek Gieben 1-1/+5
This was found by fuzzing. We need to make this a fully qualified domain name to catch all errors in dnsserver/register.go and not later when plugin.Normalize() is called again on these strings, with the prime difference being that the domain name is fully qualified. This was found by fuzzing where "ȶ" is deemed OK, but "ȶ." is not (might be a bug in miekg/dns actually). But here we were checking ȶ, which is OK, and later we barf in ȶ. leading to "index out of range". Added a tests and check manually if it would crash with the current code (yes), and fail with an error in this PR (yes). Signed-off-by: Miek Gieben <miek@miek.nl>
2021-05-17plugin/file: Fix in wrong answers returned when wildcard and concrete ↵Gravatar Jason Du 3-6/+110
records exist (#4599) * plugin/file: Fix in wrong answers returned when wildcard and concrete records exist Signed-off-by: Jason Du <xdu@infoblox.com> * Remove superfluous change Signed-off-by: Jason Du <xdu@infoblox.com> * Re-implementation and new test case If the domain's terminal is neither the matching wildcard, nor a domian directly under the wildcard, return NXDOMAIN Signed-off-by: Jason Du <xdu@infoblox.com> * Fix empty non-terminal & add test case Signed-off-by: Jason Du <xdu@infoblox.com> * Cleanup Signed-off-by: Jason Du <xdu@infoblox.com> * Fix case on domain name with character before * and add more test cases Signed-off-by: Jason Du <xdu@infoblox.com> * Use different IPs for records in cornerCasesWildcard zone file Signed-off-by: Jason Du <xdu@infoblox.com>
2021-05-17reverse zone: fix Normalize (#4621)Gravatar Miek Gieben 27-310/+225
Make normalize return multiple "hosts" (= reverse zones) when a non-octet boundary cidr is given. Added pkg/cidr package that holds the cidr calculation routines; felt they didn't really fit dnsutil. This change means the IPNet return parameter isn't needed, the hosts are all correct. The tests that tests this is also removed: TestSplitHostPortReverse The fallout was that zoneAddr _also_ doesn't need the IPNet member, that in turn make it visible that zoneAddr in address.go duplicated a bunch of stuff from register.go; removed/refactored that too. Created a plugin.OriginsFromArgsOrServerBlock to help plugins do the right things, by consuming ZONE arguments; this now expands reverse zones correctly. This is mostly mechanical. Remove the reverse test in plugin/kubernetes which is a copy-paste from a core test (which has since been fixed). Remove MustNormalize as it has no plugin users. This change is not backwards compatible to plugins that have a ZONE argument that they parse in the setup util. All in-tree plugins have been updated. Signed-off-by: Miek Gieben <miek@miek.nl>
2021-05-17consider nil ready as ready (#4632)Gravatar Chris O'Haver 1-2/+11
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-14Fix etcd to use v3.5.0-alpha.0 (#4628)Gravatar Jason Du 2-3/+3
Signed-off-by: Jason Du <xdu@infoblox.com>
2021-05-14check for two days of remaining validity (#4606)Gravatar Keith Coleman 2-3/+3
Signed-off-by: Keith C <keith@fraudmarc.com>
2021-05-10copy unready exclusion to v1beta1 func (#4616)Gravatar Chris O'Haver 1-0/+3
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-10plugin/kubernetes: Support both v1 and v1beta1 EndpointSlices (#4570)Gravatar Chris O'Haver 3-12/+106
* support v1 and v1beta1 endpointslice Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * update comments Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-06plugin/dnssec: interface type correction for `periodicClean` sig validity ↵Gravatar Keith Coleman 1-3/+4
check (#4608) Signed-off-by: Keith C <keith@fraudmarc.com>
2021-05-04plugin/kubernetes: fix SOA response for non-apex queries (#4592)Gravatar Chris O'Haver 3-2/+17
* fix SOA response for non-apex queries Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * handle mixed case Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * do full string compare Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-04collect endpoint node name from endopintslices (#4581)Gravatar Chris O'Haver 1-1/+3
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-04Add error check to avoid panic (#4584)Gravatar wangchenglong01 1-1/+4
* Add error check to avoid panic Signed-off-by: Cookie Wang <luckymrwang@163.com> * Add error check to avoid panic Signed-off-by: Cookie Wang <luckymrwang@163.com> Co-authored-by: Cookie Wang <luckymrwang@163.com>
2021-05-04plugin/rewrite: streamline the ResponseRule handling. (#4473)Gravatar Uwe Krueger 13-514/+882
* plugin/rewrite: streamline the ResponseRule handling. The functionality of a response rule is now completely encapsulated behind a `ResponseRule` interface. This significantly simplifies the complete processing flow, it enables more flexible response handling and it is possible to eliminate lots of state flags, ifs and switches. Based on the new flexibility the pull request also enables to support a response name rewrite for all name rewrite types. To be compatible, an explicit `answer auto` option is added to support a best effort response rewrite (name and value). Additionally now all name rewrite rules support additional name and value reponse rewrite options. Using this feature it is also possible now to rewrite a complete sub domain hierarchy to a single domain name combined with a correct rewrite (#2389). Signed-off-by: Uwe Krueger <uwe.krueger@sap.com> * revert policy Signed-off-by: Uwe Krueger <uwe.krueger@sap.com> Co-authored-by: Miek Gieben <miek@miek.nl>