1629 Commits

Author SHA1 Message Date
Miek Gieben
c0fbef0714
generate doc for 1.1.3 (#1832) 2018-05-24 07:51:59 +01:00
Miek Gieben
4ec613e186
Enable new features of Corbot (#1831)
enable alias and add one, so that "/plugin: forward" adds a label
called plugin-forward to the issue.

enable branches that automatically delete merged branches.
2018-05-23 23:17:26 +01:00
Miek Gieben
1ae8a9e321
Add upstream unit test (#1830)
Fix the upstream unit test to actually test it.
2018-05-23 21:31:54 +01:00
darkweaver87
003e104fca ADD ignoreemptyservice option for kubernetes plugin (#1813)
* ADD: ignoreemptyservice option for kubernetes plugin

* Modify documentation and rename option to add space

* UPD: Add unit tests

* UPD: gofmt

* Add unit test for ignore emptyservice

* gofmt

* xfr tests failed

* Rename emptyservice to empty_service
2018-05-23 08:57:59 -04:00
Miek Gieben
0f74281a53 Revert pkg/nonwriter changes (#1829)
The DoH work (#1619) made changes to pkg/nonwriter.Writer that in
hindsight were not backwards compatible; it added override for the
LocalAddr() and RemoteAddr(). Instead of rolling back that PR, this PR
reverts those changes and creates a DoHWriter for use in the
https-server.go side of things.

This was only caught in the integration test making this hard to catch,
so we add a upstream_file_test.go that tries (doesn't work yet) to test
this in the unit tests as well. Esp. helpful when 'git bisecting'.

Fixes #1826
2018-05-23 08:50:27 -04:00
Ahmet Alp Balkan
49891d2103 Add links to whoami plugin reading material (#1815)
* Add links to whoami plugin reading material

* create See Also section
2018-05-22 15:38:25 +01:00
Miek Gieben
18b92e1117
make CoreDNS DoH Server (#1619)
* WIP: make CoreDNS DoH Server

* It works

* Fix tests

* Review from Tom - on diff. PR

* correct mime type

* Cleanups and use the pkg/nonwriter

* rename and updates

* implement get

* implement GET

* Code review comments

* correct context

* tweaks

* code review
2018-05-21 19:40:46 +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
Tobias Schmidt
0d305387f7 plugin/template: Support NODATA responses (#1816)
A NODATA response has no answers and rcode NOERROR, but should have a
SOA record in the authority section.
2018-05-21 07:45:45 +01: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
Ruslan Drozhdzh
7ac507d9ff plugin/forward: close connection manager in proxy finalizer (#1768)
- connManager() goroutine will stop when Proxy is about to be
   garbage collected. This means that no queries are in progress,
   and no queries are going to come
2018-05-18 07:46:14 +01:00
Chris O'Haver
38e27fd9ad add dup endpoint name test (#1811) 2018-05-18 07:27:25 +01:00
Miek Gieben
2b9d2d6c3a
reload: don't fail test on addr in use (#1804)
A bit meh, but we *need* hardcoded addresses in these tests, because
we can't get them from a running coredns. These may be in-use and this
fails the tests then. Do an ugly err.Error() string match if this is the
case to prevent failing the test for something not in our control.

A better fix would be to retreive the listening address from coredns via
some api, so we could listen on :0 for these as well. No such API exists
as of yet.
2018-05-18 07:26:45 +01:00
Anton Antonov
a9f3ad1f0b Fix typo in erratic.go (#1812) 2018-05-17 16:59:57 -04:00
Yong Tang
b109a79cb5 Update kubernetes/client-go to v7.0.0 (#1808)
This fix updates k8s' client-go to v7.0.0, which matches k8s 1.10.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-05-17 07:10:28 +01:00
Yong Tang
9a82fa0374 golinter fix (#1807)
This fix fixes golinter warning:
```
plugin/tls/tls_test.go:1:⚠️ file is not goimported (goimports)
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-05-16 22:35:31 +01:00
Yong Tang
05a030e17b Vendor update with github.com/ugorji/go and github.com/apache/thrift pinning (#1805)
This fix is an vendor update. Both ugorji and thrift have to be pinned
to compile. The ugorji is from etcd and thrift is from zipkin.

This fix fixes #1802.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-05-16 22:19:53 +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
Ruslan Drozhdzh
cffa1948ab Probe simplification (#1784)
* Probe simplification

 - the main reason of rework is that previous implementation hung
   when calling Do() after Stop()

* replace atomics with mutex

* access Probe.interval under lock
2018-05-16 20:38:13 +01:00
Ruslan Drozhdzh
bffb955f69 plugin/tls: make CA parameter optional (#1800) 2018-05-15 12:53:46 -04:00
Chris O'Haver
8026dc2560
plugin/reload: mention auto in reload (#1793)
mention auto in reload docs
2018-05-11 15:09:38 -04:00
Chris O'Haver
afed91646a
plugin/proxy: fix except example (#1796)
I just noticed this discrepancy in one of the `except` examples.
2018-05-11 13:51:21 -04:00
Chris O'Haver
2c04e72bdc
Try to clarify rewrite docs (#1795)
making response rewrites more prominent
2018-05-11 13:50:59 -04: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
3dd459896a
Add OWNERS to forward (#1789)
Copy the OWNERS file from proxy and add rdrozhdzh to it.
2018-05-10 07:41:03 +01:00
Miek Gieben
874a998697 plugin/errors: remove panic/recover (#1777)
Remove panic/recover and also use pkg/log to print the error. This
brings some consistency into the logging.

Fixes #1776
2018-05-09 19:04:46 -07:00
Miek Gieben
5e7c399117
Enable CorBot (#1787)
This enables CorBot to help with issues and PRs. See
github.com/miekg/dreck for the implementation and README (a bit sparse).
2018-05-09 15:48:32 +01:00
Francois Tur
30309861c5 - review BUG related doc for Health and Premotheus after change of behavior to be compatible with reload feature. (#1790) 2018-05-09 15:09:06 +01:00
Eugen Kleiner
b9f0d55fc9 plugin/forward: expose TLSConfig and error messages to public (#1781)
* plugin/forward: expose TLSConfig and error messages to public

* Add IsTLS() instead of TLSConfig()
2018-05-09 12:41:14 +01:00
Miek Gieben
0e5e59c327
request.Match check Response bit as well (#1775)
* request.Match check Response bit as well

We should check this bit and reject them as invalid.

* Fix test
2018-05-09 12:35:42 +01:00
Miek Gieben
68b45f5377
plugin/cache: unroll minTTL loop (#1773)
This allocates memory because of the append, just unroll the loop.
Also add benchmark.

Before:
goos: linux
goarch: amd64
pkg: github.com/coredns/coredns/plugin/cache
BenchmarkCacheResponse-4   	  100000	     11910 ns/op
BenchmarkMinMsgTTL-4       	 1000000	      1494 ns/op
PASS

After:
goos: linux
goarch: amd64
pkg: github.com/coredns/coredns/plugin/cache
BenchmarkCacheResponse-4   	  100000	     12016 ns/op
BenchmarkMinMsgTTL-4       	 2000000	       668 ns/op
PASS
2018-05-08 18:36:29 +01:00
Miek Gieben
565e416407
plugin/cache: don't recheck the OPT records (#1772)
These are not stored with newItem so we don't have to check them later.
2018-05-08 18:36:08 +01:00
Ruslan Drozhdzh
0455febc34 fix TestNewServer() hanging (#1786) 2018-05-08 18:35:47 +01:00
Miek Gieben
643550eabe presubmit: check for uppercase (#1774)
Another thing we can test automatically, we sorta settled on using an
uppercase letter in in t.Log and t.Fatal calls.

Let's just check for this.
2018-05-07 23:47:25 +02:00
Miek Gieben
15d989e294 Revert "add"
This reverts commit 6416925ace81bfa0c0845af61ded8b3d34511a1d.
2018-05-05 19:07:50 +01:00
Miek Gieben
6416925ace add 2018-05-05 19:07:20 +01:00
Miek Gieben
7c27577707
plugin/metrics: add panic counter (#1778)
Count and export number of panics we see.

Fixes #1294
2018-05-05 19:47:41 +02: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
John Belamaric
bf479f9ac2 gofmt some stuff (#1769) 2018-05-04 22:45:58 +02:00
Eugen Kleiner
be8fcc484a plugin/forward: expose few methods and attributes to public (#1766)
* plugin/forward: expose few methods and attributes to public

* Update comments
2018-05-04 07:47:26 +02:00
Silver
59dbcd32ea Signal handling breaks parent code (#1763) (#1764) 2018-05-03 08:57:38 +02:00
Miek Gieben
5735292406
Do Compress only when need in request.Scrub (#1760)
* Remove Compress by default

Set Compress = true in Scrub only when the message doesn not fit the
advertized buffer. Doing compression is expensive, so try to avoid it.

Master vs this branch
pkg: github.com/coredns/coredns/plugin/cache
BenchmarkCacheResponse-2   	   50000	     24774 ns/op

pkg: github.com/coredns/coredns/plugin/cache
BenchmarkCacheResponse-2   	  100000	     21960 ns/op

* and make it compile
2018-05-01 21:04:06 +01:00
Miek Gieben
c48531bb35
Add usage example (#1759) 2018-04-30 20:53:23 +01:00
Miek Gieben
a8fce24d46
plugin/cache: fix benchmark (#1758) 2018-04-30 20:25:40 +01:00
Miek Gieben
c0590e4ec4
plugin/etcd: small refactor (#1749)
* plugin/etcd: small refactor

I think this function can be smaller.

* and make it compile
2018-04-28 10:03:35 +01:00
Miek Gieben
82d3195f2f
pkg/log usage in coremain as well (#1751) 2018-04-27 21:50:24 +01:00
Miek Gieben
bfc647d4ed
Cache metrics server (#1746)
* plugin/cache: per server metrics

Use per server metrics in the cache plugin as well. This required
some plumbing changes. Also use request.Request more.

* fix cherry-pick
2018-04-27 19:37:49 +01:00
Miek Gieben
85f549b529
plugin/dnssec: add per server metrics (#1743)
* plugin/dnssec: add per server metrics

final plugin.

Fixes #1696 #1492 #1189

* Move cache cap into handler so we can access the server label

* Remove cache-capacity from it entirely
2018-04-27 19:37:31 +01:00
Miek Gieben
2a28efa877
plugin/template: update metrics to include server (#1731)
Add server label to the metrics and update the README.
2018-04-27 19:37:12 +01:00
Mario Kleinsasser
13b1f5469a Fix #1685 (#1700)
Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>

Create separate function for zone check

Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>

Add tests for zone A records

Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>

Remove pointer from checkZoneForRecord func signature, Add documentation

Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>

Change apex to zone, Update readme information, Add additional tests

Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>

Change zone to apex

Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>

Change readme to reflect apex change

Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>

Correct code comment

Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>

Correct string join for apex.dns

Signed-off-by: Mario Kleinsasser <mario.kleinsasser@gmail.com>
2018-04-27 19:36:58 +01:00