From fdc5d7458f4960a57fb4d316349a2afd27ebea3d Mon Sep 17 00:00:00 2001 From: Cristian Calin <6627509+cristicalin@users.noreply.github.com> Date: Mon, 20 Dec 2021 10:33:26 +0200 Subject: [PATCH] Upgrade to nerdctl 0.15.0 and some fixes (#8315) * nerdctl: move to 0.15.0 * nerdctl: reduce verbosity when pulling images * download: use proxy environment when using nerdctl to download containers --- roles/download/defaults/main.yml | 8 ++++---- roles/download/tasks/download_container.yml | 1 + roles/download/tasks/prep_download.yml | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/roles/download/defaults/main.yml b/roles/download/defaults/main.yml index 4e10e9cbf..9a9af7645 100644 --- a/roles/download/defaults/main.yml +++ b/roles/download/defaults/main.yml @@ -88,7 +88,7 @@ kube_ovn_version: "v1.8.1" kube_router_version: "v1.3.2" multus_version: "v3.8" helm_version: "v3.7.1" -nerdctl_version: "0.14.0" +nerdctl_version: "0.15.0" krew_version: "v0.4.2" # Get kubernetes major version (i.e. 1.17.4 => 1.17) @@ -527,11 +527,11 @@ gvisor_containerd_shim_binary_checksums: nerdctl_archive_checksums: arm: - 0.14.0: b85b6813935d4a9f93af9fb1104cdefeb06edfcfc7e25507c32f503f222dfd5f + 0.15.0: 4d3a2e9ecb9efd278313483e85e34e45605f4f8e61805480de440f69a298a649 arm64: - 0.14.0: bf00613a4d0c400e916e7ee6afdf043b9251e492527c6746ad7553cb2c646cc8 + 0.15.0: 7b79e2e8fd88b71ed4e0563c7e7dd27008b7ac7990ad2206efb012def850d150 amd64: - 0.14.0: 4d3a2e9ecb9efd278313483e85e34e45605f4f8e61805480de440f69a298a649 + 0.15.0: 1371da3f6bd461f331946654f6dd3ef2ef4b9da0dd7bc5f78ed1166f32ad5adc containerd_archive_checksums: arm: diff --git a/roles/download/tasks/download_container.yml b/roles/download/tasks/download_container.yml index 79e92632e..95267578f 100644 --- a/roles/download/tasks/download_container.yml +++ b/roles/download/tasks/download_container.yml @@ -62,6 +62,7 @@ delay: "{{ retry_stagger | random + 3 }}" retries: 4 become: "{{ user_can_become_root | default(false) or not download_localhost }}" + environment: "{{ proxy_env if container_manager == 'containerd' else omit }}" when: - pull_required or download_run_once - not image_is_cached diff --git a/roles/download/tasks/prep_download.yml b/roles/download/tasks/prep_download.yml index e84a516dc..6fc84bc08 100644 --- a/roles/download/tasks/prep_download.yml +++ b/roles/download/tasks/prep_download.yml @@ -16,7 +16,7 @@ - name: prep_download | Set image pull/info command for containerd set_fact: image_info_command: "{{ bin_dir }}/nerdctl -n k8s.io images --format '{% raw %}{{ '{{' }} .Repository {{ '}}' }}:{{ '{{' }} .Tag {{ '}}' }}{% endraw %}' 2>/dev/null | grep -v ^:$ | tr '\n' ','" - image_pull_command: "{{ bin_dir }}/nerdctl -n k8s.io pull" + image_pull_command: "{{ bin_dir }}/nerdctl -n k8s.io pull --quiet" when: container_manager == 'containerd' - name: prep_download | Set image pull/info command for crio @@ -34,7 +34,7 @@ - name: prep_download | Set image pull/info command for containerd on localhost set_fact: image_info_command_on_localhost: "{{ bin_dir }}/nerdctl -n k8s.io images --format '{% raw %}{{ '{{' }} .Repository {{ '}}' }}:{{ '{{' }} .Tag {{ '}}' }}{% endraw %}' 2>/dev/null | grep -v ^:$ | tr '\n' ','" - image_pull_command_on_localhost: "{{ bin_dir }}/nerdctl -n k8s.io pull" + image_pull_command_on_localhost: "{{ bin_dir }}/nerdctl -n k8s.io pull --quiet" when: container_manager_on_localhost == 'containerd' - name: prep_download | Set image pull/info command for crio on localhost