Read resolv file just oncce
This commit is contained in:
parent
c36d6ffbff
commit
190788848a
2 changed files with 11 additions and 8 deletions
|
|
@ -24,7 +24,6 @@ import (
|
|||
"github.com/mitchellh/mapstructure"
|
||||
|
||||
"k8s.io/ingress/controllers/nginx/pkg/config"
|
||||
"k8s.io/ingress/core/pkg/net/dns"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -72,13 +71,6 @@ func ReadConfig(src map[string]string) config.Configuration {
|
|||
to.SkipAccessLogURLs = skipUrls
|
||||
to.WhitelistSourceRange = whitelist
|
||||
|
||||
h, err := dns.GetSystemNameServers()
|
||||
if err != nil {
|
||||
glog.Warningf("unexpected error reading system nameservers: %v", err)
|
||||
} else {
|
||||
to.Resolver = h
|
||||
}
|
||||
|
||||
config := &mapstructure.DecoderConfig{
|
||||
Metadata: nil,
|
||||
WeaklyTypedInput: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue