diff options
author | 2018-11-30 13:05:49 -0500 | |
---|---|---|
committer | 2018-11-30 13:05:49 -0500 | |
commit | 41c5cf442485d0822167ddc53cedf84e4c1eb23c (patch) | |
tree | 8d39683117cde90938642ad66425dcba4bca25b8 /plugin | |
parent | 95c9e14dcf65a9c3b97aa1be611fae664f99f7e6 (diff) | |
download | coredns-41c5cf442485d0822167ddc53cedf84e4c1eb23c.tar.gz coredns-41c5cf442485d0822167ddc53cedf84e4c1eb23c.tar.zst coredns-41c5cf442485d0822167ddc53cedf84e4c1eb23c.zip |
allow ttl 0 (#2348)
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/kubernetes/README.md | 2 | ||||
-rw-r--r-- | plugin/kubernetes/setup.go | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/plugin/kubernetes/README.md b/plugin/kubernetes/README.md index 2616e810c..9bee4c019 100644 --- a/plugin/kubernetes/README.md +++ b/plugin/kubernetes/README.md @@ -92,7 +92,7 @@ kubernetes [ZONES...] { will resolve External Services against itself. **ADDRESS** can be an IP, an IP:port, or a path to a file structured like resolv.conf. * `ttl` allows you to set a custom TTL for responses. The default (and minimum allowed) is - 5 seconds, while the maximum is capped at 3600 seconds. + 0 seconds, while the maximum is capped at 3600 seconds. Setting TTL to 0 will prevent records from being cached. * `noendpoints` will turn off the serving of endpoint records by disabling the watch on endpoints. All endpoint queries and headless service queries will result in an NXDOMAIN. * `transfer` enables zone transfers. It may be specified multiples times. `To` signals the direction diff --git a/plugin/kubernetes/setup.go b/plugin/kubernetes/setup.go index a9afeebdc..f3b554197 100644 --- a/plugin/kubernetes/setup.go +++ b/plugin/kubernetes/setup.go @@ -247,8 +247,8 @@ func ParseStanza(c *caddy.Controller) (*Kubernetes, error) { if err != nil { return nil, err } - if t < 5 || t > 3600 { - return nil, c.Errf("ttl must be in range [5, 3600]: %d", t) + if t < 0 || t > 3600 { + return nil, c.Errf("ttl must be in range [0, 3600]: %d", t) } k8s.ttl = uint32(t) case "transfer": |