Commit Graph

453 Commits

Author SHA1 Message Date
Miek Gieben
25c57ea314 Merge pull request #428 from johnbelamaric/k8s-fix-ptr
K8s Test Cleanup and Service PTR
2016-11-16 10:20:34 +00:00
Miek Gieben
1168f35eff Merge pull request #431 from miekg/close-reader
middleware/auto: Close to reader
2016-11-16 10:19:53 +00:00
Miek Gieben
b827c691bb middleware/auto: Close to reader
Close the reader, stop leaking file descriptors.
2016-11-16 10:16:56 +00:00
John Belamaric
7e93746083 Fix reverse zone in corefile 2016-11-15 15:03:49 +00:00
John Belamaric
99b60d2966 Change IPs to match hyperkube 2016-11-15 14:25:37 +00:00
John Belamaric
afe4368c34 K8s Test Cleanup and Service PTR
Change the CI setup for K8s to be simpler. Now it just creates a
set of objects via a yaml file, making it very easy to modify
the tests.

Implement PTR for services.
2016-11-15 01:35:24 +00:00
Miek Gieben
c6700c64fa Add docs (#427)
Provide TTL examples for cache middleware. Fixes: #364

Add interaction docs to make non invalidation for cache middleware
clear. Cache might serve stale records. Fixes: #403
2016-11-14 16:59:17 +00:00
Michael Grosser
ecbb6baccd Add docs
Provide TTL examples for cache middleware. Fixes: #364

Add interaction docs to make non invalidation for cache middleware
clear. Cache might serve stale records. Fixes: #403
2016-11-14 16:06:41 +00:00
Yong Tang
137fc33b8f Fix several typos in docs. (#426)
Fixes several typos in docs.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-14 07:25:17 +00:00
Yong Tang
43b2519eca Add Codecov badge to README.md (#425)
This fix adds Codecov badge to README.md so that coverage data shows up.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-13 11:39:40 -08:00
Miek Gieben
f1a10d5826 Add goreportcard 2016-11-13 14:11:14 +00:00
Michael Grosser
ece3cf8ecf Fix various issues with formatting and typos (#424)
* Fix typos

* Simplify code

* Fix error usage
2016-11-13 14:03:12 +00:00
Miek Gieben
f402b8f726 Releasing: automate more
Only manual operation is editing the source - even that could be
automated but meh.
2016-11-11 17:57:06 +00:00
Miek Gieben
651f3938a1 More idiomatic Go 2016-11-11 16:56:15 +00:00
Miek Gieben
20e25559d5 releasing 003 v003 2016-11-11 16:40:17 +00:00
Miek Gieben
0481614fd8 Document how to get the author from git (#423) 2016-11-11 09:36:26 +00:00
Chris O'Haver
96206cdbc3 Return NXDOMAIN when no items match query (#422)
* When no records match, reply with NXDOMAIN

* Implement in IsNameError

* case for unexposed namespace. k8s integation tests

* Fix imports order. Lower case of err strs.
2016-11-10 21:24:06 +00:00
Miek Gieben
4036c3c319 Revert "Show master status, not latest build"
This reverts commit 15ab38f068.
2016-11-10 10:35:03 +00:00
Miek Gieben
15ab38f068 Show master status, not latest build 2016-11-10 09:53:11 +00:00
John Belamaric
611d83ed97 Merge pull request #359 from chrisohaver/replace_sky
Add type to default template
2016-11-09 14:02:06 -08:00
Chris O'Haver
5f55cd6dad Update k8s integration tests 2016-11-09 21:07:27 +00:00
Chris O'Haver
48e1909218 Add type to default template 2016-11-09 21:07:27 +00:00
Michael Grosser
a8287bb04d middleware/log cleanup readme (#413) 2016-11-09 13:02:06 +00:00
Miek Gieben
e210b06e89 middleware/file: also react to rename events. (#406)
* middleware/file: also react to rename events.

* React to all events
2016-11-09 10:02:52 +00:00
Miek Gieben
4ef53081c5 middleware/file: Add CNAME chain support (#400)
Up till now we would only chase 1 CNAME. Spec requires we will chase
all. This PR add support for this.  Up to 8 CNAMEs are chased (this
could be longer, by just checking for cycles, but 8 seems enough for
now).

Also add RRSIG of the first CNAME for DNSSEC.
2016-11-09 10:02:26 +00:00
Miek Gieben
6abbe231e5 middleware/cache: cache 0 will be capped at 5 (#408)
* middleware/cache: cache 0 will be capped at 5

cache 0 would return TTL=0 records, up that to the documented minimum of
5 seconds.

* middleware/cache: check for 0 TTL

Handle 0 TTL differently and return an error, we might need to
special case this in the future.
2016-11-09 10:01:26 +00:00
Miek Gieben
da742ed596 core: remove unwanted flags (#410)
Remove unwanted flags (mostly from glog) and keep the ones we need.
2016-11-09 10:00:46 +00:00
Miek Gieben
0f8cb5094d middleware/file: notify better error reporting
Slightly better errors reporting for failing to sent a notify.
2016-11-08 21:45:27 +00:00
Miek Gieben
fb7fcff982 middleware/file|auto: Notifies and AXFR (#399)
Be more explicit in the logs when a notify fails.
New notify error message looks like:

2016/11/07 18:21:42 [ERROR] Notify for zone "example.org." was not accepted by "8.8.8.8:53": rcode was "SERVFAIL"

Correctly pick up secondaries

When multiple secondary are specified make sure they are picked up.

Fixes #393 #398
2016-11-07 19:15:21 +00:00
Miek Gieben
e89c4b5c28 middleware/cache: only cache query and responses (#397)
Extent typify to check the transfers, dynamic updates and notifies.
Extend *cache* to not put these in the cache.

Fixes #393
2016-11-07 16:27:50 +00:00
John Belamaric
4318dfbf02 Fix Kubernetes Watches (#392)
The watchers were still trying to process raw v1 objects which
failed to be added to the store. This meant new services and
namespaces created after CoreDNS started would not be discoverable.

Add a filter function that converts watch events with v1 objects
to events with api objects.
2016-11-07 16:21:24 +00:00
Miek Gieben
352901d8f8 middleware/auto: add axfr test. (#396) 2016-11-07 16:21:16 +00:00
Miek Gieben
769d42247e Add docker tagging
Small tweak to tag docker image with current release number.
2016-11-07 14:12:01 +00:00
Miek Gieben
3d5be649a2 Issue 388 (#389)
* add extra test

* middleware/auto: fix crash when calling empty handler

Don't call the next middleware, we should be auth. for this zone
getitng into this path we should respond with ServFail.

Fixes #388
2016-11-07 11:12:20 +00:00
Miek Gieben
0f22d32191 Fix compilation error 2016-11-07 10:33:48 +00:00
Miek Gieben
d03c0b9932 finish missing watcher check (#387) 2016-11-07 08:00:30 +00:00
Miek Gieben
fc85754849 Golint (#386)
Lint and vet the curret code add docs about adding a git post-commit
hook that performs these actions after each commit.
2016-11-07 07:43:38 +00:00
Miek Gieben
d3dae8d77f middleware/auto: handle non-existent directory (#385)
Don't panic on a non-existent directory. Add test for it as well.

Fixes #384
2016-11-06 19:37:43 +00:00
Miek Gieben
243797a387 middleware/file: add nsec for wildcard expansion (#382)
A NSEC record is need to deny any other name that might exist.
Also don't blindly perform the interface conversion when getting
glue for NS records as they now may include RRSIG - also add tests
for that.
2016-11-06 08:32:07 +00:00
Miek Gieben
8d3418c015 BackendService: add Reverse method (#381)
Add a Reverse method to BackendService because different backends want
to to do diff. things. This allows etc/k8s to share even more code and
we can unify the PTR handling.
2016-11-05 15:43:27 +00:00
Miek Gieben
2cca527d9f middleware/file: fix delegations (#376)
Fix the delegation handling in the *file* and *dnssec* middleware.
Refactor tests a bit and show that they are failling.

Add a Tree printer, cleanups and tests.
Fix wildcard test - should get no answer from empty-non-terminal
2016-11-05 14:39:49 +00:00
Miek Gieben
d6902cd7a1 Disable metrics test (#380)
Disable this test (for now), it fails weirdly on travis
(and not locally). Initial suspicion that another server
is still reporting (or something). Anyway hard to replicate
locally - disable it for now.
2016-11-05 14:38:49 +00:00
John Belamaric
229c82c418 Fix k8s client (#379)
* Fix k8s client to use client-go

* Fix Kubernetes Build Issue

The client-go code requires you to vendor. I have done a hack here
in the Makefile to vendor it to version 1.5. But looks like we
will need to do this the 'right' way soon.

* Convert v1 to api Objects in List Functions

Also removed the endpoint controller which was not used for anything.
The Watch functions may still need the same treatment.

* Vendor client-go release-1.5

* Fix basic SRV feature

This is actually not serving SRV records correctly, but this should
get it to work as it did prior to the k8s client changes. Another
fix will be needed to serve SRV records as defined in the spec.

* Add additional output in test result

Add the response to the test output.

* Fix erroneous test data
2016-11-05 11:57:08 +00:00
Ben Kochie
775d26c5e2 Add metrics for cache hits/misses (#375)
* Add metrics for cache hits/misses

Add counters for cache middleware hits and misses.

* Add test for cache middleware hit/miss counters.

* Fix cache hit metric incrementing.

* Add cache hit/miss metrics to dnssec middleware.

* Update README metric documentation.
2016-10-31 18:50:50 +00:00
Miek Gieben
27d893cf33 ServiceBackend interface (#369)
* Add ServiceBackend interface

This adds a ServiceBackend interface that is shared between etcd/etcd3
(later) and kubernetes, leading to a massive reduction in code. When
returning the specific records from their backend.

Fixes #273
2016-10-30 15:54:16 +00:00
Miek Gieben
81d5baee28 middleware/cache: fix metrics test
Fix the metrics test, top-level test directory still referenced the
old metrics name.
2016-10-30 15:08:40 +00:00
Manuel Alejandro de Brito Fontes
1b923adde6 Fix k8s build (#373) 2016-10-30 14:58:33 +00:00
Ben Kochie
98a8fb2622 Update metric names (#371)
Cleanup names/typos to match standard naming conventions.
2016-10-30 09:06:57 +00:00
Miek Gieben
490ffbd6d2 go vet issue 2016-10-28 12:59:18 +01:00
Miek Gieben
cb867ff6bd middleware/metrics: export ListenAddr (#366)
ListenAddr is the address where the prometheus metric are exported.
This can be used in tests to listen on "localhost:0" and then later
retrieve the metrics from there. It makes the tests indepent on each
other.
2016-10-28 12:57:10 +01:00