Merge pull request #86490 from aojea/ipv6cert

apiserver: add localhost to alternateDNS certificate field if BindAddress is "::"
This commit is contained in:
Kubernetes Prow Robot
2019-12-20 18:28:26 -08:00
committed by GitHub

View File

@@ -287,8 +287,7 @@ func (s *SecureServingOptions) MaybeDefaultWithSelfSignedCerts(publicAddress str
if !canReadCertAndKey {
// add either the bind address or localhost to the valid alternates
bindIP := s.BindAddress.String()
if bindIP == "0.0.0.0" {
if s.BindAddress.IsUnspecified() {
alternateDNS = append(alternateDNS, "localhost")
} else {
alternateIPs = append(alternateIPs, s.BindAddress)