plugin/{kubernetes/etcd}: dynamic SOA (#1188)
Add a dynamic SOA record (at least the serial and minttl). This create another interface that should be implemented by the backends. For now default to returning epoch in as a uint32 (no change from before). Lower the minTTL returned to 30s (from 60s)
This commit is contained in:
parent
fa2ae3fb43
commit
2c80551fdc
4 changed files with 48 additions and 7 deletions
17
plugin/kubernetes/xfr.go
Normal file
17
plugin/kubernetes/xfr.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
package kubernetes
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/coredns/coredns/request"
|
||||
)
|
||||
|
||||
// Serial implements the Transferer interface.
|
||||
func (e *Kubernetes) Serial(state request.Request) uint32 {
|
||||
return uint32(time.Now().Unix())
|
||||
}
|
||||
|
||||
// MinTTL implements the Transferer interface.
|
||||
func (e *Kubernetes) MinTTL(state request.Request) uint32 {
|
||||
return 30
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue