plugin/kubernetes: Add noendpoints option (#1536)
* add noendpoints option * go fmt
This commit is contained in:
parent
2cad04ec10
commit
9719a47c1b
4 changed files with 96 additions and 15 deletions
|
@ -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())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue