Skip to content

Commit e584883

Browse files
authored
0.17.0+2.2.1 (#38)
* chore(year): update year to 2026 * update containerd to v2.2.1 * feat(dropin): add conf.d include support in the default config * CNI bin_dir in CRI runtime config: Change bin_dir to bin_dirs in the same section which supports a list of directories
1 parent 0a9f7ea commit e584883

File tree

15 files changed

+308
-22
lines changed

15 files changed

+308
-22
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2021-2025 Robert Wimmer
1+
# Copyright (C) 2021-2026 Robert Wimmer
22
# SPDX-License-Identifier: GPL-3.0-or-later
33

44
molecule/kvm/.vagrant

.yamllint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
# Copyright (C) 2021-2025 Robert Wimmer
2+
# Copyright (C) 2021-2026 Robert Wimmer
33
# SPDX-License-Identifier: GPL-3.0-or-later
44

55
extends: default

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
11
<!--
2-
Copyright (C) 2021-2025 Robert Wimmer
2+
Copyright (C) 2021-2026 Robert Wimmer
33
SPDX-License-Identifier: GPL-3.0-or-later
44
-->
55

66
# Changelog
77

8+
- **BREAKING**
9+
- CNI `bin_dir` in CRI runtime config is deprecated (`plugins.'io.containerd.cri.v1.runtime'.cni.bin_dir`) and will be removed in containerd `v2.3`. It was replaced with `bin_dirs` in the same section which supports a list of directories. So, `plugins.'io.containerd.cri.v1.runtime'.cni.bin_dir = '/opt/cni/bin'` was changed to `plugins.'io.containerd.cri.v1.runtime'.cni.bin_dirs = ['/opt/cni/bin']` in `containerd_config` variable.
10+
11+
- **UPDATE**
12+
- update `containerd` to `v2.2.1`
13+
14+
- **FEATURE**
15+
- support `conf.d` include in the [default config](https://github.com/containerd/containerd/pull/12323)
16+
17+
- **MOLECULE**
18+
- add test for `conf.d` include feature
19+
820
## 0.16.0+2.1.4
921

1022
- **Breaking**

README.md

Lines changed: 62 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
Copyright (C) 2021-2025 Robert Wimmer
2+
Copyright (C) 2021-2026 Robert Wimmer
33
SPDX-License-Identifier: GPL-3.0-or-later
44
-->
55

@@ -15,6 +15,20 @@ See full [CHANGELOG](https://github.com/githubixx/ansible-role-containerd/blob/m
1515

1616
**Recent changes:**
1717

18+
## 0.17.0+2.2.1
19+
20+
- **BREAKING**
21+
- CNI `bin_dir` in CRI runtime config is deprecated (`plugins.'io.containerd.cri.v1.runtime'.cni.bin_dir`) and will be removed in containerd `v2.3`. It was replaced with `bin_dirs` in the same section which supports a list of directories. So, `plugins.'io.containerd.cri.v1.runtime'.cni.bin_dir = '/opt/cni/bin'` was changed to `plugins.'io.containerd.cri.v1.runtime'.cni.bin_dirs = ['/opt/cni/bin']` in `containerd_config` variable.
22+
23+
- **UPDATE**
24+
- update `containerd` to `v2.2.1`
25+
26+
- **FEATURE**
27+
- support `conf.d` include in the [default config](https://github.com/containerd/containerd/pull/12323)
28+
29+
- **MOLECULE**
30+
- add test for `conf.d` include feature
31+
1832
## 0.16.0+2.1.4
1933

2034
- **Breaking**
@@ -67,7 +81,7 @@ See full [CHANGELOG](https://github.com/githubixx/ansible-role-containerd/blob/m
6781
roles:
6882
- name: githubixx.containerd
6983
src: https://github.com/githubixx/ansible-role-containerd.git
70-
version: 0.16.0+2.1.4
84+
version: 0.17.0+2.2.1
7185
```
7286
7387
## Role Variables
@@ -77,7 +91,7 @@ roles:
7791
containerd_flavor: "base"
7892

7993
# containerd version to install
80-
containerd_version: "2.1.4"
94+
containerd_version: "2.2.1"
8195

8296
# Directory where to store "containerd" binaries
8397
containerd_binary_directory: "/usr/local/bin"
@@ -159,8 +173,51 @@ containerd_config: |
159173
BinaryName = '/usr/local/sbin/runc'
160174
SystemdCgroup = true
161175
[plugins.'io.containerd.cri.v1.runtime'.cni]
162-
bin_dir = '/opt/cni/bin'
176+
bin_dirs = ['/opt/cni/bin']
163177
conf_dir = '/etc/cni/net.d'
178+
179+
# Optional: containerd config drop-ins via `imports` (containerd >= v2.2.0)
180+
#
181+
# If you set `containerd_config_imports`, the role will:
182+
# - add `imports = [ ... ]` to the generated `config.toml` (unless your
183+
# `containerd_config` already contains an `imports = ...` line)
184+
# - optionally create the referenced directories and manage `.toml` drop-in files
185+
# defined under `configs`.
186+
#
187+
# Example 1: Enable imports and manage a few drop-in files in `/etc/containerd/conf.d`
188+
#
189+
# containerd_config_imports:
190+
# - glob: "/etc/containerd/conf.d/*.toml"
191+
# configs:
192+
# 10-nvidia.toml: |
193+
# # Example override (use dotted keys to avoid table re-definition issues)
194+
# disabled_plugins = []
195+
#
196+
# 20-cni.toml: |
197+
# plugins.'io.containerd.cri.v1.runtime'.cni.bin_dirs = ['/opt/cni/bin']
198+
# plugins.'io.containerd.cri.v1.runtime'.cni.conf_dir = '/etc/cni/net.d'
199+
#
200+
# Example 2: Import additional directories but manage files elsewhere
201+
#
202+
# containerd_config_imports:
203+
# - glob: "/etc/containerd/conf.d/*.toml"
204+
# - glob: "/etc/containerd/conf2.d/*.toml"
205+
#
206+
# Example 3: Override an existing default setting via a drop-in
207+
# (here: switch SystemdCgroup to false)
208+
#
209+
# containerd_config_imports:
210+
# - glob: "/etc/containerd/conf.d/*.toml"
211+
# configs:
212+
# 10-runc-options.toml: |
213+
# plugins.'io.containerd.cri.v1.runtime'.containerd.runtimes.runc.options.SystemdCgroup = false
214+
#
215+
# Variable definition (default: disabled)
216+
containerd_config_imports: []
217+
218+
# Validate the combined config (main config + imported drop-ins).
219+
# Uses: `containerd --config <path> config dump`. If invalid, the play fails.
220+
containerd_validate_config: false
164221
```
165222
166223
## Dependencies
@@ -184,7 +241,7 @@ More examples are available in the [Molecule tests](https://github.com/githubixx
184241

185242
## Testing
186243

187-
This role has a small test setup that is created using [Molecule](https://github.com/ansible-community/molecule), libvirt (vagrant-libvirt) and QEMU/KVM. Please see my blog post [Testing Ansible roles with Molecule, libvirt (vagrant-libvirt) and QEMU/KVM](https://www.tauceti.blog/posts/testing-ansible-roles-with-molecule-libvirt-vagrant-qemu-kvm/) how to setup. The test configuration is [here](https://github.com/githubixx/ansible-role-containerd/tree/master/molecule/kvm).
244+
This role has a small test setup that is created using [Molecule](https://github.com/ansible-community/molecule), libvirt (vagrant-libvirt) and QEMU/KVM. Please see my blog post [Testing Ansible roles with Molecule, libvirt (vagrant-libvirt) and QEMU/KVM](https://www.tauceti.blog/posts/testing-ansible-roles-with-molecule-libvirt-vagrant-qemu-kvm/) how to setup. The test configuration is in [molecule/kvm](https://github.com/githubixx/ansible-role-containerd/tree/master/molecule/kvm).
188245

189246
Afterwards molecule can be executed:
190247

defaults/main.yml

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
# Copyright (C) 2021-2025 Robert Wimmer
2+
# Copyright (C) 2021-2026 Robert Wimmer
33
# SPDX-License-Identifier: GPL-3.0-or-later
44

55
# Only value "base" is currently supported
66
containerd_flavor: "base"
77

88
# containerd version to install
9-
containerd_version: "2.1.4"
9+
containerd_version: "2.2.1"
1010

1111
# Directory where to store "containerd" binaries
1212
containerd_binary_directory: "/usr/local/bin"
@@ -88,5 +88,48 @@ containerd_config: |
8888
BinaryName = '/usr/local/sbin/runc'
8989
SystemdCgroup = true
9090
[plugins.'io.containerd.cri.v1.runtime'.cni]
91-
bin_dir = '/opt/cni/bin'
91+
bin_dirs = ['/opt/cni/bin']
9292
conf_dir = '/etc/cni/net.d'
93+
94+
# Optional: containerd config drop-ins via `imports` (containerd >= v2.2.0)
95+
#
96+
# If you set `containerd_config_imports`, the role will:
97+
# - add `imports = [ ... ]` to the generated `config.toml` (unless your
98+
# `containerd_config` already contains an `imports = ...` line)
99+
# - optionally create the referenced directories and manage `.toml` drop-in files
100+
# defined under `configs`.
101+
#
102+
# Example 1: Enable imports and manage a few drop-in files in `/etc/containerd/conf.d`
103+
#
104+
# containerd_config_imports:
105+
# - glob: "/etc/containerd/conf.d/*.toml"
106+
# configs:
107+
# 10-nvidia.toml: |
108+
# # Example override (use dotted keys to avoid table re-definition issues)
109+
# disabled_plugins = []
110+
#
111+
# 20-cni.toml: |
112+
# plugins.'io.containerd.cri.v1.runtime'.cni.bin_dirs = ['/opt/cni/bin']
113+
# plugins.'io.containerd.cri.v1.runtime'.cni.conf_dir = '/etc/cni/net.d'
114+
#
115+
# Example 2: Import additional directories but manage files elsewhere
116+
#
117+
# containerd_config_imports:
118+
# - glob: "/etc/containerd/conf.d/*.toml"
119+
# - glob: "/etc/containerd/conf2.d/*.toml"
120+
#
121+
# Example 3: Override an existing default setting via a drop-in
122+
# (here: switch SystemdCgroup to false)
123+
#
124+
# containerd_config_imports:
125+
# - glob: "/etc/containerd/conf.d/*.toml"
126+
# configs:
127+
# 10-runc-options.toml: |
128+
# plugins.'io.containerd.cri.v1.runtime'.containerd.runtimes.runc.options.SystemdCgroup = false
129+
#
130+
# Variable definition (default: disabled)
131+
containerd_config_imports: []
132+
133+
# Validate the combined config (main config + imported drop-ins).
134+
# Uses: `containerd --config <path> config dump`. If invalid, the play fails.
135+
containerd_validate_config: false

handlers/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
# Copyright (C) 2021-2025 Robert Wimmer
2+
# Copyright (C) 2021-2026 Robert Wimmer
33
# SPDX-License-Identifier: GPL-3.0-or-later
44

55
- name: Reload systemd

meta/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
# Copyright (C) 2021-2025 Robert Wimmer
2+
# Copyright (C) 2021-2026 Robert Wimmer
33
# SPDX-License-Identifier: GPL-3.0-or-later
44

55
galaxy_info:

molecule/default/converge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
# Copyright (C) 2021-2025 Robert Wimmer
2+
# Copyright (C) 2021-2026 Robert Wimmer
33
# SPDX-License-Identifier: GPL-3.0-or-later
44

55
- name: Install containerd

molecule/default/molecule.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
# Copyright (C) 2021-2025 Robert Wimmer
2+
# Copyright (C) 2021-2026 Robert Wimmer
33
# SPDX-License-Identifier: GPL-3.0-or-later
44

55
dependency:
@@ -36,6 +36,18 @@ platforms:
3636
network_name: private_network
3737
type: static
3838
ip: 172.16.10.30
39+
- name: test-cd-ubuntu2404-conf-d
40+
box: alvistack/ubuntu-24.04
41+
memory: 2048
42+
cpus: 2
43+
groups:
44+
- ubuntu
45+
- confd
46+
interfaces:
47+
- auto_config: true
48+
network_name: private_network
49+
type: static
50+
ip: 172.16.10.40
3951
- name: test-cd-arch-base
4052
box: generic/arch
4153
memory: 2048
@@ -46,7 +58,7 @@ platforms:
4658
- auto_config: true
4759
network_name: private_network
4860
type: static
49-
ip: 172.16.10.40
61+
ip: 172.16.10.50
5062

5163
provisioner:
5264
name: ansible
@@ -60,6 +72,14 @@ provisioner:
6072
all:
6173
containerd_tmp_directory: "/opt/tmp/containerd"
6274
containerd_binary_directory: "/usr/local/sbin"
75+
test-cd-ubuntu2404-conf-d:
76+
containerd_validate_config: true
77+
containerd_config_imports:
78+
- glob: "/etc/containerd/conf.d/*.toml"
79+
configs:
80+
10-molecule.toml: |
81+
# Simple, non-critical override to prove imports work
82+
plugins."io.containerd.cri.v1.runtime".max_container_log_line_size = 32768
6383
6484
scenario:
6585
name: default

molecule/default/prepare.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
# Copyright (C) 2021-2025 Robert Wimmer
2+
# Copyright (C) 2021-2026 Robert Wimmer
33
# SPDX-License-Identifier: GPL-3.0-or-later
44

55
- name: Run tasks for Archlinux

0 commit comments

Comments
 (0)