sysext/containerd: read drop-ins from /etc/containerd/conf.d - #4150
Open
satwiksps wants to merge 1 commit into
Open
sysext/containerd: read drop-ins from /etc/containerd/conf.d#4150satwiksps wants to merge 1 commit into
satwiksps wants to merge 1 commit into
Conversation
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 <sahoospsatwik@gmail.com>
satwiksps
force-pushed
the
containerd-dropin-config
branch
from
August 6, 2026 01:27
1e044ba to
a5b3566
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Right now changing a single containerd setting means copying the whole
/usr/share/containerd/config.tomlinto/etcand overridingCONTAINERD_CONFIGwith a unit drop-in. The copy then goes stale, whatever the base config picks up in later flatcar releases is silently missed.This PR adds
imports = ["/etc/containerd/conf.d/*.toml"]to both shipped configs (config.tomlandconfig-cgroupfs.toml). Snippets dropped in there take precedence over the defaults while the rest of the file keeps tracking the release. Containerd expands the glob at startup and resolves it to nothing when the directory is empty or absent, so a boot without any drop-in is unchanged. The base config is stillversion = 2, and containerd will not accept an imported file with a higher version than the main config, so drop-ins needversion = 2as well.Testing done
On a live flatcar VM (
v4593.2.4) in virtualbox via vagrant:applied the updated
config.tomlwith theimportslinewrote a drop-in at
/etc/containerd/conf.d/50-custom-log.toml:sudo systemctl restart containerdconfirmed it was merged in:
removed the drop-in and confirmed containerd still starts cleanly with an empty
/etc/containerd/conf.d/changelog/directory (user-facing change, bug fix, security fix, update)