Commit graph

2842 commits

Author SHA1 Message Date
Ben Kochie
9edfaed631
Reduce the cardinality of health endpoint metrics (#4650)
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-27 15:16:38 +02:00
uesyn
4c0fdc3909
plugin/kubernetes: consistently choose EndpointSlices or Endpoints for 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-27 08:48:52 -04:00
Chris O'Haver
d8a0d97df2
deprecate Normalize and MustNormalize (#4648)
* 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-27 13:26:14 +02:00
coredns[bot]
b56f2efe54 auto go mod tidy
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-05-26 10:37:37 +00:00
dependabot[bot]
037802dae5
build(deps): bump google.golang.org/grpc from 1.37.1 to 1.38.0 (#4643)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.37.1 to 1.38.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.37.1...v1.38.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-24 07:33:16 -07:00
dependabot[bot]
ca9a8584eb
build(deps): bump k8s.io/client-go from 0.21.0 to 0.21.1 (#4646)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.21.0 to 0.21.1.
- [Release notes](https://github.com/kubernetes/client-go/releases)
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.21.0...v0.21.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-24 10:07:51 -04:00
dependabot[bot]
2741b5d3ca
build(deps): bump github.com/prometheus/common from 0.24.0 to 0.25.0 (#4644)
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.24.0 to 0.25.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.24.0...v0.25.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-24 06:48:34 -07:00
dependabot[bot]
5fdfb67484
build(deps): bump k8s.io/apimachinery from 0.21.0 to 0.21.1 (#4642)
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.21.0 to 0.21.1.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.21.0...v0.21.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-24 06:47:55 -07:00
dependabot[bot]
fa5f715dfa
build(deps): bump google.golang.org/api from 0.29.0 to 0.47.0 (#4641)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.29.0 to 0.47.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.29.0...v0.47.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-24 06:47:44 -07:00
dependabot[bot]
e097dfdc2d
build(deps): bump github.com/aws/aws-sdk-go from 1.38.40 to 1.38.45 (#4640)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.38.40 to 1.38.45.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.38.40...v1.38.45)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-24 06:47:30 -07:00
Miek Gieben
163ac033ae
Revert "plugin/file: Fix in wrong answers returned when wildcard and concrete records exist (#4599)" (#4633)
reverting as I don't want to release 1.8.4 with this enabled.

This reverts commit fbf3f07f46.
2021-05-20 16:25:18 -04:00
Chris O'Haver
0348b019be
plugin/forward: Document and warn for unsupported FROM CIDR notations (#4639)
* 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-20 09:24:36 +02:00
Miek Gieben
5d80a6e21e
Fix obsure crash in Corefile parsing (#4637)
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-19 10:38:37 -07:00
Chris O'Haver
df736adbc8
bump etcd to v3.5.0-beta3 (#4638)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-19 09:30:06 -07:00
coredns[bot]
5ebcea9ccd auto go mod tidy
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-05-19 10:31:30 +00:00
Chris O'Haver
e4f7f19f58
bump etcd to v3.5.0-beta2 (#4635)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-19 11:03:33 +02:00
Jason Du
fbf3f07f46
plugin/file: Fix in wrong answers returned when wildcard and concrete 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-17 13:21:08 -07:00
Miek Gieben
5f41d8eb1f
reverse zone: fix Normalize (#4621)
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-17 13:19:54 -07:00
Chris O'Haver
5409379648
consider nil ready as ready (#4632)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-17 16:10:30 -04:00
dependabot[bot]
fc24fe076f
build(deps): bump github.com/aws/aws-sdk-go from 1.38.37 to 1.38.40 (#4630)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.38.37 to 1.38.40.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.38.37...v1.38.40)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-17 00:24:08 -07:00
dependabot[bot]
aaad8dbf14
build(deps): bump github.com/prometheus/common from 0.23.0 to 0.24.0 (#4629)
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.23.0 to 0.24.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.23.0...v0.24.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-17 00:23:54 -07:00
Jason Du
d1f520a5b2
Fix etcd to use v3.5.0-alpha.0 (#4628)
Signed-off-by: Jason Du <xdu@infoblox.com>
2021-05-14 23:55:01 -07:00
Miek Gieben
ef0feaed31
1.8.4 notes: set date to today (#4627) 2021-05-14 07:09:55 -07:00
Keith Coleman
184d5e5214
check for two days of remaining validity (#4606)
Signed-off-by: Keith C <keith@fraudmarc.com>
2021-05-14 10:49:16 +02:00
Yong Tang
7b43d04269
Update 1.8.4 note, in preparation of release (#4624) 2021-05-12 14:12:55 -07:00
Chris O'Haver
03bfc8b033
add note about endpointslice list/watch requirement (#4623)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-12 11:08:17 -07:00
coredns[bot]
3f64a21329 auto go mod tidy
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-05-12 10:31:32 +00:00
Miek Gieben
795c02eff9
Add preliminary notes for 1.8.4 (#4535)
* Add preliminary notes for 1.8.4

Draft notes for 1.8.4

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

* Update notes/coredns-1.8.4.md

Co-authored-by: Chris O'Haver <cohaver@infoblox.com>

* Update notes/coredns-1.8.4.md

Co-authored-by: Chris O'Haver <cohaver@infoblox.com>

* Update notes/coredns-1.8.4.md

Co-authored-by: Chris O'Haver <cohaver@infoblox.com>

Co-authored-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-11 10:37:01 +02:00
dependabot[bot]
c6cd160ec4
build(deps): bump github.com/aws/aws-sdk-go from 1.38.30 to 1.38.37 (#4619)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.38.30 to 1.38.37.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.38.30...v1.38.37)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-11 10:32:36 +02:00
Miek Gieben
e42614edc5
reverse zones (#4538)
* core: fix v4 non-octet reverse zones

This fixes the reverse zones handling. Add expanstion of the reverse
notation to all octet boundary subnets and add those to the config - just as if
they were directly typed in the config.

This takes inspiration from #4501, but that (even with DCO!!) seems to
be just using https://github.com/apparentlymart/go-cidr/ so use that
instead - I think a minor function is still needed that one is copied
from #4501.

Also sort the zones we are listing on startup - caught in this PR
because of the expanded zones being not listed next to each other.

This also removes the need for FilterFunc from the config, so this is
now gone as well, making the whole thing slightly more efficient.

Add couple of reverse unit tests and a e2e test that queries for the
correct (and incorrect) reverse zones and checks the reply.

Closes: #4501
Fixes: #2779

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

* Add more test cases

Add test from origin bug report: #2779

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

* Rebase and fix conflicts

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-05-11 09:50:18 +02:00
Steve Greene
fdfc9bcdd2
test: Fix rare race condition in TestZoneReload (#4617)
The following test failure for `TestZoneReload` can be observed
periodically:

`file_reload_test.go:58: Expected two RR in answer section got 2`

This failure can be consistently reproduced using the following command
(on my machine, at least):

`( cd test ; go test -v -race -run "TestZoneReload" ./... -count=500)`

test/file_reload_test.go:

Address a typo in a test failure message.

Sleep for double the file reload interval to avoid a rare
race condition between test code and the file plugin's reload code,
which is presumably a result of the time it takes to actually reload.

Signed-off-by: Stephen Greene <sgreene@redhat.com>
2021-05-11 09:11:20 +02:00
Chris O'Haver
0a3375e76b
copy unready exclusion to v1beta1 func (#4616)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-10 13:29:56 -04:00
Chris O'Haver
24547447d0
plugin/kubernetes: Support both v1 and v1beta1 EndpointSlices (#4570)
* 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-10 09:57:23 -07:00
dependabot[bot]
7354552296
build(deps): bump github.com/miekg/dns from 1.1.41 to 1.1.42 (#4612) 2021-05-10 06:08:54 -07:00
Keith Coleman
611500b7d4
plugin/dnssec: interface type correction for periodicClean sig validity check (#4608)
Signed-off-by: Keith C <keith@fraudmarc.com>
2021-05-06 10:33:16 +02:00
Yury Tsarev
8487111871
Add Absa to Adopters list (#4604)
Signed-off-by: Yury Tsarev <yury.tsarev@absa.africa>
2021-05-05 14:41:31 +02:00
Théotime Lévêque
8e17f753d9
Add backmarket.com to adopters list (#4603) 2021-05-05 05:15:12 -07:00
coredns[bot]
2d46aee137 auto go mod tidy
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-05-05 10:30:45 +00:00
Chris O'Haver
d6d8a9974b
plugin/kubernetes: fix SOA response for non-apex queries (#4592)
* 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-04 11:05:08 +02:00
Chris O'Haver
e1931d48d1
collect endpoint node name from endopintslices (#4581)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-05-04 10:55:49 +02:00
wangchenglong01
b881a1ef13
Add error check to avoid panic (#4584)
* 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-04 10:08:06 +02:00
Uwe Krueger
40edf1e566
plugin/rewrite: streamline the ResponseRule handling. (#4473)
* 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>
2021-05-04 10:05:45 +02:00
ntoofu
696c8731d6
plugin/etcd: Fix inconsistent names of glue records with TargetStrip (#4595)
* etcd plugin: Add testcases for `TargetStrip` feature

Signed-off-by: ntoofu <ntoofu@users.noreply.github.com>

* etcd plugin: Fix inconsistent names in glue records

Signed-off-by: ntoofu <ntoofu@users.noreply.github.com>
2021-05-03 08:48:51 -07:00
dependabot[bot]
32e2bd1ddd
build(deps): bump github.com/prometheus/common from 0.21.0 to 0.23.0 (#4596) 2021-05-03 02:23:20 -07:00
dependabot[bot]
b37eb74498
build(deps): bump github.com/aws/aws-sdk-go from 1.38.25 to 1.38.30 (#4597) 2021-05-03 02:22:04 -07:00
coredns[bot]
dd255d4ce4 auto go mod tidy
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-04-28 10:31:52 +00:00
Chris O'Haver
ef53f372ee
exclude unready endpoints from endpointslices (#4580)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-04-27 12:29:32 -04:00
dependabot[bot]
236c6cee68
build(deps): bump github.com/prometheus/common from 0.18.0 to 0.21.0 (#4589) 2021-04-26 06:34:01 -07:00
dependabot[bot]
51607fcdf8
build(deps): bump github.com/aws/aws-sdk-go from 1.38.16 to 1.38.25 (#4587) 2021-04-26 06:33:36 -07:00
dependabot[bot]
60a46ccec0
build(deps): bump github.com/prometheus/client_golang (#4577)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.9.0...v1.10.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-21 10:38:42 -07:00