mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Merge pull request #161 from aaliddell/master
Enforce lower case hostname for node
This commit is contained in:
commit
10be950df5
@ -10,6 +10,7 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
@ -90,6 +91,10 @@ func getHostnameAndIP(info cmds.Agent) (string, string, error) {
|
||||
name = hostname
|
||||
}
|
||||
|
||||
// Use lower case hostname to comply with kubernetes constraint:
|
||||
// https://github.com/kubernetes/kubernetes/issues/71140
|
||||
name = strings.ToLower(name)
|
||||
|
||||
return name, ip, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user