Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add containerd on Flatcar Container Linux #7681

Merged
merged 1 commit into from
Jul 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions roles/container-engine/containerd/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand Down Expand Up @@ -52,7 +51,7 @@
- ansible_proc_cmdline['systemd.unified_cgroup_hierarchy'] is not defined or ansible_proc_cmdline['systemd.unified_cgroup_hierarchy'] != '0'

- include_tasks: containerd_repo.yml
when: not is_ostree
when: not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk"))
cola-zero marked this conversation as resolved.
Show resolved Hide resolved

- name: Create containerd service systemd directory if it doesn't exist
file:
Expand Down Expand Up @@ -113,7 +112,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:
Expand Down
2 changes: 1 addition & 1 deletion roles/kubernetes/node/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
cola-zero marked this conversation as resolved.
Show resolved Hide resolved
args:
creates: "{{ bin_dir }}/socat"
when:
Expand Down