mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 05:03:09 +00:00
Merge pull request #86490 from aojea/ipv6cert
apiserver: add localhost to alternateDNS certificate field if BindAddress is "::"
This commit is contained in:
commit
18cc21ed68
@ -287,8 +287,7 @@ func (s *SecureServingOptions) MaybeDefaultWithSelfSignedCerts(publicAddress str
|
|||||||
|
|
||||||
if !canReadCertAndKey {
|
if !canReadCertAndKey {
|
||||||
// add either the bind address or localhost to the valid alternates
|
// add either the bind address or localhost to the valid alternates
|
||||||
bindIP := s.BindAddress.String()
|
if s.BindAddress.IsUnspecified() {
|
||||||
if bindIP == "0.0.0.0" {
|
|
||||||
alternateDNS = append(alternateDNS, "localhost")
|
alternateDNS = append(alternateDNS, "localhost")
|
||||||
} else {
|
} else {
|
||||||
alternateIPs = append(alternateIPs, s.BindAddress)
|
alternateIPs = append(alternateIPs, s.BindAddress)
|
||||||
|
Loading…
Reference in New Issue
Block a user