Commit graph

2870 commits

Author SHA1 Message Date
Miek Gieben
2caddcf761 Small optimization in round robin load balancing 2016-03-24 17:51:28 +00:00
Miek Gieben
430f11a6d2 Add context.WithTimeout
Closes #41
2016-03-24 17:46:14 +00:00
Miek Gieben
4fe39f9e9e Port tests from SkyDNS
This adds *most* of the tests from SkyDNS, things lacking is
the stubzone checking, groups and the trim prefix. These
will be added in subsequent PRs and in separate test files.
2016-03-24 17:31:01 +00:00
Miek Gieben
b45208e3e5 Merge pull request #38 from miekg/etcd-stub
Etcd stub
2016-03-24 09:23:44 +00:00
Miek Gieben
78d2e31ec1 Add Stub resolving
SkyDNS can forward requests from one instance to another.
Add this base infrastructure for this feature to CoreDNS.

Add more tests as well.
2016-03-24 09:20:53 +00:00
Miek Gieben
163e5d8e71 fixed 2016-03-23 23:20:50 +00:00
Miek Gieben
55aa436234 more stuff 2016-03-23 23:06:16 +00:00
Miek Gieben
a655a5735b Slowly adding all the tests from skydns 2016-03-23 22:59:05 +00:00
Miek Gieben
18ef25e0d5 Merge pull request #33 from miekg/middleware/rewrite2
Rewrite the name of the query as well
2016-03-23 21:47:47 +00:00
Miek Gieben
e954332b9f Allow rewriting of the the name of the query as well. And improve
the docs a little.
2016-03-23 21:45:27 +00:00
Miek Gieben
978e1540f5 Merge pull request #35 from miekg/middleware/loadbalance
Middleware/loadbalance
2016-03-23 21:39:46 +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
c1d5b5d0db yes 2016-03-23 21:35:28 +00:00
Miek Gieben
7d834ce037 Remove reflect middleware - it was only a toy 2016-03-23 10:54:50 +00:00
Miek Gieben
bae1fb7aa2 Add build tag to the tests 2016-03-23 10:46:33 +00:00
Miek Gieben
8f9f2cd1ab Add etcd middleware
This middleware acts in the same way as SkyDNS. We might add options
to allow it to be behave different, but for now it will suffice.

A Corefile like:
.:1053 {
    etcd miek.nl
    proxy . 8.8.8.8:53
}
will perform lookup in etcd and proxy everything not miek.nl to Google
for further resolution.

The internal etcd forwarding *also* uses the proxy infrastructure,
meaning you get health check and such for (almost) free
2016-03-23 10:41:40 +00:00
Miek Gieben
892c15d024 Test cleanups; tests were working, broke them again 2016-03-23 09:33:23 +00:00
Miek Gieben
ba72fe1470 cleanup tests 2016-03-23 08:30:29 +00:00
Miek Gieben
b5f35a2f40 Add lookup tests for integration tests 2016-03-22 23:44:01 +00:00
Miek Gieben
503cf5176a clean println 2016-03-22 23:33:07 +00:00
Miek Gieben
58b5e93b8a fix order 2016-03-22 23:31:11 +00:00
Miek Gieben
c1b7909144 Fix order to make proxy work 2016-03-22 23:28:42 +00:00
Miek Gieben
8c707c8031 more 2016-03-22 22:44:50 +00:00
Miek Gieben
a6c3719bd8 Change of config 2016-03-22 11:32:12 +00:00
Miek Gieben
6b667cc340 tests 2016-03-22 11:13:12 +00:00
Miek Gieben
ae841ae342 it compiles 2016-03-22 11:04:56 +00:00
Miek Gieben
1a7f0deadd More cleanup - needs to think a little about NewSOA() 2016-03-22 10:29:48 +00:00
Miek Gieben
22dade9e12 It compiles; wont work obviously 2016-03-22 08:30:30 +00:00
Miek Gieben
e985af7870 some fixes 2016-03-21 21:22:23 +00:00
Miek Gieben
740178c83f more stuff; insight: use proxy for upstream queries 2016-03-21 21:21:29 +00:00
Miek Gieben
ecc5f28671 Path stuff copied over and tests added 2016-03-21 07:20:22 +00:00
Miek Gieben
b6341e8b63 more etcd stuff 2016-03-20 21:36:55 +00:00
Miek Gieben
0c94de4f71 More stuff copied from SkyDNS 2016-03-20 18:17:07 +00:00
Miek Gieben
e00e002fc2 more 2016-03-20 17:54:21 +00:00
Miek Gieben
57d45cbbd8 Start working on a etcd backend 2016-03-20 17:44:58 +00:00
Miek Gieben
15518b5b6f Merge pull request #29 from fcantournet/patch-1
Fix early stage warning
2016-03-20 15:39:25 +00:00
Félix Cantournet
b247c28bcf Fix early stage warning
I'm guessing this was the intended meaning. =)
2016-03-20 15:07:51 +01:00
Miek Gieben
41d5d40a31 dump placeholder.md here 2016-03-20 09:45:04 +00:00
Miek Gieben
5229db0fe9 Dump rewrite.md here 2016-03-20 09:40:35 +00:00
Miek Gieben
f43a0a8d6c Add blog link 2016-03-20 08:45:21 +00:00
Miek Gieben
2454d23cab only rewrite types when they are given in uppercase 2016-03-19 22:12:07 +00:00
Miek Gieben
b186c6bcf3 cleanups 2016-03-19 21:27:45 +00:00
Miek Gieben
36de2be3dc kill this 2016-03-19 21:08:59 +00:00
Miek Gieben
c3e951818f Update docs 2016-03-19 20:59:10 +00:00
Miek Gieben
097b4f1b18 less webby 2016-03-19 20:56:49 +00:00
Miek Gieben
47fca9a8fc Proxy cleanups
Remove things not supported, fix docs.
2016-03-19 20:53:37 +00:00
Miek Gieben
ec84cb1270 Random fixes and make servfail the special return code 2016-03-19 20:17:44 +00:00
Miek Gieben
6f5fe26e1f Add document detailing how the return code works for middleware 2016-03-19 19:56:58 +00:00
Miek Gieben
33f00b5a3a Fix failing on startup
When we cannot bind to the port, return an error which will make
CoreDNS fail startup. Still a bit hackish, but good enough.
2016-03-19 19:38:54 +00:00
Miek Gieben
9d14d5fcf0 no tip 2016-03-19 16:33:59 +00:00