You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I run kubespray to be used as an offline deployment of clusters.
I noticed an issue that kubeadm images were not being downloaded as part of the cache.
closer inspection I noticed that the mapping of the images, created in 'roles/download/tasks/prep_kubeadm_images.yml', differ from the mapping under 'roles/kubespray-defaults/defaults/main/download.yml', specifically the 'groups' value is a type 'list' in the 'defaults' but 'string' in the 'prep_kubeadm'.
this causes the images of kubeadm to be skipped as part of the download to cache, branching with the fix below, fixes the issue
What happened?
I run kubespray to be used as an offline deployment of clusters.
I noticed an issue that kubeadm images were not being downloaded as part of the cache.
closer inspection I noticed that the mapping of the images, created in 'roles/download/tasks/prep_kubeadm_images.yml', differ from the mapping under 'roles/kubespray-defaults/defaults/main/download.yml', specifically the 'groups' value is a type 'list' in the 'defaults' but 'string' in the 'prep_kubeadm'.
this causes the images of kubeadm to be skipped as part of the download to cache, branching with the fix below, fixes the issue
example from kube-spray-defaults:
netcheck_agent:
enabled: "{{ deploy_netchecker }}"
container: true
repo: "{{ netcheck_agent_image_repo }}"
tag: "{{ netcheck_agent_image_tag }}"
sha256: "{{ netcheck_agent_digest_checksum | default(None) }}"
groups:
- k8s_cluster
mapping in prep_kubeadm_images.yml:
kubeadm_image:
key: "kubeadm_{{ (item | regex_replace('^(?:.\/)', '')).split(':')[0] }}"
value:
enabled: true
container: true
repo: "{{ item | regex_replace('^(.):.$', '\1') }}"
tag: "{{ item | regex_replace('^.:(.)$', '\1') }}"
groups: k8s_cluster
What did you expect to happen?
all images including kubeadm images, which are generated separately to be downloaded
How can we reproduce it (as minimally and precisely as possible)?
Running with these parameters in verbose mode, will show the images are being listed but not downloaded:
OS
ubuntu 20
Version of Ansible
9.8.0
Version of Python
python3
Version of Kubespray (commit)
0b9872c
Network plugin used
calico
Full inventory with variables
image_command_tool_on_localhost: "docker"
container_manager_on_localhost: "docker"
helm_enabled: True
metrics_server_enabled: True
ingress_nginx_enabled: True
dashboard_enabled: True
kubeconfig_localhost: True
kubectl_localhost: True
download_force_cache: True
download_run_once: True
download_localhost: True
Command used to invoke ansible
python3 /usr/local/bin/ansible-playbook cluster.yml --inventory /kubespray/inventory/hosts.ini --become --become-user root --extra-vars 'download_cache_dir=/tmp/kubespray_cache' --extra-vars '@offline_install_vars.yml' -vvv
Output of ansible run
Anything else we need to know
No response
The text was updated successfully, but these errors were encountered: