From 08b77b5350c9bf985b72f6c3abaf5512f750bc7b Mon Sep 17 00:00:00 2001 From: Kay Yan Date: Thu, 6 Feb 2025 19:53:56 +0800 Subject: [PATCH] Fix CI by exclude the `.ansible` in `.ansible-lint` & remove `ctr image pull` workaround (#11948) * exclude .ansible in ansible-lint * remote ctr i pull workdaround Signed-off-by: Kay Yan --------- Signed-off-by: Kay Yan --- .ansible-lint | 1 + roles/kubespray-defaults/defaults/main/download.yml | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index 68a403363..b8955f4a4 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -37,5 +37,6 @@ exclude_paths: - tests/files/custom_cni/cilium.yaml - venv - .github + - .ansible mock_modules: - gluster.gluster.gluster_volume diff --git a/roles/kubespray-defaults/defaults/main/download.yml b/roles/kubespray-defaults/defaults/main/download.yml index a8e84a9cd..8bde6aa66 100644 --- a/roles/kubespray-defaults/defaults/main/download.yml +++ b/roles/kubespray-defaults/defaults/main/download.yml @@ -57,8 +57,7 @@ download_retries: 4 docker_image_pull_command: "{{ docker_bin_dir }}/docker pull" docker_image_info_command: "{{ docker_bin_dir }}/docker images -q | xargs -i {{ '{{' }} docker_bin_dir }}/docker inspect -f {% raw %}'{{ '{{' }} if .RepoTags }}{{ '{{' }} join .RepoTags \",\" }}{{ '{{' }} end }}{{ '{{' }} if .RepoDigests }},{{ '{{' }} join .RepoDigests \",\" }}{{ '{{' }} end }}' {% endraw %} {} | tr '\n' ','" nerdctl_image_info_command: "{{ bin_dir }}/nerdctl -n k8s.io images --format '{% raw %}{{ .Repository }}:{{ .Tag }}{% endraw %}' 2>/dev/null | grep -v ^:$ | tr '\n' ','" -# Using the ctr instead of nerdctl to workdaround the https://github.com/kubernetes-sigs/kubespray/issues/10670 -nerdctl_image_pull_command: "{{ bin_dir }}/ctr -n k8s.io images pull{% if containerd_registries_mirrors is defined %} --hosts-dir {{ containerd_cfg_dir }}/certs.d{%- endif -%}" +nerdctl_image_pull_command: "{{ bin_dir }}/nerdctl -n k8s.io pull --quiet" crictl_image_info_command: "{{ bin_dir }}/crictl images --verbose | awk -F ': ' '/RepoTags|RepoDigests/ {print $2}' | tr '\n' ','" crictl_image_pull_command: "{{ bin_dir }}/crictl pull"