mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 02:33:14 -04:00
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
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...]
zoneszones 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
}
stubzonesenable the stub zones feature. The stubzone is only done in the etcd tree located under the first zone specified.paththe path inside etcd, defaults to "/skydns".endpointthe etcd endpoints, default to "http://localhost:2397".upstreamupstream 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.tlsfollowed the cert, key and the CA's cert filenames.
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
}