Skip to content
Snippets Groups Projects
Commit 63622118 authored by Rong Zhang's avatar Rong Zhang Committed by Kubernetes Prow Robot
Browse files

Add images downloader to download roles (#3914)

* Add images downloader to download roles

* Use single jinja2 templates

* add kube_version to templates
parent 925a820b
No related branches found
No related tags found
No related merge requests found
- name: kubeadm | Create kubeadm config
template:
src: "kubeadm-images.yaml.j2"
dest: "{{ kube_config_dir }}/kubeadm-images.yaml"
- name: container_download | download images for kubeadm config images
command: "{{ local_release_dir }}/kubeadm config images pull --config={{ kube_config_dir }}/kubeadm-images.yaml"
......@@ -24,3 +24,8 @@
- item.value.container | default(false)
- download_run_once
- group_names | intersect(download.groups) | length
- include_tasks: kubeadm_images.yml
when:
- not skip_downloads|default(false)
- inventory_hostname in groups['kube-master']
{% if kube_version is version('v1.11.0', '<') %}
apiVersion: kubeadm.k8s.io/v1alpha1
{% elif kube_version is version('v1.11.0', '>=') and kube_version is version('v1.12.0', '<') %}
apiVersion: kubeadm.k8s.io/v1alpha2
{% elif kube_version is version('v1.12.0', '>=') and kube_version is version('v1.13.0', '<') %}
apiVersion: kubeadm.k8s.io/v1alpha3
{% else %}
apiVersion: kubeadm.k8s.io/v1beta1
{% endif %}
{% if kube_version is version('v1.12.0', '<') %}
kind: MasterConfiguration
{% else %}
kind: ClusterConfiguration
{% endif %}
imageRepository: {{ kube_image_repo }}
kubernetesVersion: {{ kube_version }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment