Merge "Lowercase hostname when using it as K8s nodeName"

This commit is contained in:
Zuul 2018-12-05 22:46:02 +00:00 committed by Gerrit Code Review
commit b3883624e8

View File

@ -183,7 +183,8 @@ class CNIDaemonWatcherService(cotyledon.Service):
try:
nodename = os.environ['KUBERNETES_NODE_NAME']
except KeyError:
nodename = socket.gethostname()
# NOTE(dulek): By default K8s nodeName is lowercased hostname.
nodename = socket.gethostname().lower()
return nodename
def run(self):