Commit graph

22 commits

Author SHA1 Message Date
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
Chris O'Haver
adfd7d5b19 Add pod cache and verified pod responses (#483)
* Add pod cache and verified pod responses

* add ip indexing for pod cache
2017-01-20 07:22:11 +00:00
Chris O'Haver
56d3b47d11 Add A lookup for headless services (#451) 2016-12-02 22:50:01 +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
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
0f22d32191 Fix compilation error 2016-11-07 10:33:48 +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
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
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
Manuel Alejandro de Brito Fontes
1b923adde6 Fix k8s build (#373) 2016-10-30 14:58:33 +00:00
Miek Gieben
aa7744dc86 cleanups: go vet/golint (#331)
Go vet and golint the new code once again.

Drop Name from NameTemplate - it's cleaner: nametemplate.Template.
2016-10-12 12:46:35 +01:00
Manuel de Brito Fontes
8e6257c51f Lister refactor kubernetes/kubernetes#33269 2016-09-23 10:23:11 -03:00
Manuel de Brito Fontes
2b62384223 Refactoring of k8s helpers 2016-09-23 09:48:11 -03:00
Manuel de Brito Fontes
3be9e58ddf Revert k8s changes 2016-09-22 08:29:50 -03:00
Manuel Alejandro de Brito Fontes
d250742d9e Fix k8s build (#278) 2016-09-21 20:05:18 +01:00
Yong Tang
50d47a55a2 Fix build error by change kubernetes controller to pkg/client/cache (#262)
Kubernetes moves informer and controller to pkg/client/cache, see:
https://github.com/kubernetes/kubernetes/pull/32718

As a result, coredns build is broken.

This fix fixes the build by making related change with kubernetes.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-09-16 16:31:23 +01:00
Miek Gieben
1c31f1e7f3 remove debug 2016-08-23 17:35:20 +01:00
Michael Richmond
2153d2defd Fix k8s integration tests (#231)
* Adding debug message when starting k8s controller

* Adding work-around for timing issue in k8s integration tests

* Remove unused import

* Fix Makefile for ast package

* Increase k8s verbosity in travis

* Updating TODO list to find root cause of test issue

* go fmt cleanup
2016-08-23 07:15:21 +01:00
Miek Gieben
9ac3cab1b7 Make CoreDNS a server type plugin for Caddy (#220)
* Make CoreDNS a server type plugin for Caddy

Remove code we don't need and port all middleware over. Fix all tests
and rework the documentation.

Also make `go generate` build a caddy binary which we then copy into
our directory. This means `go build`-builds remain working as-is.

And new etc instances in each etcd test for better isolation.
Fix more tests and rework test.Server with the newer support Caddy offers.

Fix Makefile to support new mode of operation.
2016-08-19 17:14:17 -07:00
Michael Richmond
ad2838b916 Adding label selector support to Corefile (#208)
* Adding parsing for label selector to Corefile

* Updating comment typo in k8sCorefile

* Adding implementation of label support to filter exposed objects

* Updating TODO list
2016-08-12 20:44:08 -07:00
Michael Richmond
c079de65b5 Adding resyncperiod to Corefile (#205)
* Removing old unused inline k8s API code and tests.
* Adding parsing implementation for `resyncperiod` keyword from Corefile.
* Adding tests for parsing `resyncperiod` keyword from Corefile.
8 Updating README.md and conf/k8sCorefile.
2016-08-08 14:30:04 -07:00
Michael Richmond
6d90b745e0 Switch over to k8s notification API (#202)
* Merge notification code by @aledbf and update for recent changes.
* Fix travis environment to correctly build with k8s.io and forked repositories.
* Refactored kubernetes Corefile parser
* Added lots of Corefile parsing tests
2016-08-05 18:19:51 -07:00