mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -04:00
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:
@@ -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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user