Commit graph

90 commits

Author SHA1 Message Date
Miek Gieben
2743c8eab1
Upgrade caddy to 0.11.X (#2541)
* Upgrade caddy to 0.11.2

Redo of #2505 (cherry-picked commit)

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

* .4 has been released

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-02-17 15:11:19 +00:00
Miek Gieben
f59b414a7e Update to dns/1.1.4 (#2521)
Signed-off-by: Miek Gieben <miek@miek.nl>
2019-02-02 05:08:40 +08:00
Miek Gieben
003355e18e new dns version (#2456)
Signed-off-by: Miek Gieben <miek@miek.nl>
2019-01-12 04:17:13 -08:00
jmpcyc
c56603ea79 update zplugin.go path && add .PHONY for all target (#2433)
* update zplugin.go path && add .PHONY for all target

* update zplugin.go path && add .PHONY for all target

* update zplugin.go target
2019-01-04 20:09:26 +00:00
Miek Gieben
4f9fade38e new miekg/dns (#2435)
New release, kick of tests.

Signed-off-by: Miek Gieben <miek@miek.nl>
2019-01-04 12:00:50 -08:00
Miek Gieben
fc667b98e0
Fix EDNS0 compliance (#2357)
* Fix EDNS0 compliance

Do SizeAndDo in the server (ScrubWriter) and remove all uses of this
from the plugins. Also *always* do it. This is to get into compliance
for https://dnsflagday.net/.

The pkg/edns0 now exports the EDNS0 options we understand; this is
exported to allow plugins add things there. The *rewrite* plugin used
this to add custom EDNS0 option codes that the server needs to
understand.

This also needs a new release of miekg/dns because it triggered a
race-condition that was basicly there forever.

See:
* https://github.com/miekg/dns/issues/857
* https://github.com/miekg/dns/pull/859

Running a test instance and pointing the https://ednscomp.isc.org/ednscomp
to it shows the tests are now fixed:

~~~
EDNS Compliance Tester
Checking: 'miek.nl' as at 2018-12-01T17:53:15Z

miek.nl. @147.75.204.203 (drone.coredns.io.): dns=ok edns=ok edns1=ok edns@512=ok ednsopt=ok edns1opt=ok do=ok ednsflags=ok docookie=ok edns512tcp=ok optlist=ok
miek.nl. @2604:1380:2002:a000::1 (drone.coredns.io.): dns=ok edns=ok edns1=ok edns@512=ok ednsopt=ok edns1opt=ok do=ok ednsflags=ok docookie=ok edns512tcp=ok optlist=ok

All Ok
Codes
ok - test passed.
~~~

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

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

* typos in comments

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-12-06 21:18:11 +00:00
Yong Tang
e5f5da4297 Update Prometheus to 0.9.1 (#2360)
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-12-01 22:38:03 +00:00
Miek Gieben
95c9e14dcf Remove benchmark from travis (#2350)
We're not doing anything with the data so stop doing it. Also makes
travis 20% faster.

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-11-29 12:29:37 -08:00
Miek Gieben
50ef7409d1
Up to DNS version 1.1.0 (#2346)
Upgrade to new dns lib version; that saw multiple improvements; some
patch releases are in the pipeline.

The big thing here is the removal of ErrTruncated, so we need to deal
with this slightly different in the forward plugin. It removed the
entire truncated.go logic and just checks the message for .Truncated (if
there is a message) and retries with tcp.

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-11-29 20:02:32 +00:00
Yong Tang
e94ce7a12a
Update caddy to 0.11.1 (#2321)
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-11-19 11:04:33 -08:00
Miek Gieben
1ad002c9f3
dns: bump to 1.0.15 (#2268)
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-11-03 10:01:45 +00:00
Miek Gieben
e8e8187a64
plugin/file: Use new zone parser API (#2219)
* plugin/file: Use new zone parser API

Use new dns lib 1.0.14 and default to using the new zone parser that
does not leak go-routines.

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

* Use new API

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-10-23 20:19:36 +01:00
Chris O'Haver
49c776df4c
rename VERBOSE to be more generic (#2172) 2018-10-10 09:39:31 -04:00
Chris O'Haver
cbcc38bcb5
add cgo option to Makefile (#2171) 2018-10-09 14:36:42 -04:00
Billie Cleek
e197830245 update Caddy to v0.10.13 (#2154)
Update Caddy to v0.10.13 so that environment variables may be used after
Go template (e.g. in template's answer). v0.11.0 has been released, but
v0.10.13 is a smaller set of changes and has the necessary fix.

Fixes #2153
2018-09-29 23:48:12 +01:00
Manuel Alejandro de Brito Fontes
0e8977761d Dep helper (#2151)
* Add dep task to update go dependencies

* Update go dependencies
2018-09-29 23:47:07 +01:00
Miek Gieben
8f8b81f56b
Update to new version (#2150)
Signed-off-by: Miek Gieben <miek@miek.nl>
2018-09-29 18:18:16 +01:00
Yong Tang
a0396e2673
Add benchmark result to GitHub PR (#2123)
* Add benchmark result to GitHub PR

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

* Post benchmark to comments

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

* Test Stuff

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

* Update using jq.

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

* Update

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-09-25 15:04:27 -07:00
Miek Gieben
b89006dda1 Use miekg/dns 1.0.10 (#2127)
Update to latest version.

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-09-22 12:03:39 -07:00
Miek Gieben
7b40b14e96 Benching (#2121)
* Benchmark stuff

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

* Makefile changes

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

* Fixes

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

* fix

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

* Add benchmark test

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

* Add master branch

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-09-22 07:17:17 -07:00
Miek Gieben
6e1c02c4ac Make presubmit actually fail the build (#2013)
The exit code wasn't properly acted upon in the makefile.
Make filename-hyphen actually return an non-zero exit code.

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-07-29 23:41:52 -07:00
Miek Gieben
395be9adfc
Makefile: remove goimports (#2008)
This downloads gometalinter (which is now breaking in the CI tests).
Also the goimports target is run with ||true, so nothing will break
if this flags anything (done because of gofmt changes in between
release).

Probably I will setup something to use github's linter API:
https://github.com/markstory/lint-review

Signed-off-by: Miek Gieben <miek@miek.nl>
2018-07-27 15:01:27 +01:00
Miek Gieben
ad8021230c Makefile fixes: (#1892)
Correctly set the path for the presubmits, fix some typos and make
the goimport target do the linting to the lint target can be removed.

Also don't make it a fatal error because gofmt changes between releases.
2018-06-21 04:34:02 -07:00
Miek Gieben
d6288c25ba
Bump dns version to 1.0.8 (#1873)
Bump the version, allows #691 to get merged.
2018-06-13 10:38:24 +01:00
Miek Gieben
4f0b36e57e
Extend presubmit to covert test and request (#1846)
Fix the casing *and* fix use of context as we were still referencing
the non-std lib context - no wondering how this could have worked...
2018-06-01 15:12:49 +01:00
Yong Tang
67c9075331 Enforcing gofmt -s on linter check (#1820)
This fix enforces gofmt -s on linter check in Makefile,
and fixes `plugin/kubernetes/handler_test.go` and
`plugin/tls/tls_test.go` with `gofmt -s`
2018-05-21 09:52:42 -04:00
Yong Tang
a40345d65f Fix make check dependency error (#1818)
While invoking `make check` from a fresh new environment
the following failure occured:
```
[ec2-user@..... coredns]$ docker run -i -t --rm -v $PWD:/go/src/github.com/coredns/coredns -w /go/src/github.com/coredns/coredns golang:1.10
root@e2d6a6c17132:/go/src/github.com/coredns/coredns# make check
** presubmit/context
** presubmit/test-lowercase
( gometalinter --deadline=2m --disable-all --enable=goimports --vendor --exclude=^pb/ ./... || true )
/bin/sh: 1: gometalinter: not found
go generate coredns.go
```

This fix fixes the issue in Makefile so that deps could be installed first.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-05-19 23:03:32 +01:00
Miek Gieben
1e471a353e Dep ensure (#1803)
* vendor: don't vendor the context stuff

We don't need to vendor this anymore as we moved to the std lib for
these.

* new stuff showing up with dep ensure

* remove go-shlex
2018-05-16 13:17:06 -07:00
Miek Gieben
940b7f2e8c
Up miekg/dns to 1.0.6 (#1792)
This was just tagged and has the worker patch that improves performance.
2018-05-10 21:13:36 +01:00
Miek Gieben
41f1a1434a Pr 1770 (#1771)
* make pb

* Makefile for pb

Move the Makefile into the pb directory to remove some clutter from the
main Makefile.
2018-05-05 12:01:17 -04:00
Miek Gieben
3ce4fc8fe4
Do ' go vet' after we have fetch the repos (#1744)
Do ' go vet' after we have fetched the repos
2018-04-26 13:03:31 +01:00
Miek Gieben
c9b5cedbe9 Presubmit (#1719)
* build: add presubmits

We didn't have a way to encode presubmit; with this hack we can just
run a bunch of script on the build; this allows us to automatically
capture things like using the wrong context and maybe other fluff.

This allows us to cut down on code reviews and just have the build fail.

* hook it up

* put presubmit in checks; so we do it for tests as well

* Add explicit exit 1 if things fails
2018-04-23 08:45:49 -07:00
Miek Gieben
cd7928f180 make: default to default go path (#1681)
if GOPATH is not set use $HOME/go which is the current default in Go.

Fixes #1642
2018-04-15 09:14:18 -07:00
Miek Gieben
f5435b3884
make: use dns 1.0.5 (#1649)
Tagged an new release; has some fixes.
2018-04-01 14:29:59 +01:00
Yong Tang
604c0045e7 Update go dep (#1560)
This fix updates go dep with `dep ensure --update` as well as the following:
- Removed github.com/ugorji/go restriction in Gopkg.toml (fixes  #1557)
- Added github.com/flynn/go-shlex in Makefile (neede by Caddy, maybe removed later)

This fix fixes #1557

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-02-23 20:10:34 +00:00
Yong Tang
9194b4c29d Update golang.org/x/net and golang.org/x/text (#1553)
This fix updates golang.org/x/net to release-branch.go1.10
and golang.org/x/text to v0.3.0, for the purpose of
align with go version 1.10.

This fix also updates README.md to promote using go 1.10.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-02-22 07:25:40 +00:00
Miek Gieben
22409290d9
Caddy 0.10.11 Fix (#1544)
Caddy 0.10.11 is released. Fix CoreDNS to compile against that version.
This also helps people compiling CoreDNS and go getting non-vendored
deps.
2018-02-21 07:15:57 +00:00
Miek Gieben
05e41c5969
go 1.10: update travis and gofmt (#1541)
* go 1.10: update travis and gofmt

fmt now complains about on file tls_test.go, fix that. Also remove
gofmt, as goimports also checks, so this was done twice.

Put go 1.9 and 1.10 in travis for the time being.

* goimports optional
2018-02-18 09:43:56 +01:00
Yong Tang
4e63d0be35 Enable goimports check, and fixes several imports format (#1525)
This fix enables goimports check and fixes several imports format
so that the import sections are prettier, e.g.:
```
 import (
-       "github.com/miekg/dns"
        "regexp"
        "strconv"
        "strings"
+
+       "github.com/miekg/dns"
 )
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-02-14 10:00:04 -05:00
Miek Gieben
5b844b5017
plugin/forward: add it (#1447)
* plugin/forward: add it

This moves coredns/forward into CoreDNS. Fixes as a few bugs, adds a
policy option and more tests to the plugin.

Update the documentation, test IPv6 address and add persistent tests.

* Always use random policy when spraying

* include scrub fix here as well

* use correct var name

* Code review

* go vet

* Move logging to metrcs

* Small readme updates

* Fix readme
2018-02-05 22:00:47 +00:00
Chris O'Haver
80050766fb Tolerate go get failures for coredns/forward (#1435)
* testpr3

* hack

* chop

* tolerate coredns/coredns get fail

* remove TEST from readme
2018-01-26 16:10:45 -05:00
Miek Gieben
2d00080ef5
plugin/forward: add out of tree forward plugin (#1425)
* plugin/forward: add out of tree forward plugin

This is a simpler proxy than *proxy*, include by default so it is easier
to switch (i.e. no recompile). It lacks features compared to proxy (did I
say it was simpler), but does cache udp and tcp connection, so it is
faster than proxy.

* Muck with the makefile

* Versioning forward now
2018-01-25 18:55:35 +00:00
Miek Gieben
fcfb998b86 release: default to using go-dns 1.0.4 (#1424) 2018-01-25 16:33:08 +01:00
Tobias Schmidt
b707438534 Add coredns_build_info metric (#1418)
In order to track the rollout status of CoreDNS versions, add the common
build_info metric.
2018-01-23 20:10:55 +00:00
Yong Tang
949b453472 Update Makefile for git get -u with version (#1372)
The changes in this fix have:
1. checkout master branch of dependencies (non-branch will trigger an error with go get -u)
2. go get -u
3. checkout specific versioon (not necessary a branch).

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-01-10 20:52:02 +00:00
Yong Tang
2ead19f316
Fix version of go get (#1370)
This fix fixes version fetched from `go get` so
that versions are guarded.

github.com/mholt/caddy              v0.10.10
github.com/miekg/dns                v1.0.3
github.com/prometheus/client_golang v0.8.0
golang.org/x/net                    release-branch.go1.9 (branch)
golang.org/x/text                   e19ae1496984b1c655b8044a65c0300a3c878dd3

This fix fixes 1368.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-01-10 09:30:28 -08:00
Miek Gieben
8ec89aa4e9
Stop vendoring prometheus (#1333)
* Stop vendoring prometheus

* Fix make
2017-12-27 14:15:03 +00:00
Miek Gieben
64c3eb1518 Makefile: add Windows target (#1199)
While we at it, why not add a target for Windows as well.

This also introduces a VERBOSE option that defaults to -v, but it empty
when releases so that you can actually see what you're building.

Move an @echo out of shell snippet into the Makefile, as that errored
with @echo: command not found.

Sample run and resulting artifacts:

~~~
% make -f Makefile.release build
% find build -type f -exec file {} \;
build/windows/amd64/coredns: PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows
build/darwin/amd64/coredns: Mach-O 64-bit x86_64 executable, flags:<NOUNDEFS>
build/linux/ppc64le/coredns: ELF 64-bit LSB executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), statically linked, stripped
build/linux/amd64/coredns: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
build/linux/arm/coredns: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, stripped
build/linux/s390x/coredns: ELF 64-bit MSB executable, IBM S/390, version 1 (SYSV), statically linked, stripped
build/linux/arm64/coredns: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, stripped

% make -f Makefile.release tar
% find release -type f | sort
release/coredns_0.9.9_darwin_amd64.tgz
release/coredns_0.9.9_linux_amd64.tgz
release/coredns_0.9.9_linux_arm64.tgz
release/coredns_0.9.9_linux_arm.tgz
release/coredns_0.9.9_linux_ppc64le.tgz
release/coredns_0.9.9_linux_s390x.tgz
release/coredns_0.9.9_windows_amd64.tgz
~~~
2017-11-03 09:45:13 -04:00
Miek Gieben
4a4556f0d6 release: speed up build (#1181)
Don't use the 'check and godep' target when building for a release, this
is now repeated 6 times for no reason as this is already checked on
travis.

Some other cleanups in the documentation as well.
2017-10-30 08:55:41 -07:00
Chris O'Haver
e8184d3a5a plugin/kubernetes: Modify integration tests for coredns/ci (#1152)
* integration ci

* rename test

* unfunctionalize DoIntegrationTests

* alphabetize expected answers

* Enable out-of-cluster test

* Enable out-of-cluster test

* move integration tests back to ci repo
2017-10-25 15:40:48 -04:00