sysext/containerd: define drop-in config directory#4150
Open
satwiksps wants to merge 1 commit into
Open
Conversation
This enables containerd to load drop-in configuration snippets from /etc/containerd/conf.d/ on startup, allowing users to customize containerd settings without copying or overriding the read-only base configuration file. Signed-off-by: Satwik Sai Prakash Sahoo <sahoospsatwik@gmail.com>
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.
Define containerd drop-in config directory in base configuration files.
This PR adds an
imports = ["/etc/containerd/conf.d/*.toml"]directive to the defaultcontainerdconfiguration files shipped in the sysext overlay (config.tomlandconfig-cgroupfs.toml).Currently, customizing
containerdsettings requires users to copy/usr/share/containerd/config.tomlto/etc/containerd/config.tomland override theCONTAINERD_CONFIGenvironment variable via a systemd drop-in. This leads to a degraded UX where users miss out on base configuration updates shipped in newer Flatcar releases.With this change,
containerdautomatically loads any.tomldrop-in files placed in/etc/containerd/conf.d/*.tomland merges them with Flatcar's default settings. If no drop-in files exist,containerdboots normally with default settings.Testing done
Tested on a live Flatcar Linux VM (
v4593.2.4) running in VirtualBox via Vagrant:Applied the updated
config.tomlcontainingimports = ["/etc/containerd/conf.d/*.toml"].Created a test drop-in file at
/etc/containerd/conf.d/50-custom-log.toml:Restarted containerd:
Output verification:
Verified backward compatibility: When no drop-in files exist in
/etc/containerd/conf.d/,containerdboots cleanly without errors.changelog/directory (user-facing change, bug fix, security fix, update)/bootand/usrsize, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.