From 29f5b55d42dd7beaa2a02db73b8e9fb62b3b8352 Mon Sep 17 00:00:00 2001 From: Matthew Mosesohn Date: Fri, 22 Dec 2017 11:31:18 +0000 Subject: [PATCH] remove unwanted whitespace for kube_override_hostname (#2105) --- roles/kubernetes/node/defaults/main.yml | 6 +++--- roles/kubernetes/node/templates/kubelet.kubeadm.env.j2 | 2 +- roles/kubernetes/node/templates/kubelet.standard.env.j2 | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/roles/kubernetes/node/defaults/main.yml b/roles/kubernetes/node/defaults/main.yml index 90840dbff..91a6f6f50 100644 --- a/roles/kubernetes/node/defaults/main.yml +++ b/roles/kubernetes/node/defaults/main.yml @@ -79,11 +79,11 @@ kube_hyperkube_image_repo: "" # If non-empty, will use this string as identification instead of the actual hostname kube_override_hostname: >- - {% if cloud_provider is defined %} + {%- if cloud_provider is defined -%} false - {% else %} + {%- else -%} {{ ansible_hostname }} - {% endif %} + {%- endif -%} # cAdvisor port kube_cadvisor_port: 0 diff --git a/roles/kubernetes/node/templates/kubelet.kubeadm.env.j2 b/roles/kubernetes/node/templates/kubelet.kubeadm.env.j2 index b97b3e949..e48e08bd9 100644 --- a/roles/kubernetes/node/templates/kubelet.kubeadm.env.j2 +++ b/roles/kubernetes/node/templates/kubelet.kubeadm.env.j2 @@ -9,7 +9,7 @@ KUBELET_ADDRESS="--address={{ kubelet_bind_address }} --node-ip={{ kubelet_addre # The port for the info server to serve on # KUBELET_PORT="--port=10250" # You may leave this blank to use the actual hostname -{% if kube_override_hostname %} +{% if kube_override_hostname|bool %} KUBELET_HOSTNAME="--hostname-override={{ kube_override_hostname }}" {% endif %} {# Base kubelet args #} diff --git a/roles/kubernetes/node/templates/kubelet.standard.env.j2 b/roles/kubernetes/node/templates/kubelet.standard.env.j2 index c21a796cd..b360757b5 100644 --- a/roles/kubernetes/node/templates/kubelet.standard.env.j2 +++ b/roles/kubernetes/node/templates/kubelet.standard.env.j2 @@ -6,7 +6,7 @@ KUBELET_ADDRESS="--address={{ kubelet_bind_address }} --node-ip={{ kubelet_addre # The port for the info server to serve on # KUBELET_PORT="--port=10250" # You may leave this blank to use the actual hostname -{% if kube_override_hostname %} +{% if kube_override_hostname|bool %} KUBELET_HOSTNAME="--hostname-override={{ kube_override_hostname }}" {% endif %} {# Base kubelet args #}