support for zone transfer for kubernetes (#1259)
* plugin/kubernetes: axfr Hook up dynamic SOA serial by setting ResourceEventHandlerFuncs in dnsController. Add prototype of returns msg.Services via the Transfer function. Leave expanding this to RRs out of scope for a bit. * plugin/kubernetes: axfr Respond to AXFR queries * Fixing race condition * Fixing instantiation of dnstest writer * Updates from review
This commit is contained in:
parent
864f502356
commit
6fd954f19c
13 changed files with 383 additions and 18 deletions
|
@ -10,6 +10,7 @@ import (
|
|||
"github.com/coredns/coredns/core/dnsserver"
|
||||
"github.com/coredns/coredns/plugin"
|
||||
"github.com/coredns/coredns/plugin/pkg/dnsutil"
|
||||
"github.com/coredns/coredns/plugin/pkg/parse"
|
||||
"github.com/coredns/coredns/plugin/proxy"
|
||||
|
||||
"github.com/mholt/caddy"
|
||||
|
@ -197,6 +198,15 @@ func kubernetesParse(c *caddy.Controller) (*Kubernetes, dnsControlOpts, error) {
|
|||
return nil, opts, c.Errf("ttl must be in range [5, 3600]: %d", t)
|
||||
}
|
||||
k8s.ttl = uint32(t)
|
||||
case "transfer":
|
||||
tos, froms, err := parse.Transfer(c, false)
|
||||
if err != nil {
|
||||
return nil, opts, err
|
||||
}
|
||||
if len(froms) != 0 {
|
||||
return nil, opts, c.Errf("transfer from is not supported with this plugin")
|
||||
}
|
||||
k8s.TransferTo = tos
|
||||
default:
|
||||
return nil, opts, c.Errf("unknown property '%s'", c.Val())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue