aboutsummaryrefslogtreecommitdiff
path: root/plugin (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-12-09add wildcard warnings (#5030)Gravatar Chris O'Haver 3-0/+33
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-12-08Clean up extra spaces (#5027)Gravatar jayonlau 1-1/+1
2021-12-01plugin/kubernetes: clean code (#5017)Gravatar xuweiwei 1-5/+5
Signed-off-by: xuweiwei <xuweiwei_yewu@cmss.chinamobile.com>
2021-11-24plugin/geoip: cleanup code (#5009)Gravatar xuweiwei 2-3/+3
remove unnecessary float64 convert and clean code Signed-off-by: xuweiwei <xuweiwei_yewu@cmss.chinamobile.com>
2021-11-23support plain HTTP for DoH (#4997)Gravatar Ondřej Benkovský 1-1/+9
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2021-11-22Docs: Add warning to use tls_servername (#4992)Gravatar OctoHuman 1-1/+3
Signed-off-by: OctoHuman <17958767+OctoHuman@users.noreply.github.com>
2021-11-21plugin/bind: Point to MacOS bug (#4995)Gravatar Miek Gieben 1-0/+3
Document this is a bug. Closes: 4993 Signed-off-by: Miek Gieben <miek@miek.nl>
2021-11-19plugin/auto: Fix panic caused by config invalid reload value (#4986)Gravatar gomakesix 3-3/+67
Automatically submitted.
2021-11-19plugin/file: Fix print tree error (#4962)Gravatar xuweiwei 2-2/+104
Automatically submitted.
2021-11-19cleanup some code (#4989)Gravatar xuweiwei 3-8/+3
Automatically submitted.
2021-11-15Fix a typo in plugin/health (#4982)Gravatar xuweiwei 1-1/+1
Signed-off-by: xuweiwei <xuweiwei_yewu@cmss.chinamobile.com>
2021-11-15auto go fmtGravatar coredns[bot] 1-1/+1
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-11-12Revert "Initial implementation of ForwardCRD plugin (#4512)" (#4981)Gravatar Chris O'Haver 18-2467/+91
This reverts commit 2e6953c7dbd1d6b359911e1ce92e2567df07ca8c.
2021-11-12Initial implementation of ForwardCRD plugin (#4512)Gravatar Christian Ang 18-91/+2467
* Add forwardcrd plugin README.md Co-authored-by: Aidan Obley <aobley@vmware.com> Signed-off-by: Christian Ang <angc@vmware.com> * Create forwardcrd plugin - Place forwardcrd before forward plugin in plugin list. This will avoid forward from preventing the forwardcrd plugin from handling any queries in the case of having a default upstream forwarder in a server block (as is the case in the default kubernetes Corefile). Co-authored-by: Aidan Obley <aobley@vmware.com> Signed-off-by: Christian Ang <angc@vmware.com> * Add Forward CRD Signed-off-by: Christian Ang <angc@vmware.com> * Add NewWithConfig to forward plugin - allows external packages to instanciate forward plugins Co-authored-by: Aidan Obley <aobley@vmware.com> Signed-off-by: Christian Ang <angc@vmware.com> * ForwardCRD plugin handles requests for Forward CRs - add a Kubernetes controller that can read Forward CRs - instances of the forward plugin are created based on Forward CRs from the Kubernetes controller - DNS requests are handled by calling matching Forward plugin instances based on zone name - Defaults to the kube-system namespace to align with Corefile RBAC Signed-off-by: Christian Ang <angc@vmware.com> Use klog v2 in forwardcrd plugin * Refactor forward setup to use NewWithConfig Co-authored-by: Christian Ang <angc@vmware.com> Signed-off-by: Edwin Xie <exie@vmware.com> * Use ParseInt instead of Atoi - to ensure that the bitsize is 32 for later casting to uint32 Signed-off-by: Christian Ang <angc@vmware.com> * Add @christianang to CODEOWNERS for forwardcrd Signed-off-by: Christian Ang <angc@vmware.com> Co-authored-by: Edwin Xie <exie@vmware.com>
2021-11-12Metrics: expand coredns_dns_responses_total with plugin label (#4914)Gravatar Miek Gieben 6-7/+71
* Metrics: expand coredns_dns_responses_total with plugin label This adds (somewhat hacky?) code to add a plugin label to the coredns_dns_responses_total metric. It's completely obvlious to the plugin as we just check who called the *recorder.WriteMsg method. We use runtime.Caller( 1 2 3) to get multiple levels of callers, this should be deep enough, but it depends on the dns.ResponseWriter wrapping that's occuring. README.md of metrics updates and test added in test/metrics_test.go to check for the label being set. I went through the plugin to see what metrics could be removed, but actually didn't find any, the plugin push out metrics that make sense. Due to the path fiddling to figure out the plugin name I doubt this works (out-of-the-box) for external plugins, but I haven't tested that. Signed-off-by: Miek Gieben <miek@miek.nl> * better comment Signed-off-by: Miek Gieben <miek@miek.nl> * Metrics: expand coredns_dns_responses_total with plugin label This adds (somewhat hacky?) code to add a plugin label to the coredns_dns_responses_total metric. It's completely obvlious to the plugin as we just check who called the *recorder.WriteMsg method. We use runtime.Caller( 1 2 3) to get multiple levels of callers, this should be deep enough, but it depends on the dns.ResponseWriter wrapping that's occuring. README.md of metrics updates and test added in test/metrics_test.go to check for the label being set. I went through the plugin to see what metrics could be removed, but actually didn't find any, the plugin push out metrics that make sense. Due to the path fiddling to figure out the plugin name I doubt this works (out-of-the-box) for external plugins, but I haven't tested that. Signed-off-by: Miek Gieben <miek@miek.nl> * Update core/dnsserver/server.go Co-authored-by: dilyevsky <ilyevsky@gmail.com> * Use [3]string Signed-off-by: Miek Gieben <miek@miek.nl> * imports Signed-off-by: Miek Gieben <miek@miek.nl> * remove dnstest changes Signed-off-by: Miek Gieben <miek@miek.nl> * revert Signed-off-by: Miek Gieben <miek@miek.nl> * Add some sleeps to make it less flaky Signed-off-by: Miek Gieben <miek@miek.nl> * Revert "Add some sleeps to make it less flaky" This reverts commit b5c6655196e3ad570555f086832ceb1f48f6f2d5. * Remove forward when not needed Signed-off-by: Miek Gieben <miek@miek.nl> * remove newline Signed-off-by: Miek Gieben <miek@miek.nl> Co-authored-by: dilyevsky <ilyevsky@gmail.com>
2021-11-12plugin/loadbalance: More consistent shuffling (#4961)Gravatar Chris O'Haver 1-6/+5
* fix shuffling Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * shuffle each record once Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-11-10Fix a typo in plugin/geoip/README.md (#4978)Gravatar xww 1-1/+1
Signed-off-by: xuweiwei <xuweiwei_yewu@cmss.chinamobile.com> Co-authored-by: xuweiwei <xuweiwei_yewu@cmss.chinamobile.com>
2021-11-08plugin/route53: Configurable AWS Endpoint (#4963)Gravatar Matt Palmer 3-4/+31
Provide the ability to configure the AWS endpoint Signed-off-by: Matthew Palmer <matthew.palmer@helpsystems.com>
2021-11-01Fix a typo in plugin/transfer/README.md (#4946)Gravatar Hu Shuai 1-1/+1
Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
2021-10-28plugin/metrics: support HTTPS qType in requests count metric label (#4934)Gravatar Pavol Lieskovský 3-4/+5
Automatically submitted.
2021-10-27plugin/k8s_external: fix SRV queries doesn't work with AWS ELB/NLB (#4929)Gravatar Denis Tingaikin 3-10/+24
* fix for issue #4927 Signed-off-by: denis-tingaikin <denis.tingajkin@xored.com> * apply review comments Signed-off-by: denis-tingaikin <denis.tingajkin@xored.com> * apply review comments Signed-off-by: denis-tingaikin <denis.tingajkin@xored.com>
2021-10-23plugin/pkg/cache: fix data race (#4932)Gravatar Wu Shuang 1-1/+1
2021-10-13cleanup deprecated package io/ioutil (#4920)Gravatar Zou Nengren 16-41/+30
Signed-off-by: zounengren <zouyee1989@gmail.com>
2021-10-11auto go fmtGravatar coredns[bot] 1-2/+2
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-10-08plugin/forward: Use new msg.Id for upstream queries (#4841)Gravatar Vector 1-0/+13
* restore 1.8.3 question revert logic; add tests (#4840) Signed-off-by: Chris O'Haver <cohaver@infoblox.com> Signed-off-by: Vector <815926354@qq.com> * change origin message id Signed-off-by: Vector <815926354@qq.com> Signed-off-by: IIvyPy <815926354@qq.com> * Revert "restore 1.8.3 question revert logic; add tests (#4840)" This reverts commit 95e44d91d03452556f5a8af64371fcf5f0b642d0. Signed-off-by: IIvyPy <815926354@qq.com> Co-authored-by: Chris O'Haver <cohaver@infoblox.com>
2021-10-06plugin/kubernetes: Don't use pod names longer than 63 characters as dns ↵Gravatar Chris O'Haver 2-3/+5
labels (#4908) Automatically submitted.
2021-09-22plugin/kubernetes: fix reload panic (#4881)Gravatar Chris O'Haver 1-1/+1
* fix reload panic Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * add comment Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * o import ordering Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-09-14plugin/file/auto: Write CNAME answer to client even if target lookup is ↵Gravatar Chris O'Haver 4-4/+28
SERVFAIL (#4863) * write cname answer to client even if target lookup is servfail Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * fix existing unit test expectations Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-09-07plugin/file: fix wildcard CNAME answer (#4828)Gravatar Kohei Yoshida 2-3/+41
* plugin/file: fix wildcard CNAME answer Signed-off-by: Yoshida <ykhr53@yokohei.com> * plugin/file: fix synthesized CNAME answer Signed-off-by: Yoshida <ykhr53@yokohei.com>
2021-09-04The IPv4 parser no longer accepts leading zeros (#4844)Gravatar rouzier 1-5/+2
Signed-off-by: James Rouzier <rouzier@gmail.com>
2021-08-31restore 1.8.3 question revert logic; add tests (#4840)Gravatar Chris O'Haver 2-1/+57
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-08-27Update upstream.Lookup method comment to reflect current state (#4832)Gravatar Ondřej Benkovský 1-1/+3
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2021-08-26upstream lookups are done with original EDNS options (#4826)Gravatar Ondřej Benkovský 1-7/+2
* upstream lookups are done with original EDNS options Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com> * fixup! upstream lookups are done with original EDNS options Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2021-08-16Rename reuse port/listen_*.go to better convey build inclusion reason (#4817)Gravatar Chris O'Haver 2-0/+0
* rename files to better convey build inclusion reason Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-08-16Revert "pkg/reuseport: Remove pre-go1.11 impl (#4795)" (#4814)Gravatar Chris O'Haver 2-0/+16
This reverts commit 4a34e8b8979f23a77000ad6580051b06d2e97508.
2021-08-16Update cache metrics (#4781)Gravatar Ben Kochie 3-3/+13
Add a total cache request counter to follow Prometheus conventions[0]. Mark the existing cache miss metric as deprecated. > Similarly, with hit or miss for caches, it’s better to have one > metric for total and another for hits. [0]: https://prometheus.io/docs/instrumenting/writing_exporters/#naming Signed-off-by: SuperQ <superq@gmail.com>
2021-08-13plugin/kubernetes: Only answer transfer requests for authoritative zones (#4802)Gravatar Chris O'Haver 2-0/+21
* check for zone match Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-08-12pkg/reuseport: Remove pre-go1.11 impl (#4795)Gravatar Manuel Rüger 2-16/+0
2021-08-03plugins/kubernetes: Switch to klog/v2 (#4778)Gravatar Manuel Rüger 1-1/+2
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
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>