Skip to content

sysext/containerd: define drop-in config directory#4150

Open
satwiksps wants to merge 1 commit into
flatcar:mainfrom
satwiksps:containerd-dropin-config
Open

sysext/containerd: define drop-in config directory#4150
satwiksps wants to merge 1 commit into
flatcar:mainfrom
satwiksps:containerd-dropin-config

Conversation

@satwiksps

Copy link
Copy Markdown

Define containerd drop-in config directory in base configuration files.

This PR adds an imports = ["/etc/containerd/conf.d/*.toml"] directive to the default containerd configuration files shipped in the sysext overlay (config.toml and config-cgroupfs.toml).

Currently, customizing containerd settings requires users to copy /usr/share/containerd/config.toml to /etc/containerd/config.toml and override the CONTAINERD_CONFIG environment 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, containerd automatically loads any .toml drop-in files placed in /etc/containerd/conf.d/*.toml and merges them with Flatcar's default settings. If no drop-in files exist, containerd boots normally with default settings.

Testing done

Tested on a live Flatcar Linux VM (v4593.2.4) running in VirtualBox via Vagrant:

  1. Applied the updated config.toml containing imports = ["/etc/containerd/conf.d/*.toml"].

  2. Created a test drop-in file at /etc/containerd/conf.d/50-custom-log.toml:

    echo 'version = 2' | sudo tee /etc/containerd/conf.d/50-custom-log.toml
    echo '[plugins."io.containerd.grpc.v1.cri"]' | sudo tee -a /etc/containerd/conf.d/50-custom-log.toml
    echo '  max_container_log_line_size = 65536' | sudo tee -a /etc/containerd/conf.d/50-custom-log.toml
  3. Restarted containerd:

    sudo systemctl restart containerd
  4. Output verification:

    core@localhost ~ $ sudo containerd --config /etc/containerd/config.toml config dump | grep max_container_log_line_size
        max_container_log_line_size = 65536
  5. Verified backward compatibility: When no drop-in files exist in /etc/containerd/conf.d/, containerd boots cleanly without errors.

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

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>
@satwiksps
satwiksps requested a review from a team as a code owner July 24, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFE] Define containerd drop-in config directory

1 participant