29307740dd
* Enable containerd to deploy vanilla containerd package Fixes kubeadm references to CRI socket for containerd Fixes download role cache feature to work with containerd Change-Id: I2ab8f0031107e2f0d1a85c39b4beb66f08509a01 * use containerd for flannel-addons job Change-Id: Ied375c7d65e64a625ffbd995ff16f2374067dee6 * add containerd vars Change-Id: Ib9a8a04e501c481a86235413cbec63f3672baf91 * fixup vars Change-Id: Ibea64e4b18405a578b52a13da100384582aa24c2 * more fixes * fix rh repo Change-Id: I00575a77cfb7b81d6095db5d918a52023c8f13ba * Adjust helm host install for containerd
42 lines
2.1 KiB
YAML
42 lines
2.1 KiB
YAML
---
|
|
- name: Helm | Set commands for helm host tasks
|
|
set_fact:
|
|
helm_compare_command: >-
|
|
{%- if container_manager in ['docker', 'crio'] %}
|
|
{{ docker_bin_dir }}/docker run --rm -v {{ bin_dir }}:/systembindir --entrypoint /usr/bin/cmp {{ helm_image_repo }}:{{ helm_image_tag }} /usr/local/bin/helm /systembindir/helm
|
|
{%- elif container_manager == "containerd" %}
|
|
ctr run --rm --mount type=bind,src={{ bin_dir }},dst=/systembindir,options=rbind:rw {{ helm_image_repo }}:{{ helm_image_tag }} helm-compare sh -c 'cmp /usr/local/bin/helm /systembindir/helm'
|
|
{%- endif %}
|
|
helm_copy_command: >-
|
|
{%- if container_manager in ['docker', 'crio'] %}
|
|
{{ docker_bin_dir }}/docker run --rm -v {{ bin_dir }}:/systembindir --entrypoint /bin/cp {{ helm_image_repo }}:{{ helm_image_tag }} -f /usr/local/bin/helm /systembindir/helm
|
|
{%- elif container_manager == "containerd" %}
|
|
ctr run --rm --mount type=bind,src={{ bin_dir }},dst=/systembindir,options=rbind:rw {{ helm_image_repo }}:{{ helm_image_tag }} helm-copy sh -c '/bin/cp -f /usr/local/bin/helm /systembindir/helm'
|
|
{%- endif %}
|
|
|
|
- name: Helm | ensure helm container is pulled for containerd
|
|
command: "ctr i pull {{ helm_image_repo }}:{{ helm_image_tag }}"
|
|
when: container_manager == "containerd"
|
|
|
|
- name: Helm | Compare host helm with hyperkube container
|
|
command: "{{ helm_compare_command }}"
|
|
register: helm_task_compare_result
|
|
until: helm_task_compare_result.rc in [0,1,2]
|
|
retries: 4
|
|
delay: "{{ retry_stagger | random + 3 }}"
|
|
changed_when: false
|
|
failed_when: "helm_task_compare_result.rc not in [0,1,2]"
|
|
|
|
- name: Helm | Copy helm from helm container
|
|
command: "{{ helm_copy_command }}"
|
|
when: helm_task_compare_result.rc != 0
|
|
register: helm_task_result
|
|
until: helm_task_result.rc == 0
|
|
retries: 4
|
|
delay: "{{ retry_stagger | random + 3 }}"
|
|
|
|
- name: Helm | Copy socat wrapper for Container Linux
|
|
command: "{{ docker_bin_dir }}/docker run --rm -v {{ bin_dir }}:/opt/bin {{ install_socat_image_repo }}:{{ install_socat_image_tag }}"
|
|
args:
|
|
creates: "{{ bin_dir }}/socat"
|
|
when: ansible_os_family in ['CoreOS', 'Container Linux by CoreOS']
|