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

✨ Backwards compatible support for containerd 2 #1521

Merged
merged 4 commits into from
Jan 7, 2025

Conversation

emolitor
Copy link
Contributor

@emolitor emolitor commented Jan 3, 2025

What this PR does / why we need it: Backwards compatible support for containerd 2

Fixes: #1522

Special notes for your reviewer: I used a variation of this over the holidays while testing CAPH. The support for the 'batteries included' containerd release was deprecated a while ago and removed in containerd 2.0. This change updates the Ubuntu quickstart templates and packer templates to use the supported packaging for containerd and separately installs runc. This was tested with containerd 1.7.24 and containerd 2.0.1.

One subtle change to make note of is moving the hardening of /etc/cni permissions into kubernetes.sh for the packer templates. Previously the containerd 'batteries included' package included kubernetes-cni as well as being installed as a dependency of kubelet (from the Kubernetes apt repo). Now that kubernetes-cni is solely being installed as part of the kubernetes apt packaging I've moved the permissions change out of cri.sh and into kubernetes.sh.

Lastly I simplified setting ARCH to use dpkg instead of uname as, at least for Ubuntu and Debian, it's a much cleaner approach.

Feedback is greatly appreciated. One question I had is what is the purpose of the structed comment on the existing CONTAINERD version line (see following). It seems like the RUNC version might want something similar?

export CONTAINERD=1.7.24 # update: datasource=github-tags depName=containerd/containerd extractVersion=^v(?<version>.*)$ versioning=semver

@syself-bot syself-bot bot added size/M Denotes a PR that changes 50-200 lines, ignoring generated files. area/templates Changes made in the templates directory labels Jan 3, 2025
@batistein batistein requested a review from lucasrattz January 3, 2025 21:44
@batistein
Copy link
Contributor

This comment will be tracked and updated by renovatebot. This is for demonstration purposes only, to show how to use automation while keeping components up to date. We haven't matched all the parts to this, so we can either keep it or drop it. Best case scenario, someone will align it with all the templates to make it easier to keep the components up to date.

@syself-bot syself-bot bot added size/L Denotes a PR that changes 200-800 lines, ignoring generated files. and removed size/M Denotes a PR that changes 50-200 lines, ignoring generated files. labels Jan 4, 2025
Copy link
Contributor Author

@emolitor emolitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated per comments and ready for review.

@guettli guettli self-requested a review January 7, 2025 14:00
Copy link
Collaborator

@guettli guettli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@guettli guettli merged commit 61ce827 into syself:main Jan 7, 2025
3 checks passed
@guettli
Copy link
Collaborator

guettli commented Jan 7, 2025

@emolitor just out of curiosity: Why do you want to use containerd 2.x? Which features do you need, and why?

@guettli guettli mentioned this pull request Jan 7, 2025
@emolitor
Copy link
Contributor Author

emolitor commented Jan 7, 2025

@emolitor just out of curiosity: Why do you want to use containerd 2.x? Which features do you need, and why?

Was playing around with the Transfer Service as a spike to prototype something and it is only stable in v2.

@emolitor emolitor deleted the em-containerd-2 branch January 7, 2025 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/templates Changes made in the templates directory size/L Denotes a PR that changes 200-800 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants