Browse Source

Add containerd on Flatcar Container Linux (#7681)

pull/7815/head
cola-zero 3 years ago
committed by GitHub
parent
commit
f21a707e99
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions
  1. 7
      roles/container-engine/containerd/tasks/main.yml
  2. 2
      roles/kubernetes/node/tasks/install.yml

7
roles/container-engine/containerd/tasks/main.yml

@ -11,12 +11,11 @@
set_fact:
is_ostree: "{{ ostree.stat.exists }}"
- name: Fail containerd setup if distribution is not supported
fail:
msg: "{{ ansible_distribution }} is not supported by containerd."
when:
- not ansible_distribution in ["CentOS", "OracleLinux", "RedHat", "Ubuntu", "Debian", "Fedora", "AlmaLinux", "Amazon"]
- not ansible_distribution in ["CentOS", "OracleLinux", "RedHat", "Ubuntu", "Debian", "Fedora", "AlmaLinux", "Amazon", "Flatcar Container Linux by Kinvolk"]
- name: gather os specific variables
include_vars: "{{ item }}"
@ -54,7 +53,7 @@
- not is_ostree
- include_tasks: containerd_repo.yml
when: not is_ostree
when: not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk"))
- name: Create containerd service systemd directory if it doesn't exist
file:
@ -117,7 +116,7 @@
delay: "{{ retry_stagger | d(3) }}"
notify: restart containerd
when:
- not is_ostree
- not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk"))
- containerd_package_info.pkgs|length > 0
- include_role: # noqa unnamed-task

2
roles/kubernetes/node/tasks/install.yml

@ -30,7 +30,7 @@
- container_manager == "docker"
- name: install | Copy socat wrapper for Container Linux with Containerd
command: "{{ containerd_bin_dir }}/ctr run --rm --mount type=bind,src={{ bin_dir }},dst=/opt/bin,options=rbind:rw {{ install_socat_image_repo }}:{{ install_socat_image_tag }}"
command: "{{ containerd_bin_dir }}/ctr --namespace k8s.io run --rm --mount type=bind,src={{ bin_dir }},dst=/opt/bin,options=rbind:rw {{ install_socat_image_repo }}:{{ install_socat_image_tag }} copysocat"
args:
creates: "{{ bin_dir }}/socat"
when:

Loading…
Cancel
Save