Commit Graph

2592 Commits

Author SHA1 Message Date
coredns-auto-go-mod-tidy[bot]
cad7a3d593 auto go mod tidy 2020-12-07 14:59:41 +00:00
dependabot-preview[bot]
9efd209b78 build(deps): bump github.com/dnstap/golang-dnstap from 0.2.2 to 0.3.0 (#4321)
Bumps [github.com/dnstap/golang-dnstap](https://github.com/dnstap/golang-dnstap) from 0.2.2 to 0.3.0.
- [Release notes](https://github.com/dnstap/golang-dnstap/releases)
- [Commits](https://github.com/dnstap/golang-dnstap/compare/v0.2.2...v0.3.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-12-07 06:59:00 -08:00
coredns-auto-go-mod-tidy[bot]
f0e61adf4a auto go mod tidy 2020-12-01 21:37:30 +00:00
dependabot-preview[bot]
d57014ebad build(deps): bump github.com/aws/aws-sdk-go from 1.35.33 to 1.35.35 (#4313)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.35.33 to 1.35.35.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.35.33...v1.35.35)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-12-01 13:36:48 -08:00
Chris O'Haver
9121e78496 plugin/kubernetes: Fix dns programming duration metric (#4255)
* get data reqd to record latency before calling toFuncs
* refactor out unnecessary toFunc wrappers
* remove latency metric unit tests per PR feedback

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-12-01 15:29:05 -05:00
coredns-auto-go-mod-tidy[bot]
56eea6e609 auto go mod tidy 2020-11-23 16:52:49 +00:00
dependabot-preview[bot]
1dc41abd44 build(deps): bump github.com/Azure/go-autorest/autorest (#4304)
Bumps [github.com/Azure/go-autorest/autorest](https://github.com/Azure/go-autorest) from 0.11.11 to 0.11.12.
- [Release notes](https://github.com/Azure/go-autorest/releases)
- [Changelog](https://github.com/Azure/go-autorest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Azure/go-autorest/compare/autorest/v0.11.11...autorest/v0.11.12)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-23 08:52:11 -08:00
dependabot-preview[bot]
10714bdbbc build(deps): bump github.com/aws/aws-sdk-go from 1.35.28 to 1.35.33 (#4305)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.35.28 to 1.35.33.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.35.28...v1.35.33)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-23 08:51:52 -08:00
Yong Tang
619a0aedc0 Switch from actions/setup-go@v2-beta to actions/setup-go@v2 to fix the GitHub Actions set-env failure (#4302)
This PR switches from actions/setup-go@v2-beta to actions/setup-go@v2 to fix the
GitHub Actions `set-env` failure. Without this PR the following error shown up
(see https://github.com/coredns/coredns/runs/1423802307):
```
Error: Unable to process command '::set-env name=GOROOT::/opt/hostedtoolcache/go/1.15.5/x64' successfully.
7
Error: The `set-env` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2020-11-19 15:40:41 -05:00
Miek Gieben
99f79817ac plugin/trace: cleanup README.md (#4280)
Various improvements to the documentation. Started because `⚠️`
isn't a markdown feature (replace with Note:).

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-11-19 12:19:50 +01:00
coredns-auto-go-mod-tidy[bot]
839c264a2b auto go mod tidy 2020-11-16 14:56:10 +00:00
dependabot-preview[bot]
56174636e7 build(deps): bump github.com/Azure/go-autorest/autorest (#4291)
Bumps [github.com/Azure/go-autorest/autorest](https://github.com/Azure/go-autorest) from 0.11.10 to 0.11.11.
- [Release notes](https://github.com/Azure/go-autorest/releases)
- [Changelog](https://github.com/Azure/go-autorest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Azure/go-autorest/compare/autorest/v0.11.10...autorest/v0.11.11)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-16 06:55:34 -08:00
coredns-auto-go-mod-tidy[bot]
803b5e767f auto go mod tidy 2020-11-16 14:03:49 +00:00
dependabot-preview[bot]
eea90ca665 build(deps): bump k8s.io/client-go from 0.19.2 to 0.19.4 (#4292)
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.19.2 to 0.19.4.
- [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.19.2...v0.19.4)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-16 06:03:06 -08:00
coredns-auto-go-mod-tidy[bot]
3e70e9e946 auto go mod tidy 2020-11-16 14:02:43 +00:00
dependabot-preview[bot]
9e92a716ea build(deps): bump github.com/aws/aws-sdk-go from 1.35.23 to 1.35.28 (#4296)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.35.23 to 1.35.28.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.35.23...v1.35.28)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-16 06:02:02 -08:00
Blake Ryan
c9c71d3904 plugin/azure return FQDN as MNAME in SOA record (#4286)
Automatically submitted.
2020-11-12 14:48:03 +00:00
Miek Gieben
2299c5b696 Add make notes target (#4276)
Automatically submitted.
2020-11-11 18:00:28 +00:00
Miek Gieben
9178f9d1ee Remove newlines between braces (#4279)
These are found with: `pcregrep -M "}\n\n}" **/*.go`
Sometimes a unneeded newline is inserted, remove those.

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-11-11 18:45:01 +01:00
coredns-auto-go-fmt[bot]
4b87be2a0e auto go fmt 2020-11-11 12:30:39 +00:00
Miek Gieben
32e1d5d07f auto test: increase sleep (#4282)
Doing a reload every 10ms and sleeping 10ms makes this too racy,
increase all those sleeps to 5ms. A better method would be to get
notified of the reload/change, this would require some polling to get
the RR we expect, with a much longer timeout to stop the test
eventually.

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-11-11 13:30:20 +01:00
Yong Tang
2845eaa916 Fix missing * in Go Fmt GitHub Actions (#4277)
Looks like one `*` is missing in Go Fmt GitHub Actions
and that causes the Actions not being triggered.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2020-11-11 07:43:46 +01:00
Bob
b7814204a4 plugin/trace: Fix zipkin json_v2 (#4180)
Automatically submitted.
2020-11-10 19:03:14 +00:00
coredns-auto-go-mod-tidy[bot]
dd2a1bfc82 auto go mod tidy 2020-11-09 16:10:37 +00:00
dependabot-preview[bot]
7a7952f29e build(deps): bump github.com/aws/aws-sdk-go from 1.35.19 to 1.35.23 (#4273)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.35.19 to 1.35.23.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.35.19...v1.35.23)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-09 08:09:55 -08:00
coredns-auto-trailing-whitespaces[bot]
dd078a982c auto remove trailing whitespaces 2020-11-07 18:57:52 +00:00
Yong Tang
37e3a81f25 Remove redundant '' as Linux does not need it.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2020-11-07 10:57:02 -08:00
Yong Tang
263423edad Setup GitHub Actions for auto remove trailing whitespaces (#4269)
* Setup GitHub Actions for auto remove trailing whitespaces

This PR setup GitHub Actions for auto remove trailing whitespaces,
if any non-go files are touched (.git directory are ignored)

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

* Remove TestTrailingWhitespace in presubmit tests

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

* paths and paths-ignore are mutually exlcusive so only keep paths-ignore

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

* Remove redundent bufio import

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2020-11-07 10:53:20 -08:00
Yong Tang
67f2048bb0 Add GitHub Actions to gofmt -s -w all *.go files (#4268)
* Add GitHub Actions to  `gofmt -s -w` all `*.go` files

This PR adds GitHub Actions to  `gofmt -s -w` all `*.go` files,
if any `*.go` files are touched on each commit.

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

* Change go-mod-fmt to go-fmt

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2020-11-06 17:44:11 +01:00
Miek Gieben
cd5ee7d1f0 Remove travis and move to github workflow (#4267)
Add github testing workflow, simplify the Makefile because that was
complex because of Travis. Remove the fuzzing, needs to be re-added when
that works properly with go modules (it has been disabled for quite some
time). Multiple builds and files have been added so these tests can all
run in parallel. Our testing now tests a couple of minutes, the codeql
is by far the more expensive.

Move metric's naming test to test/presubmit_test.go

Add longer sleep in the TestAutoAXFR.

Bye bye travis!

Closes: #4266

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-11-06 14:14:26 +01:00
Miek Gieben
049369583b pkg/tls: remove InsecureSkipVerify=true flag (#4265)
CWE-295 code scanning alert flag this. Seems OK to just remove it.

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-11-05 20:08:59 +01:00
Miek Gieben
723e9b06a4 add 1.8.1 draft notes (#4263)
* add 1.8.1 draft notes

Start the list of note worth PRs

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

* forgot k8s

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-11-05 07:50:04 -08:00
Miek Gieben
57e6c56bfc Create codeql-analysis.yml (#4264)
Setup CodeQL to check are code - seems we're in the beta. (is this still beta?)
2020-11-05 16:06:32 +01:00
coredns-auto-go-mod-tidy[bot]
9d085f7e67 auto make -f Makefile.doc 2020-11-05 14:02:29 +00:00
Miek Gieben
7bbcf6920f add local plugin (#4262)
* add local plugin

See: #4260

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

* stickler bot

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

* See Also

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-11-05 15:02:07 +01:00
coredns-auto-go-mod-tidy[bot]
b091eff139 auto make -f Makefile.doc 2020-11-05 13:37:38 +00:00
Miek Gieben
123da4c844 plugin/dnstap: remove config struct (#4258)
* plugin/dnstap: remove config struct

this struct is an uneeded intermidiate to get a dnstap it can be
removed. Remove the dnstapio subpkg: it's also not needed. Make *many*
functions and structs private now that we can.

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

* correct logging

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-11-05 14:37:16 +01:00
Miek Gieben
fb5efa203d Add check for Also See for READMEs (#4261)
Signed-off-by: Miek Gieben <miek@miek.nl>
2020-11-05 11:52:24 +01:00
Miek Gieben
8759d00edd forward doc update (#4254)
* forward: add example with multiple DoT upstreams

Remove Bugs section as this is a nice work around.

h/t https://twitter.com/mholt6/status/1284250606673080321

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

* Actually remove bugs section

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-11-03 06:32:49 -08:00
Miek Gieben
a136b7128b plugin/dnstap: remove custom encoder (#4242)
* plugin/dnstap: remove encoder*.go

Those files reimplemented parts of the dnstap spec, we can just use the
dnstap functions for that. This leaves all the queuing that is enabled
and drops messages if the dnstap reader can't keep up. In the new code
flush() would never return an error (at least I couldn't make it do so),
so the reconnect functionally is moved to kick off when we get write
errors.

Some smaller cosmetic changes as well, `d.socket` is now `proto`, which
makes the dial() function smaller.

Total testing time is now <1s (which was the impetus to look into this
plugin *again*).

See #4238
The buffered channel needs to be sized correctly, as we may need to do
some queing if the dnstap reader can't keep up.

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

* add missing file

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

* update doc on queing

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-11-03 06:31:34 -08:00
coredns-auto-go-mod-tidy[bot]
f286a24b4e auto go mod tidy 2020-11-02 11:54:55 +00:00
dependabot-preview[bot]
4726eb04e4 build(deps): bump github.com/aws/aws-sdk-go from 1.35.14 to 1.35.19 (#4252)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.35.14 to 1.35.19.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.35.14...v1.35.19)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-11-02 03:54:17 -08:00
Chris O'Haver
272ccb195d plugin/kubernetes: Watch EndpointSlices (#4209)
* initial commit

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

* convert endpointslices to object.endpoints

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

* add opt hard coded for now

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

* check that server supports endpointslice

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

* fix import grouping

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

* dont use endpoint slice in 1.17 or 1.18

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

* bump kind/k8s in circle ci to latest

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

* drop k8s to latest supported by kind

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

* use endpointslice name as endoint Name; index by Service name

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

* use index key comparison in nsAddrs()

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

* add Index to object.Endpoint fixtures; fix direct endpoint name compares

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

* add slice dup check and test

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

* todo

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

* add ep-slice skew dup test for reverse

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

* nsaddrs: de-dup ep-slice skew dups; add test

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

* remove todo

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

* address various feedback

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

* consolidate endpoint/slice informer code

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

* fix endpoint informer consolidation; use clearer func name

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

* log info; use major/minor fields

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

* fix nsAddr and unit test

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

* add latency tracking for endpointslices

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

* endpointslice latency unit test & fix

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

* code shuffling

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

* rename endpointslices in tests

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

* remove de-dup from nsAddrs and test

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

* remove de-dup from findServices / test

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2020-10-30 08:14:30 -04:00
Miek Gieben
c840caf1ef Speed up testing (#4239)
* Speed up testing

* make notification run in the background, this recudes the test_readme
time from 18s to 0.10s
* reduce time for zone reload

* TestServeDNSConcurrent remove entirely. This took a whopping 58s for
  ... ? A few minutes staring didn't reveal wth it is actually testing.
  Making values smaller revealed race conditions in the tests. Remove
  entirely.

* Move many interval values to variables so we can reset them to short
  values for the tests.

* test_large_axfr: make the zone smaller. The number used 64K has no
  rational, make it 64/10 to speed up.
* TestProxyThreeWay: use client with shorter timeout

A few random tidbits in other tests.

Total time saved: 177s (almost 3m) - which makes it worthwhile again to
run the test locally:

this branch:

~~~
ok  	github.com/coredns/coredns/test	10.437s
cd plugin; time go t ./...
5,51s user 7,51s system 11,15s elapsed 744%CPU (
~~~

master:

~~~
ok  	github.com/coredns/coredns/test	35.252s
cd plugin; time go t ./...
157,64s user 15,39s system 50,05s elapsed 345%CPU ()
~~~
tests/ -25s
plugins/ -40s

This brings the total on 20s, and another 10s can be saved by fixing
dnstapio. Moving this to 5s would be even better, but 10s is also nice.

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

* Also 0.01

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-10-30 10:27:04 +01:00
Yong Tang
bc0115d71f Update Project Lead's term (#4164)
Base on the [GOVERNANCE.md] of CoreDNS, we will need to update project lead's term:
1) Any PR should only be opened no earlier than 6 weeks before the end of current lead's term
2) PR can only be merged after it has been opened for 4 weeks.
3) See [GOVERNANCE.md] for more details on how votes are counted.

Since it is less than 6 weeks before 11/11/2020, this PR:
1) propose to extend project lead's term from 11/11/2020 to 11/11/2021.
2) will keep open until at least to 10/28/2020 (4 weeks), so that community has a chance to voice opinions

Please specify +1/-1 for agree/disagree.

Note: Alternative PRs could be opened concurrently, as long as it following the rules specified in [GOVERNANCE.md].

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2020-10-28 10:59:56 -07:00
Miek Gieben
c2e4f2f1ab docs: move Also See to See Also (#4245)
sed -i 's/Also See/See Also/' plugin/**/README.md

Some plugins did already use 'See Also', so it's all consistent now.

Fixes: #4196

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-10-28 10:56:35 -07:00
ZouYu
c58e4b09fc Fix golint warnings (#4241)
Include:
1. plugin/forward/type.go:8:2: const typeUdp should be typeUDP
2. plugin/forward/type.go:9:2: const typeTcp should be typeTCP
3. plugin/forward/type.go:10:2: const typeTls should be typeTLS
4. plugin/kubernetes/metrics.go:24:2: var DnsProgrammingLatency should be DNSProgrammingLatency
5. plugin/kubernetes/metrics_test.go:124:102: func parameter clusterIp should be clusterIP

Signed-off-by: zouyu <zouy.fnst@cn.fujitsu.com>
2020-10-28 07:39:56 +01:00
Miek Gieben
d6660f369e A question template (#4243)
We get many questions (which is fine), but those are neither a bug, nor
an enhancement. Just add generic question as an option.

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-10-27 14:55:34 +01:00
Serge
6f2281ed40 Fix health check endpoint (#4231)
Signed-off-by: Serge Logvinov <serge.logvinov@gmail.com>
2020-10-27 09:15:42 +01:00
coredns-auto-go-mod-tidy[bot]
e37750ca1a auto go mod tidy 2020-10-26 12:43:14 +00:00