From 6613895de0c16b386d005e03b3178acef543e084 Mon Sep 17 00:00:00 2001 From: Hans Feldt <2808287+hafe@users.noreply.github.com> Date: Fri, 4 Sep 2020 13:54:04 +0200 Subject: [PATCH] remove kubelet startup warnings for non docker container runtime (#6605) Removes these startup warnings: Warning: For remote container runtime, --pod-infra-container-image is ignored in kubelet, which should be set in that remote runtime instead Using "/var/run/crio/crio.sock" as endpoint is deprecated, please consider using full url format "unix:///var/run/crio/crio.sock". --- roles/kubernetes/node/templates/kubelet.env.v1beta1.j2 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/roles/kubernetes/node/templates/kubelet.env.v1beta1.j2 b/roles/kubernetes/node/templates/kubelet.env.v1beta1.j2 index 9e3ed054c..0ac16d085 100644 --- a/roles/kubernetes/node/templates/kubelet.env.v1beta1.j2 +++ b/roles/kubernetes/node/templates/kubelet.env.v1beta1.j2 @@ -12,10 +12,11 @@ KUBELET_HOSTNAME="--hostname-override={{ kube_override_hostname }}" --config={{ kube_config_dir }}/kubelet-config.yaml \ --kubeconfig={{ kube_config_dir }}/kubelet.conf \ {# end kubeadm specific settings #} +{% if container_manager == 'docker' %} --pod-infra-container-image={{ pod_infra_image_repo }}:{{ pod_infra_image_tag }} \ -{% if container_manager != 'docker' %} +{% else %} --container-runtime=remote \ ---container-runtime-endpoint={{ cri_socket }} \ +--container-runtime-endpoint=unix://{{ cri_socket }} \ {% endif %} {% if dynamic_kubelet_configuration %} --dynamic-config-dir={{ dynamic_kubelet_configuration_dir }} \