Skip to content

Commit

Permalink
nerdctl insecure registry config (kubernetes-sigs#8339)
Browse files Browse the repository at this point in the history
* Update prep_download.yml

nerdctl insecure registry config

* Update prep_download.yml

* Update prep_download.yml

apply conversations advice

* Update prep_download.yml

* Update prep_download.yml

* Update prep_download.yml

* Update prep_download.yml

* Update prep_download.yml

* Update prep_download.yml

* Update main.yml

* Update main.yml

* Update prep_download.yml

* Update prep_download.yml
  • Loading branch information
mircyb authored and LuckySB committed Jun 29, 2023
1 parent 181d7f6 commit 8b0b189
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions roles/download/defaults/main.yml
Expand Up @@ -48,6 +48,9 @@ download_delegate: "{% if download_localhost %}localhost{% else %}{{ groups['kub
# Arch of Docker images and needed packages
image_arch: "{{host_architecture | default('amd64')}}"

# Nerdctl insecure flag set
nerdctl_extra_flags: '{%- if containerd_insecure_registries is defined and containerd_insecure_registries|length>0 -%}\" --insecure-registry"{%- else -%}{%- endif -%}'

# Versions
kubeadm_version: "{{ kube_version }}"
etcd_version: v3.5.0
Expand Down
4 changes: 2 additions & 2 deletions roles/download/tasks/prep_download.yml
Expand Up @@ -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 --quiet"
image_pull_command: "{{ bin_dir }}/nerdctl -n k8s.io pull --quiet{{ nerdctl_extra_flags }}"
when: container_manager == 'containerd'

- name: prep_download | Set image pull/info command for crio
Expand All @@ -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 --quiet"
image_pull_command_on_localhost: "{{ bin_dir }}/nerdctl -n k8s.io pull --quiet{{ nerdctl_extra_flags }}"
when: container_manager_on_localhost == 'containerd'

- name: prep_download | Set image pull/info command for crio on localhost
Expand Down

0 comments on commit 8b0b189

Please sign in to comment.