plugin/kubernetes: Handle multiple local IPs and bind (#3208)
* use all local IPs * mult/bind ips * gofmt + boundIPs fix * fix no matching endpoint case * don't duplicate NS records in answer * fix answer dedup * fix comment * add multi local ip test case
This commit is contained in:
parent
d79562842a
commit
630d3d60b9
8 changed files with 91 additions and 51 deletions
|
@ -61,6 +61,12 @@ func setup(c *caddy.Controller) error {
|
|||
return k
|
||||
})
|
||||
|
||||
// get locally bound addresses
|
||||
c.OnStartup(func() error {
|
||||
k.localIPs = boundIPs(c)
|
||||
return nil
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -113,7 +119,6 @@ func kubernetesParse(c *caddy.Controller) (*Kubernetes, error) {
|
|||
func ParseStanza(c *caddy.Controller) (*Kubernetes, error) {
|
||||
|
||||
k8s := New([]string{""})
|
||||
k8s.interfaceAddrsFunc = localPodIP
|
||||
k8s.autoPathSearch = searchFromResolvConf()
|
||||
|
||||
opts := dnsControlOpts{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue