Merge pull request #84727 from danwinship/ipv6-bind

fix apiserver to advertise IPv6 endpoints if bound to IPv6
This commit is contained in:
Kubernetes Prow Robot
2019-11-08 18:44:24 -08:00
committed by GitHub
5 changed files with 68 additions and 41 deletions

View File

@@ -60,7 +60,7 @@ func DefaultAdvertiseAddress(s *genericoptions.ServerRunOptions, insecure *gener
}
if s.AdvertiseAddress == nil || s.AdvertiseAddress.IsUnspecified() {
hostIP, err := utilnet.ChooseBindAddress(insecure.BindAddress)
hostIP, err := utilnet.ResolveBindAddress(insecure.BindAddress)
if err != nil {
return fmt.Errorf("unable to find suitable network address.error='%v'. "+
"Try to set the AdvertiseAddress directly or provide a valid BindAddress to fix this", err)