coredns/middleware/etcd
Miek Gieben 446eaa957d Fixes: debug RR and header bits (#151)
Always set the auth and rd bits in the reply. And reverse the
ownername of debug queries so that manual matching is much easier.
2016-05-23 09:16:57 +01:00
..
msg Fixes: debug RR and header bits (#151) 2016-05-23 09:16:57 +01:00
cname_test.go middleware/etcd: Use the correct endpoint 2016-04-19 12:52:05 +00:00
debug.go Allow debug queries to etcd middleware (#150) 2016-05-22 21:16:26 +01:00
debug_test.go Fixes: debug RR and header bits (#151) 2016-05-23 09:16:57 +01:00
etcd.go Fixes: debug RR and header bits (#151) 2016-05-23 09:16:57 +01:00
group_test.go middleware/etcd: Use the correct endpoint 2016-04-19 12:52:05 +00:00
handler.go Fixes: debug RR and header bits (#151) 2016-05-23 09:16:57 +01:00
lookup.go Fixes: debug RR and header bits (#151) 2016-05-23 09:16:57 +01:00
lookup_test.go middleware/etcd: Use the correct endpoint 2016-04-19 12:52:05 +00:00
multi_test.go middleware/etcd: Use the correct endpoint 2016-04-19 12:52:05 +00:00
other_test.go middleware/etcd: Use the correct endpoint 2016-04-19 12:52:05 +00:00
README.md Allow debug queries to etcd middleware (#150) 2016-05-22 21:16:26 +01:00
setup_test.go Fixes: debug RR and header bits (#151) 2016-05-23 09:16:57 +01:00
stub.go Fixes: debug RR and header bits (#151) 2016-05-23 09:16:57 +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://localhost: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
    debug
}
  • 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.

  • debug allow debug queries. Prefix the name with o-o.debug. to reveive extra information in the additional section of the reply in the form of text records:

    skydns.test.skydns.dom.a. 300 CH TXT "127.0.0.1:0(10,0,,false)[0,]"

    This shows the complete key as the owername, the rdata of the TXT record has: host:port(priority,weight,txt content,mail)[targetstrip,group].

Examples

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

.:53 {
    etcd skydns.local {
        stubzones
        path /skydns
        endpoint http://localhost:2379
        upstream 8.8.8.8:53 8.8.4.4:53
    }
    prometheus
    cache 160 skydns.local
    loadbalance
    proxy . 8.8.8.8:53 8.8.4.4:53
}