Unverified Commit 10be950d authored by Darren Shepherd's avatar Darren Shepherd Committed by GitHub

Merge pull request #161 from aaliddell/master

Enforce lower case hostname for node
parents 36370fdf b430513a
...@@ -10,6 +10,7 @@ import ( ...@@ -10,6 +10,7 @@ import (
"os" "os"
"os/exec" "os/exec"
"path/filepath" "path/filepath"
"strings"
"time" "time"
"github.com/pkg/errors" "github.com/pkg/errors"
...@@ -90,6 +91,10 @@ func getHostnameAndIP(info cmds.Agent) (string, string, error) { ...@@ -90,6 +91,10 @@ func getHostnameAndIP(info cmds.Agent) (string, string, error) {
name = hostname 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 return name, ip, nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment