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
commit 18cc21ed68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)