Commit Graph

1069 Commits

Author SHA1 Message Date
Ondřej Benkovský
b546031f9b plugin/dns64 : add support for DNS requests over IPv4 network (#4809) 2022-01-07 11:16:23 -05:00
Ting Yuan
39a99a5bbe fix goroutine leaks in TestRoute53 (#5070)
Signed-off-by: Ting Yuan <yuanting@ict.ac.cn>
2022-01-05 05:20:32 -08:00
Ben Kochie
74f3bea50f Convert HostPortOrFile error to var (#5058)
Convert "no nameservers found" error on parse.HostPortOrFile() to an
exported var for use with `errors.Is()`.

Signed-off-by: SuperQ <superq@gmail.com>
2021-12-23 12:02:28 -05:00
Chris O'Haver
ca476cec30 add wildcard query deprection notice to kubernetes readme (#5045)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-12-17 16:57:32 -05:00
LiuCongran
4c051254fe fix invalid reload when multiple file plugins (#5020)
Signed-off-by: crliu3227 <liucongran327@163.com>
2021-12-09 08:43:10 -08:00
Chris O'Haver
744468ea78 add wildcard warnings (#5030)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-12-09 08:24:48 -08:00
jayonlau
e5ea3341fa Clean up extra spaces (#5027) 2021-12-08 08:26:14 -08:00
xuweiwei
b7b62b38ef plugin/kubernetes: clean code (#5017)
Signed-off-by: xuweiwei <xuweiwei_yewu@cmss.chinamobile.com>
2021-12-01 09:26:18 -05:00
xuweiwei
7e12327ab1 plugin/geoip: cleanup code (#5009)
remove unnecessary float64 convert and clean code

Signed-off-by: xuweiwei <xuweiwei_yewu@cmss.chinamobile.com>
2021-11-24 09:24:49 +01:00
Ondřej Benkovský
b8439789f4 support plain HTTP for DoH (#4997)
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2021-11-23 14:03:26 +01:00
OctoHuman
29f6d0a6b2 Docs: Add warning to use tls_servername (#4992)
Signed-off-by: OctoHuman <17958767+OctoHuman@users.noreply.github.com>
2021-11-22 08:49:13 +01:00
Miek Gieben
a9d9d2b71e plugin/bind: Point to MacOS bug (#4995)
Document this is a bug.

Closes: 4993

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-11-21 12:15:27 -05:00
gomakesix
71bb575b71 plugin/auto: Fix panic caused by config invalid reload value (#4986)
Automatically submitted.
2021-11-19 16:19:25 +00:00
xuweiwei
e799a0f5c7 plugin/file: Fix print tree error (#4962)
Automatically submitted.
2021-11-19 16:18:31 +00:00
xuweiwei
5f900b86f5 cleanup some code (#4989)
Automatically submitted.
2021-11-19 16:15:58 +00:00
xuweiwei
1029fea906 Fix a typo in plugin/health (#4982)
Signed-off-by: xuweiwei <xuweiwei_yewu@cmss.chinamobile.com>
2021-11-15 07:29:52 -05:00
coredns[bot]
92b0227592 auto go fmt
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-11-15 10:33:24 +00:00
Chris O'Haver
3288b111b2 Revert "Initial implementation of ForwardCRD plugin (#4512)" (#4981)
This reverts commit 2e6953c7db.
2021-11-12 13:19:16 -05:00
Christian Ang
2e6953c7db Initial implementation of ForwardCRD plugin (#4512)
* 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-12 11:22:34 -05:00
Miek Gieben
6953ab2b4f Metrics: expand coredns_dns_responses_total with plugin label (#4914)
* 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 b5c6655196.

* 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-12 16:07:05 +00:00
Chris O'Haver
29cae57932 plugin/loadbalance: More consistent shuffling (#4961)
* 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-12 16:00:20 +00:00
xww
f6ffafe229 Fix a typo in plugin/geoip/README.md (#4978)
Signed-off-by: xuweiwei <xuweiwei_yewu@cmss.chinamobile.com>

Co-authored-by: xuweiwei <xuweiwei_yewu@cmss.chinamobile.com>
2021-11-10 21:20:40 -05:00
Matt Palmer
e53bff9043 plugin/route53: Configurable AWS Endpoint (#4963)
Provide the ability to configure the AWS endpoint

Signed-off-by: Matthew Palmer <matthew.palmer@helpsystems.com>
2021-11-08 06:45:45 -08:00
Hu Shuai
8a7f4df2a1 Fix a typo in plugin/transfer/README.md (#4946)
Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
2021-11-01 11:06:13 -04:00
Pavol Lieskovský
5934c7e89e plugin/metrics: support HTTPS qType in requests count metric label (#4934)
Automatically submitted.
2021-10-28 08:50:23 +00:00
Denis Tingaikin
de21fb2436 plugin/k8s_external: fix SRV queries doesn't work with AWS ELB/NLB (#4929)
* 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-27 09:59:21 -04:00
Wu Shuang
4a7565ff63 plugin/pkg/cache: fix data race (#4932) 2021-10-23 20:17:47 -07:00
Zou Nengren
5191959bd7 cleanup deprecated package io/ioutil (#4920)
Signed-off-by: zounengren <zouyee1989@gmail.com>
2021-10-13 09:30:31 +02:00
coredns[bot]
5b65a58d48 auto go fmt
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-10-11 10:28:01 +00:00
Vector
0f5e7bdfb3 plugin/forward: Use new msg.Id for upstream queries (#4841)
* 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 95e44d91d0.

Signed-off-by: IIvyPy <815926354@qq.com>

Co-authored-by: Chris O'Haver <cohaver@infoblox.com>
2021-10-08 19:34:22 +02:00
Chris O'Haver
5534625c75 plugin/kubernetes: Don't use pod names longer than 63 characters as dns labels (#4908)
Automatically submitted.
2021-10-06 15:59:37 +00:00
Chris O'Haver
e742b5ee34 plugin/kubernetes: fix reload panic (#4881)
* 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-22 16:28:51 +02:00
Chris O'Haver
158ad2d738 plugin/file/auto: Write CNAME answer to client even if target lookup is 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-14 10:08:22 +02:00
Kohei Yoshida
5f6baf2973 plugin/file: fix wildcard CNAME answer (#4828)
* 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-07 12:21:11 -07:00
rouzier
a644eb4472 The IPv4 parser no longer accepts leading zeros (#4844)
Signed-off-by: James Rouzier <rouzier@gmail.com>
2021-09-04 08:34:57 +02:00
Chris O'Haver
9b3b2679f5 restore 1.8.3 question revert logic; add tests (#4840)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-08-31 10:34:26 +02:00
Ondřej Benkovský
de30710ed3 Update upstream.Lookup method comment to reflect current state (#4832)
Signed-off-by: Ondřej Benkovský <ondrej.benkovsky@jamf.com>
2021-08-27 14:23:05 +02:00
Ondřej Benkovský
9026a4a295 upstream lookups are done with original EDNS options (#4826)
* 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-26 09:39:44 -07:00
Chris O'Haver
2740005d3e Rename reuse port/listen_*.go to better convey build inclusion reason (#4817)
* rename files to better convey build inclusion reason

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-08-16 15:10:24 -04:00
Chris O'Haver
a977998747 Revert "pkg/reuseport: Remove pre-go1.11 impl (#4795)" (#4814)
This reverts commit 4a34e8b897.
2021-08-16 08:57:26 -07:00
Ben Kochie
7d542fec67 Update cache metrics (#4781)
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-16 13:54:36 +08:00
Chris O'Haver
88d94dc148 plugin/kubernetes: Only answer transfer requests for authoritative zones (#4802)
* check for zone match

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-08-13 11:02:00 -04:00
Manuel Rüger
4a34e8b897 pkg/reuseport: Remove pre-go1.11 impl (#4795) 2021-08-12 22:46:35 -07:00
Manuel Rüger
4758070425 plugins/kubernetes: Switch to klog/v2 (#4778)
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2021-08-03 20:22:36 -07:00
coredns[bot]
4c41c49a93 auto go fmt
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-08-02 10:29:33 +00:00
Mat Lowery
9d5b8cd13d kubernetes: Improve namespace usage (#4767)
* 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-29 23:27:25 -04:00
coredns[bot]
3f881c7202 auto remove trailing whitespaces
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-07-20 10:28:21 +00:00
coredns[bot]
fcc52d8038 auto go fmt
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-07-19 10:28:07 +00:00
Ondřej Benkovský
e0110264cc plugin/forward : add proxy address as tag (#4757)
Signed-off-by: Ondrej Benkovsky <ondrej.benkovsky@wandera.com>
2021-07-16 14:35:39 +02:00
Miek Gieben
50d888f3d7 plugin/header: run go gen and small doc updates (#4754)
* 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-15 10:10:16 +02:00