diff --git a/roles/container-engine/cri-o/defaults/main.yml b/roles/container-engine/cri-o/defaults/main.yml index ccc9f19be9fc33ca1340e1a690dbb5ba7096d42b..6625ca3ad3ca8f9cf6258e5928438c2738fb8cf6 100644 --- a/roles/container-engine/cri-o/defaults/main.yml +++ b/roles/container-engine/cri-o/defaults/main.yml @@ -38,11 +38,12 @@ crio_stream_port: "10010" crio_required_version: "{{ kube_version | regex_replace('^v(?P<major>\\d+).(?P<minor>\\d+).(?P<patch>\\d+)$', '\\g<major>.\\g<minor>') }}" crio_kubernetes_version_matrix: + "1.24": "1.24" "1.23": "1.23" "1.22": "1.22" "1.21": "1.21" -crio_version: "{{ crio_kubernetes_version_matrix[crio_required_version] | default('1.23') }}" +crio_version: "{{ crio_kubernetes_version_matrix[crio_required_version] | default('1.24') }}" # The crio_runtimes variable defines a list of OCI compatible runtimes. crio_runtimes: diff --git a/roles/container-engine/cri-o/molecule/default/converge.yml b/roles/container-engine/cri-o/molecule/default/converge.yml index 5235ae3309e65a53c6be460e0adfa9b5dfe1de13..376f07c4582d1e8d91228035eb28e00a47833721 100644 --- a/roles/container-engine/cri-o/molecule/default/converge.yml +++ b/roles/container-engine/cri-o/molecule/default/converge.yml @@ -2,6 +2,8 @@ - name: Converge hosts: all become: true + vars: + container_manager: crio roles: - role: kubespray-defaults - role: container-engine/cri-o diff --git a/roles/container-engine/cri-o/tasks/crio_repo.yml b/roles/container-engine/cri-o/tasks/crio_repo.yml index f2b1b71a977311cfac4b1f79322bf94b1b80ac11..dc67bf13a055db89f75a85f96231d47dbe1986e6 100644 --- a/roles/container-engine/cri-o/tasks/crio_repo.yml +++ b/roles/container-engine/cri-o/tasks/crio_repo.yml @@ -114,6 +114,29 @@ - ansible_os_family == "RedHat" - ansible_distribution not in ["Amazon", "Fedora"] +- name: Add CRI-O kubic yum repo + yum_repository: + name: devel_kubic_libcontainers_stable + description: Stable Releases of Upstream github.com/containers packages + baseurl: http://{{ crio_download_base }}/Fedora_{{ ansible_distribution_major_version }}/ + gpgcheck: yes + gpgkey: http://{{ crio_download_base }}/Fedora_{{ ansible_distribution_major_version }}/repodata/repomd.xml.key + keepcache: "0" + when: + - ansible_distribution in ["Fedora"] + - not is_ostree + +- name: Add CRI-O kubic yum repo + yum_repository: + name: "devel_kubic_libcontainers_stable_cri-o_{{ crio_version }}" + description: "CRI-O {{ crio_version }}" + baseurl: "{{ crio_download_crio }}{{ crio_version }}/Fedora_{{ ansible_distribution_major_version }}/" + gpgcheck: yes + gpgkey: "{{ crio_download_crio }}{{ crio_version }}/Fedora_{{ ansible_distribution_major_version }}/repodata/repomd.xml.key" + when: + - ansible_distribution in ["Fedora"] + - not is_ostree + - name: Add CRI-O kubic yum repo yum_repository: name: devel_kubic_libcontainers_stable @@ -154,14 +177,3 @@ when: - is_ostree - ostree_version is defined and ostree_version.stdout is version('2021.9', '>=') - -- name: Enable CRI-O module - command: "dnf -y module enable cri-o:{{ crio_version }}" - args: - warn: False - register: crio_dnf_result - changed_when: "'Enabling' in crio_dnf_result.stdout" - become: true - when: - - ansible_distribution in ["Fedora"] - - not is_ostree diff --git a/roles/container-engine/cri-o/tasks/main.yaml b/roles/container-engine/cri-o/tasks/main.yaml index 3fb6ea0f6c911857949f095bbc12d1ca5a73afc8..bdc3083502aa95c4f90d17bc1111dd88a506d0b8 100644 --- a/roles/container-engine/cri-o/tasks/main.yaml +++ b/roles/container-engine/cri-o/tasks/main.yaml @@ -39,9 +39,6 @@ import_tasks: "crio_repo.yml" when: crio_add_repos -- include_role: # noqa unnamed-task - name: container-engine/crictl - - name: Build a list of crio runtimes with Katacontainers runtimes set_fact: crio_runtimes: "{{ crio_runtimes + kata_runtimes }}" diff --git a/roles/container-engine/cri-o/templates/crictl.yaml.j2 b/roles/container-engine/cri-o/templates/crictl.yaml.j2 deleted file mode 100644 index fbf691f8a03260bd88f307ea80b4bde7f794a29d..0000000000000000000000000000000000000000 --- a/roles/container-engine/cri-o/templates/crictl.yaml.j2 +++ /dev/null @@ -1,4 +0,0 @@ -runtime-endpoint: unix://{{ cri_socket }} -image-endpoint: unix://{{ cri_socket }} -timeout: 30 -debug: false diff --git a/roles/container-engine/cri-o/templates/crio.conf.j2 b/roles/container-engine/cri-o/templates/crio.conf.j2 index 780044c71d64444b9509cbbdea3130ada51d6ddb..1a25e09291781f249e6f94344db36d2a65359801 100644 --- a/roles/container-engine/cri-o/templates/crio.conf.j2 +++ b/roles/container-engine/cri-o/templates/crio.conf.j2 @@ -17,10 +17,10 @@ # Path to the "root directory". CRI-O stores all of its data, including # containers images, in this directory. -#root = "/var/lib/containers/storage" +root = "/var/lib/containers/storage" # Path to the "run directory". CRI-O stores all of its state in this directory. -#runroot = "/var/run/containers/storage" +runroot = "/var/run/containers/storage" # Storage driver used to manage the storage of images and containers. Please # refer to containers-storage.conf(5) to see all available storage drivers. diff --git a/roles/container-engine/cri-o/vars/amazon.yml b/roles/container-engine/cri-o/vars/amazon.yml index 51cb228c99accd4525bd4c0722669154057e98dc..16bba67aed6e64ad47b8a28b80ca24ab52801540 100644 --- a/roles/container-engine/cri-o/vars/amazon.yml +++ b/roles/container-engine/cri-o/vars/amazon.yml @@ -3,6 +3,8 @@ crio_storage_driver: "overlay" crio_versioned_pkg: + "1.24": + - "cri-o-1.24.*" "1.23": - "cri-o-1.23.*" "1.22": diff --git a/roles/container-engine/cri-o/vars/centos-7.yml b/roles/container-engine/cri-o/vars/centos-7.yml index 423c3322e404040ba213b46090c95e5fbd4f86b8..5e18185821566ba6edec0cec9022fce8a69894f4 100644 --- a/roles/container-engine/cri-o/vars/centos-7.yml +++ b/roles/container-engine/cri-o/vars/centos-7.yml @@ -1,5 +1,7 @@ --- crio_versioned_pkg: + "1.24": + - "cri-o-1.24.*" "1.23": - "cri-o-1.23.*" "1.22": diff --git a/roles/container-engine/cri-o/vars/centos-8.yml b/roles/container-engine/cri-o/vars/centos-8.yml index 423c3322e404040ba213b46090c95e5fbd4f86b8..5e18185821566ba6edec0cec9022fce8a69894f4 100644 --- a/roles/container-engine/cri-o/vars/centos-8.yml +++ b/roles/container-engine/cri-o/vars/centos-8.yml @@ -1,5 +1,7 @@ --- crio_versioned_pkg: + "1.24": + - "cri-o-1.24.*" "1.23": - "cri-o-1.23.*" "1.22": diff --git a/roles/container-engine/cri-o/vars/debian.yml b/roles/container-engine/cri-o/vars/debian.yml index d91ebe1c5843c11e1eec65c6ee89eed851c5d22a..39296f52ad06656279a15466c5e3aa133de36686 100644 --- a/roles/container-engine/cri-o/vars/debian.yml +++ b/roles/container-engine/cri-o/vars/debian.yml @@ -1,5 +1,8 @@ --- crio_versioned_pkg: + "1.24": + - "cri-o=1.24*" + - cri-o-runc "1.23": - "cri-o=1.23*" - cri-o-runc diff --git a/roles/container-engine/cri-o/vars/fedora-36.yml b/roles/container-engine/cri-o/vars/fedora-36.yml new file mode 100644 index 0000000000000000000000000000000000000000..53d6692564ad1baceb3b8679900aa9008483f28e --- /dev/null +++ b/roles/container-engine/cri-o/vars/fedora-36.yml @@ -0,0 +1,5 @@ +--- +crio_packages: + - cri-o + +crio_version: 1.24 diff --git a/roles/container-engine/cri-o/vars/fedora.yml b/roles/container-engine/cri-o/vars/fedora.yml index 5693aea805ad1d682c4cb65c6e66716e273a09e0..84f82b0b446f2d30bb9e6bfd88c903e9f06aa6ea 100644 --- a/roles/container-engine/cri-o/vars/fedora.yml +++ b/roles/container-engine/cri-o/vars/fedora.yml @@ -1,10 +1,10 @@ --- crio_packages: - cri-o - - cri-tools crio_kubernetes_version_matrix: - "1.23": "1.22" + "1.24": "1.23" + "1.23": "1.23" "1.22": "1.22" "1.21": "1.21" -crio_version: "{{ crio_kubernetes_version_matrix[crio_required_version] | default('1.22') }}" +crio_version: "{{ crio_kubernetes_version_matrix[crio_required_version] | default('1.23') }}" diff --git a/roles/container-engine/cri-o/vars/ubuntu.yml b/roles/container-engine/cri-o/vars/ubuntu.yml index b97e0599f6dad47aa621f576841683e4e4e2b426..6ab1b0abd6f16a9804629e5a1e262e1327b44ee6 100644 --- a/roles/container-engine/cri-o/vars/ubuntu.yml +++ b/roles/container-engine/cri-o/vars/ubuntu.yml @@ -1,5 +1,8 @@ --- crio_versioned_pkg: + "1.24": + - "cri-o=1.24*" + - cri-o-runc "1.23": - "cri-o=1.23*" - cri-o-runc