Browse Source

[cri-o] support cri-o 1.24 with kube 1.24

pull/8978/head
Calin Cristian Andrei 2 years ago
committed by Kubernetes Prow Robot
parent
commit
51bc64fb35
13 changed files with 49 additions and 24 deletions
  1. 3
      roles/container-engine/cri-o/defaults/main.yml
  2. 2
      roles/container-engine/cri-o/molecule/default/converge.yml
  3. 34
      roles/container-engine/cri-o/tasks/crio_repo.yml
  4. 3
      roles/container-engine/cri-o/tasks/main.yaml
  5. 4
      roles/container-engine/cri-o/templates/crictl.yaml.j2
  6. 4
      roles/container-engine/cri-o/templates/crio.conf.j2
  7. 2
      roles/container-engine/cri-o/vars/amazon.yml
  8. 2
      roles/container-engine/cri-o/vars/centos-7.yml
  9. 2
      roles/container-engine/cri-o/vars/centos-8.yml
  10. 3
      roles/container-engine/cri-o/vars/debian.yml
  11. 5
      roles/container-engine/cri-o/vars/fedora-36.yml
  12. 6
      roles/container-engine/cri-o/vars/fedora.yml
  13. 3
      roles/container-engine/cri-o/vars/ubuntu.yml

3
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:

2
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

34
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

3
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 }}"

4
roles/container-engine/cri-o/templates/crictl.yaml.j2

@ -1,4 +0,0 @@
runtime-endpoint: unix://{{ cri_socket }}
image-endpoint: unix://{{ cri_socket }}
timeout: 30
debug: false

4
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.

2
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":

2
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":

2
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":

3
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

5
roles/container-engine/cri-o/vars/fedora-36.yml

@ -0,0 +1,5 @@
---
crio_packages:
- cri-o
crio_version: 1.24

6
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') }}"

3
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

Loading…
Cancel
Save