Commit Graph

607 Commits

Author SHA1 Message Date
Chris O'Haver
4dc61e67cd fix docker build (#673) 2017-05-25 07:28:12 +01:00
Miek Gieben
fe725f497f Maintainer update (#670)
Use @coredns.io were appropriate and clean up the list a little.
2017-05-23 14:43:58 -04:00
Chris O'Haver
7f950e496a Handle K8s middleware NS record (#662)
* commit for testing in cluster

* commit for testing in cluster

* refactor and add ns.dns record

* Release 007

* reduce heap allocations

* gofmt

* revert accidental Makefile commits

* restore prior rcode for disabled pod mode

* revert Makefile deltas

* add unit tests

* more unit tests

* make isRequestInReverseRange easier to test

* more unit tests

* addressing review feedback

* commit setup.go
2017-05-22 16:05:48 -04:00
Miek Gieben
024f56682d middleware/chaos: fix version (#669)
* middleware/chaos: fix version

Move the version setting into a init function so it is done early. Then
tweak the setup code for chaos a bit to correctly pick this version up.
Add an integration test to pick this up in the toplevel test/ directory.

Fixes #667

* Update tests
2017-05-22 08:09:35 -04:00
Miek Gieben
7e6f5c77aa Makefile.release: bogus all target (#666)
Make the default target do nothing and put the actual release under a
'release' target. Prevent accidentally committing unwanted commits to
the repo.

Tested with `make -f Makefile.release -n`.
2017-05-12 10:15:34 +01:00
Chris Aniszczyk
9a951be7dd Add License Scanning badge (#663)
In CNCF, we are experimenting with FOSSA for license scanning on all of our projects.

https://app.fossa.io/reports/7d989803-8931-4221-a11f-330b7f333cdd
2017-05-08 15:31:26 +01:00
John Belamaric
afec8963c6 Don't check vendor code for gofmt, it takes forever (#661) 2017-05-05 15:33:18 -04:00
Miek Gieben
b7dd1559c1 Release: fix docker push 2017-05-03 19:59:11 +01:00
Miek Gieben
667635e295 Release: fix Makefile
Latest refactoring fubar-ed Makefile.release. Fix the Linux build
target.
2017-05-03 19:48:11 +01:00
Miek Gieben
edcc0356b7 Release 007 v007 2017-05-03 19:37:27 +01:00
Miek Gieben
8eda6c7b9c middleware/file: correctly parse the stanza (#658)
* middleware/file: correctly parse the stanza

Parsing the file stanza would give precedence to 'transfer' and ignore
other bits if it wasn't specified.

This change fixes the parsing. The actually external CNAME retrieval is
working fine (once the upstream is correctly parsed).

This wasn't caught in tests, because we lack a parsing test for this.

Fixes #657

* Add tests
2017-05-03 16:36:41 +01:00
Miek Gieben
4fc1318e28 Install: split build targets (#656)
Allows one to use `make -f Makefile.release build-arm` to just get an
Arm binary.
2017-04-30 11:48:19 +01:00
John Belamaric
6062e58c59 Remove annoying INFO from k8s middleware (#655) 2017-04-30 08:48:37 +01:00
Miek Gieben
7d39c2ba51 middleware/cache: don't cache expired RRSIGs (#641)
Check message for expired sig and don't cache those.

Aside: This hack of caching entire messages is probably something we
should stop doing at some point in the future and do this on a per RRset
basis.

Fixes #367 #635
2017-04-29 07:06:42 -07:00
Yong Tang
1f63e639e4 Merge pull request #654 from yongtang/go-dep
Add vendor with `go dep`
2017-04-29 07:03:15 -07:00
Yong Tang
6e3be7f3d5 Update vendor with go dep
This fix updates vendor with `go dep`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-04-28 09:14:54 -07:00
Yong Tang
e08fb277fa Add vendor setup with go dep
This fix adds vendor setup with `go dep`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-04-28 09:14:10 -07:00
Miek Gieben
7132faae50 update readme (#650)
* update readme

* Add slack

Also add the slack channel.
2017-04-27 16:24:00 +01:00
Miek Gieben
3b5b6a233f middleware/proxy: Kill goroutines on stop (#646)
* middleware/proxy: Kill goroutines on stop

Ports caddy's 59bf71c293

Excludes the proxy_test.go test part though.

Fixes #644

* Add tests
2017-04-26 10:58:14 +01:00
Miek Gieben
003b1bf678 Fix health race (#645)
* Revert "middleware/proxy: Make Unhealthy a pointer (#615)"

This reverts commit acbf522ceb.

* middleware/proxy: add proper locking

This add the proper locking around `Unhealthy`.
2017-04-24 20:37:43 +01:00
John Belamaric
bfa18470e5 Point users to deployment repo (#643) 2017-04-24 16:45:47 +01:00
Chris O'Haver
f359aea2fa Pprof listen (#639)
* add listen addr option

* Add listen address option to pprof

* There is configuration

* code styling
2017-04-24 10:27:26 -04:00
Miek Gieben
4c9351b0a3 msg.Service: add HostType() method (#627)
This method parses the Host field in the service. It returns 1 or 3
things 1) it is a host 2) an IPv4 address or an 3) IPv6 address.
This simplifies some code a bit and allows for 1 way of parsing the Host
field.

This *only* parse the Host field, Mail and/or Text values should be
checked separately.

We reuse the dns.TypeXXX values for this as to not invent anything new.
2017-04-22 07:58:30 +01:00
Chris O'Haver
320cf97868 Fix go pprof lib link (#638) 2017-04-21 14:17:50 -04:00
Dominic
e9f6a1b4ce Fix link to SkyDNS (#637)
Url was wrong
2017-04-21 10:21:56 +01:00
Yue Ko
387d3f5a41 Fix TLS error message (#634)
Print corresponding error message when TLS initialization fails.
2017-04-20 09:40:18 -04:00
Miek Gieben
f2426b9966 Add MAINTAINERS (#633)
Add a MAINTAINERS file. It's not generated and not as elaborate (i.e. no
focus areas) as the one prometheus uses. But it's a start.

Generated with `git shortlog -s -n`, everyone with more than 5 commits.

Docs are put in `Makefile.release`.

Fixes #566
2017-04-20 10:56:56 +01:00
John Belamaric
e5b2cbb701 Clean up the tls middleware README (#631) 2017-04-19 22:43:10 +01:00
John Belamaric
8fc7ec776d Update the various Kubernetes middleware README files. (#630) 2017-04-19 22:42:45 +01:00
John Belamaric
1c53d4130e Add fallthrough support for Kubernetes (#626)
* Add fallthrough support for Kubernetes

This enables registering other services in the same zone as
Kubernetes services. This also re-orders the middleware chain
so that Kubernetes comes before other types, in order to make
this work out-of-the-box.

* Remove extra line
2017-04-19 16:08:30 -04:00
John Belamaric
5a60090933 Tracing for gRPC Server (#619)
* Implements tracing in the native gRPC server

* Undo some unnecessary changes

* Properly revert trace/setup.go this time

* Some very very basic tests

* Remove warning for non-Trace middleware
2017-04-18 11:10:49 -04:00
Miek Gieben
3b6eab2256 core: add reload tests (#622)
This adds a simple reload test for the UDP socket.
2017-04-18 11:25:21 +01:00
Miek Gieben
73397e4667 Tc bits (#617)
* middleware/erratic: allow TC bit to be set

Add `truncate` as an option.

Fixes #593
2017-04-16 07:49:13 +01:00
Miek Gieben
a83d97a5c4 middleware/erratic: add delaying queries (#614)
* middleware/erratic: add delying queries

* Dont println
2017-04-13 16:26:17 +01:00
Miek Gieben
acbf522ceb middleware/proxy: Make Unhealthy a pointer (#615)
Pointer updates are atomic so drop the sync.RWMutex as it is not needed
anymore. This also fixes the race introduced with dfc71df (although I
believe this is the first time we properly tested that code path).
2017-04-13 16:26:05 +01:00
Miek Gieben
ef4fa66e67 middleware/file: add test for SRV additional (#616)
Add test for checking the additional section after a SRV query. Though
this wasn't fixed, but it is.

Fixes #609
2017-04-13 16:25:16 +01:00
John Belamaric
7a79b81926 Merge pull request #613 from coredns/err-multiple-mon-handler
middleware/metrics: allow multiple listeners
2017-04-12 14:35:59 -04:00
Miek Gieben
c262946009 middleware/metrics: allow multiple listeners
There was no inherent reason *not* to allow multiple listeners for the
monitoring data. Actually enforcing only one listener lead to more code
then just allowing multiple. It's probably not what you want; but
CoreDNS is happy to oblige.
2017-04-12 10:10:57 +00:00
Christoph Görn
2196dde9da this paragraph was redundant (#611) 2017-04-06 09:43:41 +02:00
Michael
7f72c11716 readme: fixed typos (#607) 2017-03-29 09:24:08 +01:00
Miek Gieben
757f49d8ff dump travis to 1.8 (#606) 2017-03-19 09:12:18 +00:00
Miek Gieben
72f5a92d30 Random fixes (#605) 2017-03-18 17:08:39 +00:00
Miek Gieben
830fdfd26d middlewware/startup|shutdown (#604)
Add middleware by directly linking it from caddy, i.e. without any code
changes. To be fair: this does not added a ServeHTTP, but does give
some nice features in the Corefile.
2017-03-18 07:47:01 +00:00
Michael S. Fischer
7dc431ada3 middleware/proxy: fix race; add Go 1.7 backward compatibility (#603)
* Fix race on backend health status update
* Ensure test case is compatible on Go 1.7
2017-03-17 07:20:55 +00:00
Michael S. Fischer
dfc71df07d middleware/proxy: Allow non-HTTP upstreams to be health checked (#589)
Allow HTTP health check to be performed against a regular DNS upstream server.

TODO: Add tests.
2017-03-16 21:10:54 +00:00
Miek Gieben
36c743a4d8 middleware/etc: normalize the zone correctly (#597)
Also don't default to a default proxy; keep it empty.
Normalize the zones, so that is the server block ones are used, it will
actually work.
2017-03-16 14:52:30 +00:00
Miek Gieben
5ac6020f45 Pr 586 tweaks (#594)
* add proxy tcp

* add truncated for tcp to udp response

* move truncation to scrubbing

* add test that executes upstream over tcp

* middleware/proxy: some tweaks

rename force-tcp to force_tcp to be inline with the rest and use
a dnsOptions struct to put the options in to allow it to be extended.
Add some parse tests as well.

* Fix test and rename dnsOptions Options
2017-03-14 21:32:21 +00:00
Michael S. Fischer
5b32a07ae6 Fix proxy middleware health_check doc (#590)
According to the code, the default health check interval is 30 seconds,
not 10 as stated in the documentation.  (The alternative would be to
adjust the interval in the code.)
2017-03-14 15:48:16 +00:00
Miek Gieben
bfaf9e0aec core: add more transports (#574)
* core: add listening for other protocols

Allow CoreDNS to listen for TLS request coming over port 853. This can
be enabled with `tls://` in the config file.

Implement listening for grps:// as well.

a Corefile like:

~~~
. tls://.:1853 {
    whoami
    tls
}
~~~

Means we listen on 1853 for tls requests, the `tls` config item allows
configuration for TLS parameters. We *might* be tempted to use Caddy's
Let's Encrypt implementation here.

* Refactor coredns/grpc into CoreDNS

This makes gRPC a first class citizen in CoreDNS. Add defines as being
just another server.

* some cleanups

* unexport the servers

* Move protobuf dir

* Hook up TLS properly

* Fix test

* listen for TLS as well. README updates

* disable test, fix package

* fix test

* Fix tests

* Fix remaining test

* Some tests

* Make the test work

* Add grpc test from #580

* fix crash

* Fix tests

* Close conn

* README cleanups

* README

* link RFC
2017-03-13 20:24:37 +00:00
John Belamaric
4985d698e2 Fix the deps build (#583)
The deps target needs to be dependent on the generated middleware code,
or you end up having to do make twice.
2017-03-13 15:55:44 +00:00