-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
base: master
Are you sure you want to change the base?
Update to containerd v2.0 #11626
Conversation
9d5fb84
to
e0f9107
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #11626 +/- ##
==========================================
- Coverage 49.90% 47.69% -2.22%
==========================================
Files 185 185
Lines 19353 19380 +27
==========================================
- Hits 9658 9243 -415
- Misses 8302 8804 +502
+ Partials 1393 1333 -60
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
e0f9107
to
f1f3f4f
Compare
f1f3f4f
to
1bbd7b0
Compare
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]>
1bbd7b0
to
b28f6cb
Compare
"text/template" | ||
) | ||
|
||
// This version 2 config template is only used by Linux nodes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a future TODO remove
once most of the clusters are operating on containerd v2 / v3config versions? The migration is automatic on containerd's end right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we can remove it at some point but I suspect that containerd will continue to support the legacy config version for quite a while, so we will probably need to do so as well.
We could probably consolidate the version 2 config template for linux and windows at some point, but I didn't want to get into that here.
"github.com/containerd/containerd/pkg/seed" | ||
"github.com/urfave/cli" | ||
"github.com/containerd/containerd/v2/cmd/ctr/app" | ||
"github.com/urfave/cli/v2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hell Yes! I should not be this excited about a CLI bump, but I am
Proposed Changes
Types of Changes
Major version bump
Verification
Check version, and that everything works
Testing
Yes
Linked Issues
User-Facing Change
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 forconfig.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.