Enforce lower case hostname for node, references #160

This commit is contained in:
Adam Liddell
2019-03-05 18:28:26 +00:00
parent 36370fdfbd
commit b430513abf

View File

@@ -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
}