From 4781df587c778cc868ac183256a5f64d9a1c619d Mon Sep 17 00:00:00 2001 From: Hans Feldt <2808287+hafe@users.noreply.github.com> Date: Tue, 13 Oct 2020 11:08:26 +0200 Subject: [PATCH] bump crio version to 1.19 (#6758) * 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 --- README.md | 2 +- docs/cri-o.md | 3 +-- roles/container-engine/cri-o/defaults/main.yml | 4 ++-- .../container-engine/cri-o/tasks/crio_repo.yml | 17 ++++++++++++----- roles/container-engine/cri-o/vars/debian.yml | 4 ++-- roles/container-engine/cri-o/vars/fedora.yml | 7 +++++++ roles/container-engine/cri-o/vars/ubuntu.yml | 8 ++------ 7 files changed, 27 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index eae399a01..25439957c 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ Note: Upstart/SysV init based OS types are not supported. - [etcd](https://github.com/coreos/etcd) v3.4.3 - [docker](https://www.docker.com/) v19.03 (see note) - [containerd](https://containerd.io/) v1.3.7 - - [cri-o](http://cri-o.io/) v1.17 (experimental: see [CRI-O Note](docs/cri-o.md). Only on fedora, ubuntu and centos based OS) + - [cri-o](http://cri-o.io/) v1.19 (experimental: see [CRI-O Note](docs/cri-o.md). Only on fedora, ubuntu and centos based OS) - Network Plugin - [cni-plugins](https://github.com/containernetworking/plugins) v0.8.7 - [calico](https://github.com/projectcalico/calico) v3.16.2 diff --git a/docs/cri-o.md b/docs/cri-o.md index 4ee245010..a5e450488 100644 --- a/docs/cri-o.md +++ b/docs/cri-o.md @@ -4,10 +4,9 @@ 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. -* 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. -_To use CRI-O instead of Docker, set the following variables:_ +_To use the CRI-O container runtime set the following variables:_ ## all.yml diff --git a/roles/container-engine/cri-o/defaults/main.yml b/roles/container-engine/cri-o/defaults/main.yml index ce1bdd29b..b76bf27ea 100644 --- a/roles/container-engine/cri-o/defaults/main.yml +++ b/roles/container-engine/cri-o/defaults/main.yml @@ -24,8 +24,8 @@ crio_stream_port: "10010" crio_required_version: "{{ kube_version | regex_replace('^v(?P\\d+).(?P\\d+).(?P\\d+)$', '\\g.\\g') }}" crio_kubernetes_version_matrix: + "1.19": "1.19" "1.18": "1.18" "1.17": "1.17" - "1.16": "1.16" -crio_version: "{{ crio_kubernetes_version_matrix[crio_required_version] | default('1.17') }}" +crio_version: "{{ crio_kubernetes_version_matrix[crio_required_version] | default('1.19') }}" diff --git a/roles/container-engine/cri-o/tasks/crio_repo.yml b/roles/container-engine/cri-o/tasks/crio_repo.yml index b5cbd5b88..76d60f3d0 100644 --- a/roles/container-engine/cri-o/tasks/crio_repo.yml +++ b/roles/container-engine/cri-o/tasks/crio_repo.yml @@ -5,7 +5,7 @@ crio_kubic_debian_repo_name: "{{ ((ansible_distribution == 'Ubuntu') | ternary('x','')) ~ ansible_distribution ~ '_' ~ ansible_distribution_version }}" when: ansible_os_family == "Debian" -- name: Add CRI-O kubic repo key +- name: Add CRI-O kubic apt repo key apt_key: url: "https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/{{ crio_kubic_debian_repo_name }}/Release.key" state: present @@ -15,14 +15,21 @@ retries: 4 delay: "{{ retry_stagger | d(3) }}" -- name: Add CRI-O kubic repo +- name: Add CRI-O kubic apt repo apt_repository: repo: "deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/{{ crio_kubic_debian_repo_name }}/ /" state: present - filename: devel:kubic:libcontainers:stable + filename: devel-kubic-libcontainers-stable 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: name: devel_kubic_libcontainers_stable description: Stable Releases of Upstream github.com/containers packages (CentOS_$releasever) @@ -31,7 +38,7 @@ gpgkey: http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_$releasever/repodata/repomd.xml.key when: ansible_distribution in ["CentOS"] -- name: Add CRI-O kubic repo +- name: Add CRI-O kubic yum repo yum_repository: name: "devel_kubic_libcontainers_stable_cri-o_{{ crio_version }}" description: "CRI-O {{ crio_version }} (CentOS_$releasever)" diff --git a/roles/container-engine/cri-o/vars/debian.yml b/roles/container-engine/cri-o/vars/debian.yml index 62c966a11..0ba558e02 100644 --- a/roles/container-engine/cri-o/vars/debian.yml +++ b/roles/container-engine/cri-o/vars/debian.yml @@ -1,7 +1,7 @@ --- crio_packages: - - "cri-o-{{ crio_version }}" - - runc + - "cri-o" + - "cri-o-runc" crio_runc_path: /usr/sbin/runc diff --git a/roles/container-engine/cri-o/vars/fedora.yml b/roles/container-engine/cri-o/vars/fedora.yml index e8efe8ac8..fab1a5e9c 100644 --- a/roles/container-engine/cri-o/vars/fedora.yml +++ b/roles/container-engine/cri-o/vars/fedora.yml @@ -4,3 +4,10 @@ crio_packages: - cri-tools 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') }}" diff --git a/roles/container-engine/cri-o/vars/ubuntu.yml b/roles/container-engine/cri-o/vars/ubuntu.yml index 5495f193a..0ba558e02 100644 --- a/roles/container-engine/cri-o/vars/ubuntu.yml +++ b/roles/container-engine/cri-o/vars/ubuntu.yml @@ -1,11 +1,7 @@ --- crio_packages: - - "cri-o-{{ crio_version }}" + - "cri-o" + - "cri-o-runc" crio_runc_path: /usr/sbin/runc - -crio_kubernetes_version_matrix: - "1.18": "1.17" - "1.17": "1.17" - "1.16": "1.16"