Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to containerd v2.0 #11626

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

brandond
Copy link
Member

@brandond brandond commented Jan 17, 2025

Proposed Changes

  • Update to containerd v2.0 and supporting plugins to compatible versions
  • Update to containerd config version 3
  • Unify linux and windows config templates

Types of Changes

Major version bump

Verification

Check version, and that everything works

Testing

Yes

Linked Issues

User-Facing Change

Containerd has been bumped to version 2.0.
  Containerd 2.0 uses a new config file schema. If you are using a custom containerd config template, you should migrate your template to `config-v3.toml.tmpl` to switch to the new version. See the [upstream documentation](https://github.com/containerd/containerd/blob/release/2.0/docs/cri/config.md) for more information.

Further Comments

With this change, k3s will use the new config version by default. Since the versions cannot be mixed in a single file, user templates for the new version will be loaded from config-v3.toml.tmpl. If this file does not exist, k3s will check for config.toml.tmpl and if found, generate a config file with the legacy schema.

Confusingly, containerd v1.7 uses config version 2, and containerd v2.0 uses config version 3.

@brandond brandond requested a review from a team as a code owner January 17, 2025 02:27
@brandond brandond force-pushed the containerd-2 branch 2 times, most recently from 9d5fb84 to e0f9107 Compare January 17, 2025 04:23
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 77.96610% with 13 lines in your changes missing coverage. Please review.

Project coverage is 47.90%. Comparing base (a858412) to head (1bbd7b0).

Files with missing lines Patch % Lines
pkg/agent/containerd/config_linux.go 40.00% 5 Missing and 1 partial ⚠️
pkg/agent/templates/templates_linux.go 0.00% 4 Missing ⚠️
pkg/agent/containerd/config.go 84.21% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11626      +/-   ##
==========================================
+ Coverage   47.81%   47.90%   +0.08%     
==========================================
  Files         185      185              
  Lines       19265    19292      +27     
==========================================
+ Hits         9211     9241      +30     
+ Misses       8726     8724       -2     
+ Partials     1328     1327       -1     
Flag Coverage Δ
e2etests 40.64% <62.71%> (+0.07%) ⬆️
inttests 35.19% <52.54%> (+0.02%) ⬆️
unittests 17.19% <57.62%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@brandond brandond marked this pull request as draft January 17, 2025 08:31
Signed-off-by: Brad Davidson <[email protected]>
Ref: https://github.com/containerd/containerd/blob/release/2.0/docs/cri/config.md

Since this is a breaking change, add support for a new v3 template file. If no v3 template is present, fall back to checking for the legacy v2 template and render the old structure.

Signed-off-by: Brad Davidson <[email protected]>
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.

1 participant