Commit graph

18 commits

Author SHA1 Message Date
Michael Richmond
d04abdf422 BK8s datasource middleware -- PoC for A records (#153)
* Laying down kubernetes middleware foundation

* Duplicated a bunch of code form etcd middleware
* Duplicated code hacked to compile and load as a separate middleware

* Adding verbose build option to Makefile

* Removing stubzone and tls support

tls and stubzone support was carried over from base etcd middleware code.
Removing to simplify the kube middleware implementation. (For now.)

* Adding conf directory for sample conf files

* Removing stubzone support from query handler

* Remove upstream and proxy from k8s corefile.

Not sure that upstream or proxy makes sense for a k8s backed zone.

* Comment out use of singleflight serialization

* Removing parsing support for "upstream" directive from k8s

* Removing upstream directive parsing code

* Removing CNAME and TXT lookup implementation

* Create README.md

Brain-dump of DNS record name assembly and open work items.

* Adding notes about wildcard handling

* Adding basic k8s API client

* Fleshing out methods on k8s connector

* Remove PathPrefix from middleware init

* Removing incorrect plural

* Adding brute-force k8s service lookup functions

* Initializing k8s API connector during startup

* Hacking around to call k8s connector

* Parsing incoming domain name into serviceName and namespace

* Improving and simplifying k8s zone matching and label segmentation

* Removing unused functions carried over from etcd middleware

* Adding basic return of k8s data to DNS client

* updated debugging println statements to flag with "[debug]"
* removed code in kubernetes.go::Records that was a hold-over from etcd middleware.
* Removed some random exploratory hacking.

* Minior README.md updates

* Updating with demo instructions

* Updating README.md with CoreFile and removing completed TODO items

* Updating conf file and README to reflect DNS response cache works

* Disabling DNS response caching

* Adding debug statement on entry to Records()

* Changing port number in exampes to port 53.

* Misc style and clarity changes

* Removing empty function definitions

* Adding comment to track future cleanup

* Refactoring README to follow style of other middleware

* Exposing dataobject field (typo)
2016-06-06 20:49:53 +01:00
Michael Richmond
e34280e7af Clean up remove caddy refs (#139)
* Changed reference to Caddy over to CoreDNS

* Removing references to caddy

* Fixed misleading error message to reference coredns

* Cleaning up references to caddy

* Adding clean and deps targets

Muscle memory is resulting in "make clean" commands.

* Adding test target to makefile

* More "Caddy" cleanup
2016-04-28 19:07:44 +01:00
Miek Gieben
2700eece2e pprof middleware (#138)
Add pprof middleware, enabled by pprof directive.
2016-04-28 10:26:58 +01:00
Miek Gieben
1aa1a92198 Add middleware/dnssec (#133)
This adds an online dnssec middleware. The middleware will sign
responses on the fly. Negative responses are signed with NSEC black
lies.
2016-04-26 17:57:11 +01:00
Miek Gieben
e726dca2ee Fix error reporting (#128)
Put error back in the correct place in the directives.go. Also don't
make it a pointer. If it *is* a pointer the buildstack function does
not correctly set the Next Handler. Don't understand *why* this is
different from Caddy. Anyway this fixes it, with the caveat that
the error log file is now openend earlier in the startup.

Fixes #127
2016-04-19 22:51:23 +01:00
Miek Gieben
10db2a80df Cache (#126)
* Add middleware/cache

Add a caching middleware that caches nxdomain, nodata and successful
responses. It differentiates between DNSSEC on normal DNS replies.

Each reply is compress and scrubbed so it will fit the specific client
asking for it.

* first simple test, less exporting of stuff

* more

* Add middleware/cache

Add a caching middleware that caches nxdomain, nodata and successful
responses. It differentiates between DNSSEC on normal DNS replies.

Each reply is compressed and scrubbed so it will fit the specific client
asking for it. The TTL is decremented with the time spend in the cache.
There is syntax that allows you to cap the TTL for all records, no
matter what. This allows for a shortlived cache, just to absorb query
peaks.

+Tests

* cache test infrastructure

* Testing
2016-04-19 11:13:24 +01:00
Miek Gieben
68171c7a63 A health middleware
Start http handler on port 8080 and return OK. Also add some

documentation fixes for the prometheus middleware.
2016-04-06 09:21:46 +01:00
Miek Gieben
e0c4f94d67 return failure with CH class hits file or etcd, monitoring portis 9135 2016-04-05 16:23:03 +01:00
Miek Gieben
8892a1b490 Middleware chaining fixes
For prometheus use the plain value, not a pointer and change all usages.
Allow AXFR to be requested over udp as well and some other more log
printed when commencing an AXFR.
2016-04-05 15:54:06 +01:00
Miek Gieben
6445a3f2f0 Cleanup docs and the chaos middleware
Make the CH middleware actually work. Needs a bit of a hack to route

the fake version.bind and friends zone to the correct handler. Fiddle

with the order in directive.go so that CH queries get logged as well.



Secondly add class rewriting to the rewrite middleware handler and also

log the class by default.
2016-04-04 15:45:17 +01:00
Miek Gieben
f58f1e4285 Add secondary support
Allow specifying a primary server and retrieve the zone's content.

Add tests and an Expired bool to zone struct, to stop server zones

that are expired. The zone is retrieved on Startup, no updates of

changed content are done. We also don't respond to notifies yet.
2016-04-03 09:02:34 +01:00
Miek Gieben
5d70567f1c Implement chaos middleware
This allows for CH TXT queries that return some information about
the server and/or the authors (or whatever you put in there).
2016-03-25 08:36:32 +00:00
Miek Gieben
163e5d8e71 fixed 2016-03-23 23:20:50 +00:00
Miek Gieben
b167411bba Add roundrobin middleware
This middleware allows you to round robin a/aaaa records in a reply and
maybe more in the future (i.e.) sort a packet?
2016-03-23 21:38:35 +00:00
Miek Gieben
7d834ce037 Remove reflect middleware - it was only a toy 2016-03-23 10:54:50 +00:00
Miek Gieben
c1b7909144 Fix order to make proxy work 2016-03-22 23:28:42 +00:00
Miek Gieben
ae841ae342 it compiles 2016-03-22 11:04:56 +00:00
Miek Gieben
3ec0d9fe6b First commit 2016-03-18 20:57:35 +00:00