Skip to content

Commit

Permalink
Connect with 0.0.0.0
Browse files Browse the repository at this point in the history
Signed-off-by: gakio12 <gakio12@gmail.com>
  • Loading branch information
gakio12 committed Feb 2, 2022
1 parent edad2ff commit e917ae6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkg/apis/k0s.k0sproject.io/v1beta1/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,14 @@ func (a *APISpec) APIServerAddress() string {
}

func (a *APISpec) getAPIServerAddress(address string) string {
switch address {
case "0.0.0.0":
return "localhost"
default:
return address
}
return address
}

// Sans return the given SANS plus all local adresses and externalAddress if given
func (a *APISpec) Sans() []string {
sans, _ := iface.AllAddresses()
sans = append(sans, a.Address)
sans = append(sans, a.BindAddress)
sans = append(sans, a.SANs...)
if a.ExternalAddress != "" {
sans = append(sans, a.ExternalAddress)
Expand Down

0 comments on commit e917ae6

Please sign in to comment.