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 authored and pschichtel committed Dec 18, 2023
1 parent f9160e6 commit 77178b0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkg/apis/k0s/v1beta1/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,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 77178b0

Please sign in to comment.