From d74770147ed3b7ef92090cafa57550ef7a033073 Mon Sep 17 00:00:00 2001 From: Matthew Mosesohn Date: Thu, 6 Apr 2017 21:07:48 +0300 Subject: [PATCH 1/2] Unbreak 1.5 deployment with kubelet 1.5 kubelet fails to start when using unknown params --- roles/kubernetes/node/templates/kubelet.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/kubernetes/node/templates/kubelet.j2 b/roles/kubernetes/node/templates/kubelet.j2 index 522f3b05d..7d6a31efb 100644 --- a/roles/kubernetes/node/templates/kubelet.j2 +++ b/roles/kubernetes/node/templates/kubelet.j2 @@ -13,8 +13,9 @@ KUBELET_HOSTNAME="--hostname-override={{ ansible_hostname }}" --pod-infra-container-image={{ pod_infra_image_repo }}:{{ pod_infra_image_tag }} \ --kube-reserved cpu={{ kubelet_cpu_limit }},memory={{ kubelet_memory_limit|regex_replace('Mi', 'M') }} \ --node-status-update-frequency={{ kubelet_status_update_frequency }} \ +{% if kube_version | version_compare('v1.6', '>=') %} --enable-cri={{ kubelet_enable_cri }} --cgroups-per-qos={{ kubelet_cgroups_per_qos }} \ - --enforce-node-allocatable='{{ kubelet_enforce_node_allocatable }}'{% endset %} +--enforce-node-allocatable='{{ kubelet_enforce_node_allocatable }}' {% etndif %}{% endset %} {# DNS settings for kubelet #} {% if dns_mode == 'kubedns' %} From 72749b8e731fce24a64d053c585c835cef320cdd Mon Sep 17 00:00:00 2001 From: Matthew Mosesohn Date: Thu, 6 Apr 2017 22:59:18 +0300 Subject: [PATCH 2/2] Update kubelet.j2 --- roles/kubernetes/node/templates/kubelet.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/kubernetes/node/templates/kubelet.j2 b/roles/kubernetes/node/templates/kubelet.j2 index 7d6a31efb..ba02e5eb9 100644 --- a/roles/kubernetes/node/templates/kubelet.j2 +++ b/roles/kubernetes/node/templates/kubelet.j2 @@ -15,7 +15,7 @@ KUBELET_HOSTNAME="--hostname-override={{ ansible_hostname }}" --node-status-update-frequency={{ kubelet_status_update_frequency }} \ {% if kube_version | version_compare('v1.6', '>=') %} --enable-cri={{ kubelet_enable_cri }} --cgroups-per-qos={{ kubelet_cgroups_per_qos }} \ ---enforce-node-allocatable='{{ kubelet_enforce_node_allocatable }}' {% etndif %}{% endset %} +--enforce-node-allocatable='{{ kubelet_enforce_node_allocatable }}' {% endif %}{% endset %} {# DNS settings for kubelet #} {% if dns_mode == 'kubedns' %}