mw/k8s: cleanups (#893)
* mw/k8s: cleanups Remove some constants that aren't used any more. Make PrimaryZone private because it doesn't need to be exported. Remove test that did not cover corner case as expressed in setup.go * cleanup this as well
This commit is contained in:
parent
028a6db4d6
commit
241e3dbcb7
4 changed files with 12 additions and 26 deletions
|
@ -87,16 +87,16 @@ func kubernetesParse(c *caddy.Controller) (*Kubernetes, error) {
|
|||
}
|
||||
}
|
||||
|
||||
k8s.primaryZone = -1
|
||||
k8s.primaryZoneIndex = -1
|
||||
for i, z := range k8s.Zones {
|
||||
if strings.HasSuffix(z, "in-addr.arpa.") || strings.HasSuffix(z, "ip6.arpa.") {
|
||||
continue
|
||||
}
|
||||
k8s.primaryZone = i
|
||||
k8s.primaryZoneIndex = i
|
||||
break
|
||||
}
|
||||
|
||||
if k8s.primaryZone == -1 {
|
||||
if k8s.primaryZoneIndex == -1 {
|
||||
return nil, errors.New("non-reverse zone name must be given for Kubernetes")
|
||||
}
|
||||
|
||||
|
@ -222,8 +222,4 @@ func searchFromResolvConf() []string {
|
|||
return rc.Search
|
||||
}
|
||||
|
||||
const (
|
||||
defaultResyncPeriod = 5 * time.Minute
|
||||
defautNdots = 0
|
||||
defaultOnNXDOMAIN = dns.RcodeSuccess
|
||||
)
|
||||
const defaultResyncPeriod = 5 * time.Minute
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue