From 4f5dbc79936621ac63b9d1ffd36d1512999f5835 Mon Sep 17 00:00:00 2001 From: rafzei Date: Thu, 10 Feb 2022 13:45:24 +0100 Subject: [PATCH] Add crictl config file, add containerd version in docker role --- ansible/playbooks/roles/containerd/files/crictl.yaml | 1 + ansible/playbooks/roles/containerd/tasks/main.yml | 8 ++++++++ ansible/playbooks/roles/docker/tasks/main.yml | 10 +++++++--- docs/changelogs/CHANGELOG-2.0.md | 2 +- .../spec/kubernetes_master/kubernetes_master_spec.rb | 4 ++-- .../spec/spec/kubernetes_node/kubernetes_node_spec.rb | 2 +- 6 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 ansible/playbooks/roles/containerd/files/crictl.yaml diff --git a/ansible/playbooks/roles/containerd/files/crictl.yaml b/ansible/playbooks/roles/containerd/files/crictl.yaml new file mode 100644 index 0000000000..8bfa215950 --- /dev/null +++ b/ansible/playbooks/roles/containerd/files/crictl.yaml @@ -0,0 +1 @@ +runtime-endpoint: unix:///run/containerd/containerd.sock diff --git a/ansible/playbooks/roles/containerd/tasks/main.yml b/ansible/playbooks/roles/containerd/tasks/main.yml index fb19d51222..20efe4463a 100644 --- a/ansible/playbooks/roles/containerd/tasks/main.yml +++ b/ansible/playbooks/roles/containerd/tasks/main.yml @@ -77,3 +77,11 @@ regexp: '^(KUBELET_KUBEADM_ARGS=\")(.*)(\")$' replace: '\1\2 --container-runtime-endpoint=/run/containerd/containerd.sock"' when: kubelet_kubeadmn_args_content.find('--container-runtime-endpoint') == -1 + +- name: Provide crictl.yaml file + copy: + src: crictl.yaml + dest: /etc/crictl.yaml + owner: root + group: root + mode: u=rw,go=r diff --git a/ansible/playbooks/roles/docker/tasks/main.yml b/ansible/playbooks/roles/docker/tasks/main.yml index aef03c16b2..ead5dae074 100644 --- a/ansible/playbooks/roles/docker/tasks/main.yml +++ b/ansible/playbooks/roles/docker/tasks/main.yml @@ -1,5 +1,9 @@ --- -# Docker (used by master & worker as dependency) +# Docker (used by image_registry) +- name: Include containerd defauts + include_vars: + file: roles/containerd/defaults/main.yml + name: containerd_defaults - name: Install Docker packages package: @@ -8,12 +12,12 @@ vars: _packages: Debian: - - containerd.io + - containerd.io={{ containerd_defaults.containerd_version }}-* - docker-ce-cli={{ docker_version.Debian }} - docker-ce-rootless-extras={{ docker_version.Debian }} - docker-ce={{ docker_version.Debian }} RedHat: - - containerd.io + - containerd.io-{{ containerd_defaults.containerd_version }} - docker-ce-cli-{{ docker_version.RedHat }} - docker-ce-rootless-extras-{{ docker_version.RedHat }} - docker-ce-{{ docker_version.RedHat }} diff --git a/docs/changelogs/CHANGELOG-2.0.md b/docs/changelogs/CHANGELOG-2.0.md index 48d4018351..8ec93adede 100644 --- a/docs/changelogs/CHANGELOG-2.0.md +++ b/docs/changelogs/CHANGELOG-2.0.md @@ -50,6 +50,6 @@ - Upgrade of Terraform components in issue [#2825](https://github.com/epiphany-platform/epiphany/issues/2825) and [#2853](https://github.com/epiphany-platform/epiphany/issues/2853) will make running re-apply with infrastructure break on existing 1.x clusters. The advice is to deploy a new cluster and migrate data. If needed a manual upgrade path is described [here.](../home/howto/UPGRADE.md#terraform-upgrade-from-epiphany-1.x-to-2.x) - Kubernetes container runtime changed. Dockershim and Docker are no longer on Kubernetes hosts. -- Filebeat docker input replaced by container input. New field provided for Filebeat as system service installation: container.id. Field kubernetes.container.name is no longer valid. +- Filebeat `docker` input replaced by `container` input. New field provided for Filebeat as system service installation: `container.id`. Field `kubernetes.container.name` is no longer valid. ### Known issues diff --git a/tests/spec/spec/kubernetes_master/kubernetes_master_spec.rb b/tests/spec/spec/kubernetes_master/kubernetes_master_spec.rb index f9a2d33a46..5d07e330a1 100644 --- a/tests/spec/spec/kubernetes_master/kubernetes_master_spec.rb +++ b/tests/spec/spec/kubernetes_master/kubernetes_master_spec.rb @@ -207,7 +207,7 @@ end describe 'Check the containerd' do - describe command('crictl --runtime-endpoint unix:///run/containerd/containerd.sock version') do + describe command('crictl version') do let(:disable_sudo) { false } its(:stdout) { should include('RuntimeName: containerd') } end @@ -221,7 +221,7 @@ end describe 'Check the OCI-spec' do - describe command('crictl --runtime-endpoint unix:///run/containerd/containerd.sock info') do + describe command('crictl info') do let(:disable_sudo) { false } its(:stdout) { should match('\"defaultRuntimeName\": \"runc\"') } end diff --git a/tests/spec/spec/kubernetes_node/kubernetes_node_spec.rb b/tests/spec/spec/kubernetes_node/kubernetes_node_spec.rb index 25b74aef7a..3990bda5a6 100644 --- a/tests/spec/spec/kubernetes_node/kubernetes_node_spec.rb +++ b/tests/spec/spec/kubernetes_node/kubernetes_node_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe 'Check the containerd' do - describe command('crictl --runtime-endpoint unix:///run/containerd/containerd.sock version') do + describe command('crictl version') do let(:disable_sudo) { false } its(:stdout) { should include('RuntimeName: containerd') } end