[2.14] Backport: 6758, 6853 and 7003 to fix CRI-O pkg (#7209)
* cherry-pick bump crio version to 1.19 (#6758) cherry-pick modifications: * keep default to 1.17 as release 2.14 came with * don't change readme with newer versions * bump crio version to 1.19 * crio package name has changed for debian/ubuntu * crio upgrade does not work, see #6757 * update crio info in docs * Install cri-o with package version (#6853) and thereby support upgrade from e.g. 1.18.x to 1.19.y Included OSes: - Centos7/8 - Ubuntu18/20 New variables for overriding by default installed packages: - centos_crio_packages - ubuntu_crio_packages * add support crio version for varios k8s vers (#7003) * add support crio version for various k8s vers * regexp in pkg versions Co-authored-by: Hans Feldt <2808287+hafe@users.noreply.github.com> Co-authored-by: Sergey <s.bondarev@southbridge.ru>
This commit is contained in:
parent
c267d427ce
commit
11b72e2408
8 changed files with 67 additions and 17 deletions
|
@ -4,10 +4,9 @@
|
||||||
Kubespray supports basic functionality for using CRI-O as the default container runtime in a cluster.
|
Kubespray supports basic functionality for using CRI-O as the default container runtime in a cluster.
|
||||||
|
|
||||||
* Kubernetes supports CRI-O on v1.11.1 or later.
|
* Kubernetes supports CRI-O on v1.11.1 or later.
|
||||||
* Helm and other tools may not function as normal due to dependency on Docker.
|
|
||||||
* `scale.yml` and `upgrade-cluster.yml` are not supported on clusters using CRI-O.
|
* `scale.yml` and `upgrade-cluster.yml` are not supported on clusters using CRI-O.
|
||||||
|
|
||||||
_To use CRI-O instead of Docker, set the following variables:_
|
_To use the CRI-O container runtime set the following variables:_
|
||||||
|
|
||||||
## all.yml
|
## all.yml
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ 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.19": "1.19"
|
||||||
"1.18": "1.18"
|
"1.18": "1.18"
|
||||||
"1.17": "1.17"
|
"1.17": "1.17"
|
||||||
"1.16": "1.16"
|
"1.16": "1.16"
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
crio_kubic_debian_repo_name: "{{ ((ansible_distribution == 'Ubuntu') | ternary('x','')) ~ ansible_distribution ~ '_' ~ ansible_distribution_version }}"
|
crio_kubic_debian_repo_name: "{{ ((ansible_distribution == 'Ubuntu') | ternary('x','')) ~ ansible_distribution ~ '_' ~ ansible_distribution_version }}"
|
||||||
when: ansible_os_family == "Debian"
|
when: ansible_os_family == "Debian"
|
||||||
|
|
||||||
- name: Add CRI-O kubic repo key
|
- name: Add CRI-O kubic apt repo key
|
||||||
apt_key:
|
apt_key:
|
||||||
url: "https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/{{ crio_kubic_debian_repo_name }}/Release.key"
|
url: "https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/{{ crio_kubic_debian_repo_name }}/Release.key"
|
||||||
state: present
|
state: present
|
||||||
|
@ -15,14 +15,21 @@
|
||||||
retries: 4
|
retries: 4
|
||||||
delay: "{{ retry_stagger | d(3) }}"
|
delay: "{{ retry_stagger | d(3) }}"
|
||||||
|
|
||||||
- name: Add CRI-O kubic repo
|
- name: Add CRI-O kubic apt repo
|
||||||
apt_repository:
|
apt_repository:
|
||||||
repo: "deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/{{ crio_kubic_debian_repo_name }}/ /"
|
repo: "deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/{{ crio_kubic_debian_repo_name }}/ /"
|
||||||
state: present
|
state: present
|
||||||
filename: devel:kubic:libcontainers:stable
|
filename: devel-kubic-libcontainers-stable
|
||||||
when: crio_kubic_debian_repo_name is defined
|
when: crio_kubic_debian_repo_name is defined
|
||||||
|
|
||||||
- name: Add CRI-O kubic repo
|
- name: Add CRI-O kubic cri-o apt repo
|
||||||
|
apt_repository:
|
||||||
|
repo: "deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/{{ crio_version }}/{{ crio_kubic_debian_repo_name }}/ /"
|
||||||
|
state: present
|
||||||
|
filename: devel-kubic-libcontainers-stable-cri-o
|
||||||
|
when: crio_kubic_debian_repo_name is defined
|
||||||
|
|
||||||
|
- name: Add CRI-O kubic yum repo
|
||||||
yum_repository:
|
yum_repository:
|
||||||
name: devel_kubic_libcontainers_stable
|
name: devel_kubic_libcontainers_stable
|
||||||
description: Stable Releases of Upstream github.com/containers packages (CentOS_$releasever)
|
description: Stable Releases of Upstream github.com/containers packages (CentOS_$releasever)
|
||||||
|
@ -32,7 +39,7 @@
|
||||||
keepcache: false
|
keepcache: false
|
||||||
when: ansible_distribution in ["CentOS"]
|
when: ansible_distribution in ["CentOS"]
|
||||||
|
|
||||||
- name: Add CRI-O kubic repo
|
- name: Add CRI-O kubic yum repo
|
||||||
yum_repository:
|
yum_repository:
|
||||||
name: "devel_kubic_libcontainers_stable_cri-o_{{ crio_version }}"
|
name: "devel_kubic_libcontainers_stable_cri-o_{{ crio_version }}"
|
||||||
description: "CRI-O {{ crio_version }} (CentOS_$releasever)"
|
description: "CRI-O {{ crio_version }} (CentOS_$releasever)"
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
---
|
---
|
||||||
|
crio_versioned_pkg:
|
||||||
|
"1.19":
|
||||||
|
- "cri-o-1.19.*"
|
||||||
|
"1.18":
|
||||||
|
- "cri-o-1.18.*"
|
||||||
|
"1.17":
|
||||||
|
- "cri-o-1.17.*"
|
||||||
|
|
||||||
crio_packages:
|
default_crio_packages: "{{ crio_versioned_pkg[crio_version] }}"
|
||||||
- cri-o
|
|
||||||
- oci-systemd-hook
|
crio_packages: "{{ centos_crio_packages | default(default_crio_packages) }}"
|
||||||
|
|
|
@ -1,4 +1,12 @@
|
||||||
---
|
---
|
||||||
|
crio_versioned_pkg:
|
||||||
|
"1.19":
|
||||||
|
- "cri-o-1.19.*"
|
||||||
|
"1.18":
|
||||||
|
- "cri-o-1.18.*"
|
||||||
|
"1.17":
|
||||||
|
- "cri-o-1.17.*"
|
||||||
|
|
||||||
crio_packages:
|
default_crio_packages: "{{ crio_versioned_pkg[crio_version] }}"
|
||||||
- cri-o
|
|
||||||
|
crio_packages: "{{ centos_crio_packages | default(default_crio_packages) }}"
|
||||||
|
|
|
@ -1,7 +1,17 @@
|
||||||
---
|
---
|
||||||
|
# Debian-10 has pkg only for cri-o 1.19
|
||||||
|
crio_kubernetes_version_matrix:
|
||||||
|
"1.19": "1.19"
|
||||||
|
"1.18": "1.19"
|
||||||
|
"1.17": "1.19"
|
||||||
|
|
||||||
crio_packages:
|
crio_versioned_pkg:
|
||||||
- "cri-o-{{ crio_version }}"
|
"1.19":
|
||||||
- runc
|
- "cri-o=1.19*"
|
||||||
|
- cri-o-runc
|
||||||
|
|
||||||
|
default_crio_packages: "{{ crio_versioned_pkg[crio_version] }}"
|
||||||
|
|
||||||
|
crio_packages: "{{ debian_crio_packages | default(default_crio_packages) }}"
|
||||||
|
|
||||||
crio_runc_path: /usr/sbin/runc
|
crio_runc_path: /usr/sbin/runc
|
||||||
|
|
|
@ -4,3 +4,10 @@ crio_packages:
|
||||||
- cri-tools
|
- cri-tools
|
||||||
|
|
||||||
crio_conmon: /usr/libexec/crio/conmon
|
crio_conmon: /usr/libexec/crio/conmon
|
||||||
|
|
||||||
|
# TODO: remove crio_kubernetes_version_matrix and crio_version once Fedora supports 1.19
|
||||||
|
crio_kubernetes_version_matrix:
|
||||||
|
"1.18": "1.18"
|
||||||
|
"1.17": "1.17"
|
||||||
|
|
||||||
|
crio_version: "{{ crio_kubernetes_version_matrix[crio_required_version] | default('1.17') }}"
|
||||||
|
|
|
@ -1,7 +1,18 @@
|
||||||
---
|
---
|
||||||
|
crio_versioned_pkg:
|
||||||
|
"1.19":
|
||||||
|
- "cri-o=1.19*"
|
||||||
|
- cri-o-runc
|
||||||
|
"1.18":
|
||||||
|
- "cri-o=1.18*"
|
||||||
|
- cri-o-runc
|
||||||
|
"1.17":
|
||||||
|
- "cri-o=1.17*"
|
||||||
|
- cri-o-runc
|
||||||
|
|
||||||
crio_packages:
|
default_crio_packages: "{{ crio_versioned_pkg[crio_version] }}"
|
||||||
- "cri-o-{{ crio_version }}"
|
|
||||||
|
crio_packages: "{{ ubuntu_crio_packages | default(default_crio_packages) }}"
|
||||||
|
|
||||||
crio_runc_path: /usr/sbin/runc
|
crio_runc_path: /usr/sbin/runc
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue