coredns/middleware/etcd
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
..
msg Implement NS queries to Etcd middleware 2016-04-13 08:03:56 +01:00
singleflight Add etcd middleware 2016-03-23 10:41:40 +00:00
cname_test.go better (#104) 2016-04-11 10:22:27 +01:00
etcd.go Support SkyDNS' stubzones 2016-03-26 16:29:35 +00:00
group_test.go Stub forward/proxy tests (#108) 2016-04-12 21:30:08 +01:00
handler.go Dont crash on tests with etcd running 2016-04-15 20:22:37 +01:00
lookup.go Cache (#126) 2016-04-19 11:13:24 +01:00
lookup_test.go Implement NS queries to Etcd middleware 2016-04-13 08:03:56 +01:00
multi_test.go better (#104) 2016-04-11 10:22:27 +01:00
other_test.go Stub forward/proxy tests (#108) 2016-04-12 21:30:08 +01:00
path.go Add etcd middleware 2016-03-23 10:41:40 +00:00
path_test.go Add etcd middleware 2016-03-23 10:41:40 +00:00
README.md middleware/file: Support delegations (#124) 2016-04-16 16:16:52 +01:00
setup_test.go Implement NS queries to Etcd middleware 2016-04-13 08:03:56 +01:00
stub.go Stub forward/proxy tests (#108) 2016-04-12 21:30:08 +01:00
stub_cycle_test.go oops forget to checkin (#111) 2016-04-12 21:50:01 +01:00
stub_handler.go oops forget to checkin (#111) 2016-04-12 21:50:01 +01:00
stub_test.go Dont crash on tests with etcd running 2016-04-15 20:22:37 +01:00

etcd

etcd enabled reading zone data from an etcd instance. The data in etcd has to be encoded as a message like SkyDNS. It should also work just like SkyDNS.

The etcd middleware makes extensive use of the proxy middleware to forward and query other servers in the network.

Syntax

etcd [zones...]
  • zones zones etcd should be authoritative for.

The path will default to /skydns the local etcd proxy (http://127.0.0.1:2379). If no zones are specified the block's zone will be used as the zone.

If you want to round robin A and AAAA responses look at the loadbalance middleware.

etcd [zones...] {
    stubzones
    path /skydns
    endpoint endpoint...
    upstream address...
    tls cert key cacert
}
  • stubzones enable the stub zones feature. The stubzone is only done in the etcd tree located under the first zone specified.
  • path the path inside etcd, defaults to "/skydns".
  • endpoint the etcd endpoints, default to "http://localhost:2397".
  • upstream upstream resolvers to be used resolve external names found in etcd, think CNAMEs pointing to external names. If you want CoreDNS to act as a proxy for clients you'll need to add the proxy middleware.
  • tls followed the cert, key and the CA's cert filenames.

Examples

This is the default SkyDNS setup, with everying specified in full:

.:53 {
    etcd {
        stubzones
        path /skydns
        endpoint http://localhost:2397
        upstream 8.8.8.8:53 8.8.4.4:53
    }
    loadbalance
    proxy . 8.8.8.8:53 8.8.4.4:53
}