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

This commit is contained in:
Calin Cristian Andrei 2022-06-12 10:59:10 +03:00 committed by Kubernetes Prow Robot
parent 6380483e8b
commit 51bc64fb35
13 changed files with 49 additions and 24 deletions

View file

@ -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_required_version: "{{ kube_version | regex_replace('^v(?P<major>\\d+).(?P<minor>\\d+).(?P<patch>\\d+)$', '\\g<major>.\\g<minor>') }}"
crio_kubernetes_version_matrix: crio_kubernetes_version_matrix:
"1.24": "1.24"
"1.23": "1.23" "1.23": "1.23"
"1.22": "1.22" "1.22": "1.22"
"1.21": "1.21" "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. # The crio_runtimes variable defines a list of OCI compatible runtimes.
crio_runtimes: crio_runtimes:

View file

@ -2,6 +2,8 @@
- name: Converge - name: Converge
hosts: all hosts: all
become: true become: true
vars:
container_manager: crio
roles: roles:
- role: kubespray-defaults - role: kubespray-defaults
- role: container-engine/cri-o - role: container-engine/cri-o

View file

@ -114,6 +114,29 @@
- ansible_os_family == "RedHat" - ansible_os_family == "RedHat"
- ansible_distribution not in ["Amazon", "Fedora"] - 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 - name: Add CRI-O kubic yum repo
yum_repository: yum_repository:
name: devel_kubic_libcontainers_stable name: devel_kubic_libcontainers_stable
@ -154,14 +177,3 @@
when: when:
- is_ostree - is_ostree
- ostree_version is defined and ostree_version.stdout is version('2021.9', '>=') - 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

View file

@ -39,9 +39,6 @@
import_tasks: "crio_repo.yml" import_tasks: "crio_repo.yml"
when: crio_add_repos when: crio_add_repos
- include_role: # noqa unnamed-task
name: container-engine/crictl
- name: Build a list of crio runtimes with Katacontainers runtimes - name: Build a list of crio runtimes with Katacontainers runtimes
set_fact: set_fact:
crio_runtimes: "{{ crio_runtimes + kata_runtimes }}" crio_runtimes: "{{ crio_runtimes + kata_runtimes }}"

View file

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

View file

@ -17,10 +17,10 @@
# Path to the "root directory". CRI-O stores all of its data, including # Path to the "root directory". CRI-O stores all of its data, including
# containers images, in this directory. # 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. # 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 # Storage driver used to manage the storage of images and containers. Please
# refer to containers-storage.conf(5) to see all available storage drivers. # refer to containers-storage.conf(5) to see all available storage drivers.

View file

@ -3,6 +3,8 @@
crio_storage_driver: "overlay" crio_storage_driver: "overlay"
crio_versioned_pkg: crio_versioned_pkg:
"1.24":
- "cri-o-1.24.*"
"1.23": "1.23":
- "cri-o-1.23.*" - "cri-o-1.23.*"
"1.22": "1.22":

View file

@ -1,5 +1,7 @@
--- ---
crio_versioned_pkg: crio_versioned_pkg:
"1.24":
- "cri-o-1.24.*"
"1.23": "1.23":
- "cri-o-1.23.*" - "cri-o-1.23.*"
"1.22": "1.22":

View file

@ -1,5 +1,7 @@
--- ---
crio_versioned_pkg: crio_versioned_pkg:
"1.24":
- "cri-o-1.24.*"
"1.23": "1.23":
- "cri-o-1.23.*" - "cri-o-1.23.*"
"1.22": "1.22":

View file

@ -1,5 +1,8 @@
--- ---
crio_versioned_pkg: crio_versioned_pkg:
"1.24":
- "cri-o=1.24*"
- cri-o-runc
"1.23": "1.23":
- "cri-o=1.23*" - "cri-o=1.23*"
- cri-o-runc - cri-o-runc

View file

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

View file

@ -1,10 +1,10 @@
--- ---
crio_packages: crio_packages:
- cri-o - cri-o
- cri-tools
crio_kubernetes_version_matrix: crio_kubernetes_version_matrix:
"1.23": "1.22" "1.24": "1.23"
"1.23": "1.23"
"1.22": "1.22" "1.22": "1.22"
"1.21": "1.21" "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') }}"

View file

@ -1,5 +1,8 @@
--- ---
crio_versioned_pkg: crio_versioned_pkg:
"1.24":
- "cri-o=1.24*"
- cri-o-runc
"1.23": "1.23":
- "cri-o=1.23*" - "cri-o=1.23*"
- cri-o-runc - cri-o-runc