feat: add scriptless containerd 2.0 support#8825
Draft
lilypan26 wants to merge 1 commit into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds scriptless support for generating containerd 2.x configuration via aks-node-controller templates (intended to align with the containerd v2 config shape used in pkg/agent/baker.go), and wires e2e config to provide a containerd version signal for Ubuntu 24.04.
Changes:
- Add containerd v2 TOML templates (GPU and no-GPU) and select them in aks-node-controller based on
ContainerdVersion >= 2.0.0. - Populate
aksnodeconfig.ContainerdConfig.ContainerdVersionin e2e based on Ubuntu 24.04 distro detection. - Adjust e2e scenario metadata (notably, Ubuntu 24.04 scriptless test tags).
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/agent/baker.go | Re-indents the inlined containerd v2 config templates used by AgentBaker generation logic. |
| e2e/scenario_test.go | Removes the Scriptless tag from the Ubuntu 24.04 scriptless scenario. |
| e2e/node_config.go | Sets ContainerdVersion in the generated AKSNodeConfig for Ubuntu 24.04 to drive v2 template selection. |
| aks-node-controller/parser/templates/containerd_v2.toml.gtpl | New GPU-capable containerd v2 config template. |
| aks-node-controller/parser/templates/containerd_v2_no_GPU.toml.gtpl | New no-GPU containerd v2 config template. |
| aks-node-controller/parser/helper.go | Embeds v2 templates and selects v1 vs v2 based on ContainerdVersion. |
| aks-node-controller/parser/helper_test.go | Adds unit tests for v2 template selection and output. |
Comment on lines
+552
to
+556
| want: base64.StdEncoding.EncodeToString([]byte(`version = 2 | ||
| oom_score = -999 | ||
| [plugins."io.containerd.cri.v1.images"] | ||
| [plugins."io.containerd.cri.v1.images".pinned_images] | ||
| sandbox = "" |
Comment on lines
686
to
689
| func Test_Ubuntu2404_Scriptless(t *testing.T) { | ||
| RunScenario(t, &Scenario{ | ||
| Description: "testing that a new ubuntu 2404 node using self contained installer can be properly bootstrapped", | ||
| Tags: Tags{ | ||
| Scriptless: true, | ||
| }, | ||
| Config: Config{ |
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.
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #