Commit graph

12 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
acfa6501e0 mw/k8s: remove dependence on global var (#888)
* mw/k8s: remove dependence on global var

Remove the global coreDNSRecord that was used. Remove tests the
referenced that var. Cleanup the rest.

* Rename function as well

* fixes
2017-08-10 23:13:08 +01:00
Miek Gieben
a38a34c7e0 Kubernetes cleanup6 (#887)
* mw/kubernetes: handle dns.TypeNS better.

* mw/kubernetes: cleanup typeNS replies a bit.
2017-08-10 22:14:19 +01:00
Miek Gieben
7e56cc74e5 WIP: Parserequest2 cutback (#868)
* middleware/kubernetes: pull TXT out of parseRequest

Put the TXT handling one layer higher and remove it from parseRequest.
Also rename the podsvc field in there to podOrSvc. Now that it isn't
used anymore for TXT record (dns-version) that was put in there. We can
make this a boolean (in a future PR).

Make parseRequest get an optional Zone that is from state.Zone and use
that instead of its own code. Removed some tests and other smaller
cleanups.

Fixes #836

* add this reverse

* another check

* readd

* Rename to kPod and kService for some clarity
2017-08-10 01:08:58 -07:00
Miek Gieben
2c0fc3182c middleware/kubernetes: cleanup (#818)
Drop the interfaceAddr interfaces and just use a function. Cleanup
all fallout from that. Remove the use of global variables and cleanup
the tests a bit.
2017-08-03 23:14:11 -07:00
Miek Gieben
cd1f2f1bbf mw/kubernete: small cleanup (#810)
* mw/kubernete: small cleanup

Small cleanup, avoid pointer to []msg.Services and just returns the
msg.Service.

* Actually compile

* testss
2017-08-03 09:03:53 -07:00
Chris O'Haver
7219bff11f compress empty implementations to single line (#740) 2017-06-16 09:11:53 -07:00
Chris O'Haver
930c54ef62 middleware/kubernetes: Implement current federation beta (#723)
* federation initial commit

* UTs/bugfixes

* federation bits

* polish, cover UT gaps

* add TODO

* go fmt & todo note

* remove unrelated change

* pr changes

* start node watcher

* get real node name

* remove unused case
2017-06-14 09:38:00 -04:00
Chris O'Haver
ecae087201 unexpose items per lint (#701) 2017-06-02 23:54:33 -04:00
Chris O'Haver
d684dedfd3 unexpose InterfaceAddrser (#693) 2017-06-02 07:25:33 +01: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