mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04:00
plugin/kubernetes: Add noendpoints option (#1536)
* add noendpoints option * go fmt
This commit is contained in:
committed by
John Belamaric
parent
2cad04ec10
commit
9719a47c1b
@@ -92,7 +92,8 @@ func ParseStanza(c *caddy.Controller) (*Kubernetes, error) {
|
||||
k8s.autoPathSearch = searchFromResolvConf()
|
||||
|
||||
opts := dnsControlOpts{
|
||||
resyncPeriod: defaultResyncPeriod,
|
||||
initEndpointsCache: true,
|
||||
resyncPeriod: defaultResyncPeriod,
|
||||
}
|
||||
k8s.opts = opts
|
||||
|
||||
@@ -221,6 +222,11 @@ func ParseStanza(c *caddy.Controller) (*Kubernetes, error) {
|
||||
return nil, c.Errf("transfer from is not supported with this plugin")
|
||||
}
|
||||
k8s.TransferTo = tos
|
||||
case "noendpoints":
|
||||
if len(c.RemainingArgs()) != 0 {
|
||||
return nil, c.ArgErr()
|
||||
}
|
||||
k8s.opts.initEndpointsCache = false
|
||||
default:
|
||||
return nil, c.Errf("unknown property '%s'", c.Val())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user