Commit graph

8 commits

Author SHA1 Message Date
Miek Gieben
d8714e64e4 Remove the word middleware (#1067)
* Rename middleware to plugin

first pass; mostly used 'sed', few spots where I manually changed
text.

This still builds a coredns binary.

* fmt error

* Rename AddMiddleware to AddPlugin

* Readd AddMiddleware to remain backwards compat
2017-09-14 09:36:06 +01:00
Miek Gieben
f96cf27193 mw/federation: add federation back as separate mw for k8s (#929)
* mw/federaration

This PR add the federation back as a middleware to keep it more
contained from the main kubernetes code.

It also makes parseRequest less import and pushes this functionlity down
in the k.Entries. This minimizes (or tries to) the importance for the
qtype in the query. In the end the qtype checking should only happen
in ServeDNS - but for k8s this might proof difficult.

Numerous other cleanup in code and kubernetes tests.

* up test coverage
2017-08-18 14:45:20 +01:00
Miek Gieben
5a1875120c mw/kubernetes: add reverse test case (#932)
Add a non-arpa testcase to the reverse test.
2017-08-17 18:42:14 +01:00
Miek Gieben
7f46df6d27 tests: add SortAndCheck helper (#926)
There was quite some code duplication in a lot of tests to check if
an answer was considered Ok. Created a test.SortAndCheck helper function
that takes care of this.
2017-08-16 15:30:58 +01:00
Miek Gieben
06644c2855 mw/kubernetes: add reverse_test.go (#922)
This PR adds a reverse tests that copies some of it from the main
integration test. This aids in local testing because you don't need
a full k8s setup running.

It does the most minimal testing, a successful return and a nodata
response that includes the SOA for in-addr.arpa.
2017-08-16 07:33:35 +01:00
Miek Gieben
00f5c7797e mw/kubernetes: remove federation and cidr (#916)
* mw/kubernetes: remove federation and cidr

Remove both as we have a corefile syntax change that handles cidr and
remove federation because that is going to be its own middleware.

* backwards incompat changes

This PR:
* removes cidr from kubernetes (core Corefile feature now)
* removes federation from kubernets (comes back as new middleware)
* [remove autopath - which was already gone, so that already was
  backwards incompat]
* adds `fallthrough` to the *etcd* middleware and makes you enable it.
* Fail on unknown properties
* documentation
* Disable TestHealthCheck as it uses realtime and fails
2017-08-14 08:49:26 +01:00
Miek Gieben
241e3dbcb7 mw/k8s: cleanups (#893)
* mw/k8s: cleanups

Remove some constants that aren't used any more. Make PrimaryZone
private because it doesn't need to be exported. Remove test that
did not cover corner case as expressed in setup.go

* cleanup this as well
2017-08-11 16:21:07 +01:00
Miek Gieben
df1879f9ae middleware/kubernetes: put reverse function in own file (#863)
Move reverse function and (some) test code to reverse*.go
2017-08-09 05:18:46 -07:00