From a5b35666a86a4f547e7dccfa27389ca5498a8362 Mon Sep 17 00:00:00 2001 From: Satwik Sai Prakash Sahoo Date: Fri, 24 Jul 2026 23:37:09 +0530 Subject: [PATCH] sysext/containerd: Read drop-ins from /etc/containerd/conf.d Changing a containerd setting today means copying the shipped /usr/share/containerd/config.toml to /etc and pointing CONTAINERD_CONFIG at the copy through a unit drop-in. The copy then misses whatever the base config gains in later releases. Import /etc/containerd/conf.d/*.toml from the shipped config instead. Snippets placed there take precedence over the defaults while the rest of the file keeps updating with the release. containerd resolves the glob to nothing when the directory is empty or absent, so a boot without drop-ins is unchanged. Fixes flatcar/Flatcar#1127 Signed-off-by: Satwik Sai Prakash Sahoo --- changelog/changes/2026-07-24-containerd-dropin-config.md | 1 + .../containerd/usr/share/containerd/config-cgroupfs.toml | 3 +++ .../coreos/sysext/containerd/usr/share/containerd/config.toml | 3 +++ 3 files changed, 7 insertions(+) create mode 100644 changelog/changes/2026-07-24-containerd-dropin-config.md diff --git a/changelog/changes/2026-07-24-containerd-dropin-config.md b/changelog/changes/2026-07-24-containerd-dropin-config.md new file mode 100644 index 00000000000..7569c6f68cf --- /dev/null +++ b/changelog/changes/2026-07-24-containerd-dropin-config.md @@ -0,0 +1 @@ +- Added support for containerd drop-in configuration in `/etc/containerd/conf.d/*.toml`, so settings can be adjusted without replacing the shipped config ([scripts#4150](https://github.com/flatcar/scripts/pull/4150)) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/sysext/containerd/usr/share/containerd/config-cgroupfs.toml b/sdk_container/src/third_party/coreos-overlay/coreos/sysext/containerd/usr/share/containerd/config-cgroupfs.toml index 742fbf4355c..04ce6478165 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos/sysext/containerd/usr/share/containerd/config-cgroupfs.toml +++ b/sdk_container/src/third_party/coreos-overlay/coreos/sysext/containerd/usr/share/containerd/config-cgroupfs.toml @@ -1,5 +1,8 @@ version = 2 +# drop-in configuration, takes precedence over the settings below +imports = ["/etc/containerd/conf.d/*.toml"] + # persistent data location root = "/var/lib/containerd" # runtime state information diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/sysext/containerd/usr/share/containerd/config.toml b/sdk_container/src/third_party/coreos-overlay/coreos/sysext/containerd/usr/share/containerd/config.toml index babc77b0e06..ebd970a3bab 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos/sysext/containerd/usr/share/containerd/config.toml +++ b/sdk_container/src/third_party/coreos-overlay/coreos/sysext/containerd/usr/share/containerd/config.toml @@ -1,5 +1,8 @@ version = 2 +# drop-in configuration, takes precedence over the settings below +imports = ["/etc/containerd/conf.d/*.toml"] + # persistent data location root = "/var/lib/containerd" # runtime state information