Commit graph

1282 commits

Author SHA1 Message Date
Ben Kochie
a29a594e5c
Update more metrics names (#3799)
The subsystem of a metric must be it's plugin name. "dns" is reserved
for the core. Use a const convention to avoid copy-paste mistakes in
naming.

Fix dns64 and acl plugin.

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-03-31 20:03:18 +02:00
Zou Nengren
87214a4c5c
introduce metric naming test (#3789)
* introduce metric naming test

Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>

* Update metrics.go

Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
2020-03-31 08:07:36 +02:00
Yong Tang
ebbfffaf9d
Update k8s.io/[api|apimachinery|client-go] to v0.18.0 (#3796)
* Update k8s.io/[api|apimachinery|client-go] to v0.18.0

This PR updates k8s.io/[api|apimachinery|client-go] to v0.18.0

This PR closes 3791
This PR closes 3792
This PR closes 3793

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Fix test failures

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Fix failed tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Fix test failure

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2020-03-30 11:10:41 -07:00
Zou Nengren
8bbfa19223
remove federation (#3794)
Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
2020-03-30 09:08:20 -07:00
Zou Nengren
fa1e909d0b
regitry reload metrics (#3784)
Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
2020-03-27 09:40:59 +01:00
Chris O'Haver
5cd8472384
Fix plugin name in project README (#3683)
* Update README.md

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* fix readme occurances

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-03-26 10:24:56 -04:00
Ben Kochie
14ca454981
Documentation improvements for dns64 plugin (#3777)
Minor typo and improvements to the dns64 plugin README.

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-03-26 09:22:29 +01:00
Miek Gieben
19cfa2960c
Cleanup metrics (#3776)
Cleanup a variety of metric issues.
* Eliminate department of redundancy "count_total" naming.
* Use the plural of the unit when appropriate. (ex, "requests")
* Remove label names from metric names where appropriate. (ex, "rcode")
* Simplify request metrics by consolidating type label in to the base
request counter.
* Re-generate man pages.

Signed-off-by: Ben Kochie <superq@gmail.com>

Co-authored-by: Ben Kochie <superq@gmail.com>
2020-03-26 09:17:33 +01:00
Chris O'Haver
eb23cce1a7
add known issue (#3770)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-03-26 08:42:32 +01:00
Ben Kochie
4eeaef29ea
Add dns64 plugin (#3534)
* Add dns64 plugin

Add external plugin to core in-tree.
* Pull code from upstream: https://github.com/serverwentdown/dns64
* Update docs.

Signed-off-by: Ben Kochie <superq@gmail.com>

* Make dns64 consistent.

Signed-off-by: Ben Kochie <superq@gmail.com>

* Cleanup README

Signed-off-by: Ben Kochie <superq@gmail.com>

* Cleanup minor issues.

Signed-off-by: Ben Kochie <superq@gmail.com>

* Remove proxy method.

Signed-off-by: Ben Kochie <superq@gmail.com>

* dns64: big cleanup

* Make the code a bit more idiomatic
* Add tests
* use proper Upstream API

Signed-off-by: Casey Callendrello <c1@caseyc.net>
Signed-off-by: Ben Kochie <superq@gmail.com>

* A little more clenaup

* Fix some docs.
* Use the correct plugin register method.
* Cleanup some review items.

Signed-off-by: Ben Kochie <superq@gmail.com>

* Add metrics counter for DNS64 translations

Add a basic counter of how many DNS64 translations have been completed.

Signed-off-by: Ben Kochie <superq@gmail.com>

* Add DNSSEC bug link

Signed-off-by: Ben Kochie <superq@gmail.com>

* Test cleanup

Signed-off-by: Ben Kochie <superq@gmail.com>

* dns64: more test cleanup

Signed-off-by: Casey Callendrello <c1@caseyc.net>

Co-authored-by: Casey Callendrello <c1@caseyc.net>
2020-03-26 08:42:23 +01:00
Zou Nengren
1dba31ee7d
export config file hash in a metric (#3768)
Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
2020-03-25 14:33:04 +01:00
Chris O'Haver
40c7b9174b
plugin/cache: fix negative cache masking cases (#3744)
* fix negative cache masking cases

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* remove unecessary param

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-03-20 10:05:09 +01:00
Chris O'Haver
d18b48e36c
register missing metric (#3756)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-03-17 21:19:52 +01:00
Miek Gieben
c52a51fac8
parse.HostPortorFile: return error when 0 found (#3742)
* parse.HostPortorFile: return error when 0 found

Return an error when we haven't found any nameservers. This is the
alternative considered in #3735. It's also slighly less code to be
changing.

Replaces: #3741
Closes: #3741 #3735

Signed-off-by: Miek Gieben <miek@miek.nl>

* Add extra test case here as well

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-03-13 14:23:10 +01:00
Darshan Chaudhary
085826776f
Add private DNS support for azure plugin (#3516)
* plugin/azure: fix bug in setting up plugin

Signed-off-by: darshanime <deathbullet@gmail.com>

* plugin/azure: add support for private zones

Signed-off-by: darshanime <deathbullet@gmail.com>

* plugin/azure: change syntax for access level

Signed-off-by: darshanime <deathbullet@gmail.com>

* plugin/azure: change import alias for azure dns

Signed-off-by: darshanime <deathbullet@gmail.com>

* plugin/azure: reword readme, var names

Signed-off-by: darshanime <deathbullet@gmail.com>

* plugin/azure: remove newline in imports

Signed-off-by: darshanime <deathbullet@gmail.com>

* fix import grouping

Co-authored-by: Chris O'Haver <cohaver@infoblox.com>
2020-03-10 15:22:23 -04:00
Christian Tryti
116bda4d27
Add configuration flag to set if RecursionDesired should be set on health checkers in Forward-plugin (#3679)
* Make the RD-flag in health-checks in the Forward-plugin configurable

Introduces a new configuration flag; `health_check_non_recursive`. This
flag makes the health-checker do non-recursive requests when checking
the health of upstream servers.

Signed-off-by: Geir Haugom <ghagit@haugom.org>
Signed-off-by: Christian Tryti <ctryti@gmail.com>

* Changes after feedback from reviewer

* Better tests of health-checks with and without recursion
* Removed the health_check_non_recursive configuration in favor of
extending the existing health_check configuration. Now supports an
optional `no_rec` argument.

Signed-off-by: Christian Tryti <ctryti@gmail.com>

* Add new test that checks setup of health_check.

Signed-off-by: Christian Tryti <ctryti@gmail.com>
2020-03-06 11:52:43 +01:00
Miek Gieben
b8e96b61fc
Update README.md (#3721)
Signed-off-by: imba-tjd <imba-tjd@users.noreply.github.com>
2020-03-05 11:09:19 +01:00
Chris O'Haver
1339b89a8b
explain drop metric (#3706)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-02-29 07:07:49 +00:00
Kohei Yoshida
813cc5d08e
plugin/hosts: Modifies NODATA handling (#3536)
* Modifies NODATA handling

Signed-off-by: ykhr53 <ykhr53@yokohei.com>

* fix some comments

Signed-off-by: ykhr53 <ykhr53@yokohei.com>

* fix test code to take care NODATA

Signed-off-by: ykhr53 <ykhr53@yokohei.com>

* add if statement to avoid nil pointer

Signed-off-by: ykhr53 <ykhr53@yokohei.com>

* Modifies NODATA handling

Signed-off-by: ykhr53 <ykhr53@yokohei.com>

* fix some comments

Signed-off-by: ykhr53 <ykhr53@yokohei.com>

* fix test code to take care NODATA

Signed-off-by: ykhr53 <ykhr53@yokohei.com>

* add if statement to avoid nil pointer

Signed-off-by: ykhr53 <ykhr53@yokohei.com>
2020-02-24 20:03:53 +01:00
Chris O'Haver
6ef105ced3
return all records with matching ip (#3687)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-02-21 07:24:02 +01:00
Miek Gieben
ed1841c36f
metrics: add type to latency as well (#3685)
Automatically submitted.
2020-02-19 08:57:42 +00:00
LongKB
c8a6b16d86
Replacing 'HTTP' by 'HTTPS' for securing links (#3682)
Currently, when we access github.com with HTTP, it is redirected to HTTPS automatically. So this commit aims to replace http://github.com by https://github.com for security.

Signed-off-by: Kim Bao Long <longkb@vn.fujitsu.com>
2020-02-18 08:08:10 +01:00
Andy Bursavich
1da96807ec
plugin/template: fix panic when missing next handler (#3672)
Signed-off-by: Andy Bursavich <abursavich@gmail.com>
2020-02-15 22:11:19 +01:00
Miek Gieben
c4fc5cb54a
plugin/pkg/up: make default intervals shorter (#3651)
* plugin/pkg/up: make default intervals shorter

I think 15 min is too high, make this lower to react faster.

Signed-off-by: Miek Gieben <miek@miek.nl>

* Update README

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-02-06 19:28:53 +01:00
Chris O'Haver
1818df0d06
Update README.md (#3655) 2020-02-05 10:19:04 -05:00
Ricky S
efbe4ac5e8
Add exponential backoff to healthcheck (#3643)
Move exponential backoff initialization to Start()

Signed-off-by: RickyRajinder <singh.sangh@gmail.com>

Move comment

Increase max interval and update README

Remove trailing whitespace

Change Start() param name back to interval
2020-02-04 14:19:48 +01:00
Chris O'Haver
22cd28a798
plugins/forward: Add max_concurrent option (#3640)
* count and limit concurrent queries

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* add option

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* return servfail when limit exceeded

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* docs

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* docs

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* docs

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* review feedback

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* move atomic counter to beginning of struct

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* add comment for ErrLimitExceeded

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* rename option to max_concurrent

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* add metric

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* response REFUSED; incl max in error; add more docs

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* avoid err setup race

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>

* respond SERVFAIL; doc memory usage

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-02-04 13:59:08 +01:00
Chris O'Haver
c9d567ab44
plugin/kubernetes: fix metadata (#3642)
Automatically submitted.
2020-01-31 19:35:22 +00:00
Miek Gieben
f77c6e55bf
presubmit: test README.md sections (#3644)
Automatically submitted.
2020-01-31 11:37:24 +00:00
Miek Gieben
995179a6c6
presubmit: check import path ordering (#3636)
Add a test for this as well as it's annoying to point out in every code
review.
Fix all the import paths that are flagged by this new test.

Fixes: #3634

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-01-30 09:19:26 +00:00
Chris O'Haver
488464b686
fix error formatting (#3639)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-01-29 11:52:35 -05:00
Miek Gieben
672ce6d04e
Fix acl page (#3626)
* Fix acl page

It must have a Name section.

Fixes: https://github.com/coredns/coredns.io/issues/177

Signed-off-by: Miek Gieben <miek@miek.nl>

* generate

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-01-27 16:47:42 +01:00
Erfan Besharat
baaa834dc1 plugin/acl: document metrics in README (#3605)
Signed-off-by: Erfan Besharat <erbesharat@gmail.com>
2020-01-18 16:46:57 +01:00
Miek Gieben
5f159ca464 gofmt -w -s **/*.go (#3603)
format and remove trailing white space; makes 'make presubmit' pass
again.

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-01-17 10:47:45 -05:00
Miek Gieben
c95faea624
docs: update README and log plugin (#3602)
README: remove the logo thing as we stopped doing that
log: remote the lines about the clock output as that's gone as well and
     discuss the query log vs other logging a bit.

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-01-17 16:16:29 +01:00
Brad P. Crochet
aa8c325d4a Fix HostPortOrFile to support IPv6 addresses with zone (#3527)
1. The HostPortOrFile tests don't have any IPv6 tests. This adds some.
2. The HostPortOrFile breaks if any of the addresses have IPv6 zone
defined. ParseIP does not handle %zone anymore.

Signed-off-by: Brad P. Crochet <brad@redhat.com>
2020-01-16 20:47:39 +01:00
Miek Gieben
2221b6160c sign: add expiration jitter (#3588)
* add expiration jitter

Signed-off-by: Miek Gieben <miek@miek.nl>

* sign: add expiration jitter

This PR adds a expiration jitter to spread out zone re-signing even
more. The max is 5 extra days added when creating the signer for a
specific zone.

Also make the duration* constants private to clean up the godoc for this
plugin.

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-01-12 04:56:57 -08:00
Zheng Xie
f81f28d97b plugin/cache: update comment to conform to the implementation (#3573)
Signed-off-by: zheng xie <xiez1989@gmail.com>
2020-01-03 14:26:53 +01:00
Jonathan Nagy
e3266d24f7 Resolve TXT records via CNAME (#3557)
* 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>
2020-01-03 14:16:04 +01:00
Zou Nengren
99e7c3dee7 registry cache_miss logic (#3578)
Signed-off-by: zouyee <zounyee1989@gmail.com>
2020-01-03 10:06:37 +01:00
Miek Gieben
fc546cf129
doc: fix generated manual pages (#3571)
Went over all generated manual pages and fixed some markdown issues,
mostly escaping "_" to avoid underlining entire paragraphs.

Some textual fixes in route53 and other cloud DNS plugins.

Regenerated the markdown with mmark.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-12-29 13:35:17 +01:00
Antonio Ojea
e1cf9ccdab Bump kubernetes plugin schema version (#3554)
The Kubernetes DNS specification schema version was
updated to 1.1.0 in order to support IPv6

Signed-off-by: Antonio Ojea <antonio.ojea.garcia@gmail.com>
2019-12-19 09:34:03 -05:00
Zou Nengren
dded126317 bump k8s releated library (#3552)
Signed-off-by: zouyee <zounengren@cmss.chinamobile.com>
2019-12-18 05:32:00 -08:00
Zou Nengren
5e04c27238 Dedup policy implement between grpc and proxy plugin (#3537)
Signed-off-by: zouyee <zounengren@cmss.chinamobile.com>
2019-12-17 08:15:31 +00:00
Yong Tang
a34d564c07 Remove trailing whitespace as otherwise make check fails (#3515)
This PR removes trailing whitespace as otherwise `make check` fails

This PR fixes 3513

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-12-07 15:47:18 +00:00
Miek Gieben
a53321d9d6
plugin/sign: fix signing of authoritative data (#3479)
Don't sign data we are not authoritative for. This adds an AuthWalk
which skips names we should not authoritative for. Adds a few tests to
check this is the case. Generates zones have been compared to
dnssec-signzone.

A number of changes have been made:

* don't add DS records to the apex
* NSEC TTL is the SOA's minttl value (copying bind9)
* Various cleanups
* signer struct was cleaned up: doesn't need ttl, nor expiration or
  inception.
* plugin/sign: remove apex stuff from names()
  This is never used because we will always have other types in the
  apex, because we *ADD* them ourselves, before we sign (DNSKEY, CDS and
  CDNSKEY).

Signed-off-by: Miek Gieben <miek@miek.nl>
Co-Authored-By: Chris O'Haver <cohaver@infoblox.com>
2019-12-06 19:54:31 +00:00
Zou Nengren
799dce4bff redirect handler for pprof index (#3503)
Signed-off-by: zouyee <zounengren@cmss.chinamobile.com>
2019-12-06 19:04:49 +00:00
Zou Nengren
13fca02316 use pkg/reuseport in rest plugins (#3492)
Automatically submitted.
2019-12-06 10:55:40 +00:00
Gonzalo Paniagua Javier
b4df2d0d4c Add a serve_stale option for plugin/cache (#3468)
Automatically submitted.
2019-11-29 15:17:50 +00:00
Miek Gieben
24176a97e6
Move to CODEOWNERS (#3489)
* Move to CODEOWNERS

No change in who own what; just a move to CODEOWNERS. This allows
dreck cleanups.

Added .dreck.yaml for alias and exec.

Fixes: #3486

Signed-off-by: Miek Gieben <miek@miek.nl>

* stickler bot

Signed-off-by: Miek Gieben <miek@miek.nl>

* sort the file

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-11-29 13:17:05 +00:00