Skip to content

Commit

Permalink
Add crictl config file, add containerd version in docker role
Browse files Browse the repository at this point in the history
  • Loading branch information
rafzei committed Feb 14, 2022
1 parent fbec80d commit 8abe620
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 7 deletions.
1 change: 1 addition & 0 deletions ansible/playbooks/roles/containerd/files/crictl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
runtime-endpoint: unix:///run/containerd/containerd.sock
8 changes: 8 additions & 0 deletions ansible/playbooks/roles/containerd/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 7 additions & 3 deletions ansible/playbooks/roles/docker/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion docs/changelogs/CHANGELOG-2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,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
4 changes: 2 additions & 2 deletions tests/spec/spec/kubernetes_master/kubernetes_master_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/spec/spec/kubernetes_node/kubernetes_node_spec.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 8abe620

Please sign in to comment.