Commit Graph

2775 Commits

Author SHA1 Message Date
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
dependabot[bot]
efc9203c38 build(deps): bump github.com/golang/protobuf from 1.4.3 to 1.5.2 (#4575)
Bumps [github.com/golang/protobuf](https://github.com/golang/protobuf) from 1.4.3 to 1.5.2.
- [Release notes](https://github.com/golang/protobuf/releases)
- [Commits](https://github.com/golang/protobuf/compare/v1.4.3...v1.5.2)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-21 09:50:47 -07:00
dependabot[bot]
994fd83681 build(deps): bump github.com/Azure/azure-sdk-for-go (#4579)
Bumps [github.com/Azure/azure-sdk-for-go](https://github.com/Azure/azure-sdk-for-go) from 53.1.0+incompatible to 53.3.0+incompatible.
- [Release notes](https://github.com/Azure/azure-sdk-for-go/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Azure/azure-sdk-for-go/compare/v53.1.0...v53.3.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-21 09:50:35 -07:00
milgradesec
76eeae01ec Enable DependaBot (#4571)
* Create dependabot.yml

Signed-off-by: milgradesec <38557680+milgradesec@users.noreply.github.com>

* Update dependabot.yml

Signed-off-by: milgradesec <38557680+milgradesec@users.noreply.github.com>
2021-04-21 09:24:16 -07:00
Yong Tang
cedf6ffddc Disable CodeCov on commit push (#4572)
As commit push holds write access of GITHUB_TOKEN, we may
want to limit the scope of third-party test run.

This PR disable CodeCov on commit push. Pull request is still
ok.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2021-04-16 07:38:42 -07:00
coredns[bot]
52440be79e auto go mod tidy
Signed-off-by: coredns[bot] <bot@bot.coredns.io>
2021-04-14 10:30:48 +00:00
Yong Tang
6cbd6fdb1f Update dependencies (#4569)
As dependabot has been failing for some time,
this PR manually updates all dependencies when possible.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2021-04-09 14:41:57 -04:00
Chris O'Haver
9e7fe18088 Manually update k8s.io packages to k8s 1.21 api v0.21.0 (#4567) 2021-04-09 06:40:25 -07:00
Miek Gieben
13cef2ee09 plugin/dnssec: use entire RRset as key input (#4537)
* plugin/dnssec: use entire RRset as key input

This uses the entire rrset as input for the hash key; this is to detect
differences in the RRset and generate the correct signature.

As this would then lead to unbounded growth, we periodically (every 8h)
prune the cache of old entries. In theory we could rely on the random
eviction, but it seems nicer to do this in a maintannce loop so that we
remove the unused ones. This required adding a Walk function to the
plugin/pkg/cache.

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

* Update plugin/dnssec/cache.go

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

Co-authored-by: Chris O'Haver <cohaver@infoblox.com>
2021-04-05 06:45:28 -07:00
cuirunxing-hub
454bc9e0b9 typos correct (#4560)
Signed-off-by: cuirunxing-hub <cuirunxing@inspur.com>
2021-04-05 09:34:25 -04:00
Chris O'Haver
9f72db12e7 plugin/kubernetes: do endpoint/slice check in retry loop (#4492)
* do endpoint/slice check in retry loop

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-03-26 08:54:39 -04:00
Mohammad Yosefpor
ea41dd23a0 plugin/bind: exclude interface or ip address (#4543)
* plugin/bind: exclude interface or ip address

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

* fix README.md

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

* Apply suggestions, Fix test

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

* Apply suggestions, move errs to setup

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>
2021-03-25 16:38:17 +01:00
Frank Riley
5b9b079dab Add cache eviction metrics to the cache plugin (#4411)
Signed-off-by: Frank Riley <fhriley@gmail.com>
2021-03-21 16:58:16 +01:00
Miek Gieben
ed3f287fe8 metrics: remove RR type (#4534)
To combat label cardinality explosions remove the type from metrics.
This was most severe in the histogram for request duration, remove it
there.

It's also highlighted difference between grpc and forward code, where
forward did use type and grpc didn't; getting rid of all that "fixes"
that discrepancy

Move monitor.go back into the vars directory and make it private again.
Also name it slightly better

Fixes: #4507

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-03-19 12:59:26 +01:00
Miek Gieben
634e3fe8f5 plugin/health: add logging for local health request (#4533) 2021-03-19 03:40:38 -07:00
Miek Gieben
8faca26873 plugin/bind: tweak error messages (#4532)
When the interface doesn't exist you get:

plugin/bind: not a valid IP address: eth0

Fix the wording that this can also be interface name. Also %q the
argument in the error mesg.

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-03-18 15:39:40 +01:00
Mohammad Yosefpor
deb09c8905 plugin/bind: Discard link-local addresses on binding by interface name (#4531)
* Discard link-local addresses on binding

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

* Update plugin/bind: README.md

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>

* Except for IPv6 link-local only

Signed-off-by: Mohammad Yosefpor <myusefpur@gmail.com>
2021-03-18 10:54:57 +01:00
Miek Gieben
1b2f0bef6f workflow: move committing workflows to schedule (#4529)
This moves all workflows that commit to a schedule, so that it _doesn't_
push into peoples PRs as that enlarges them and is just non-obvious.

They run throughout the week.

Also change the "user" we use for this, so that DCO believes it a real
email address (DCO is pretty stupid here). Update the authors target to
filter out this bot as well.

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-03-18 09:53:46 +01:00