Repository navigation
feat(windows): install containerd from DALEC component packages - #10036
Open
Shun Lyu (sinmentis) wants to merge 4 commits into
Open
Shun Lyu (sinmentis) wants to merge 4 commits into
Shun Lyu (sinmentis) wants to merge 4 commits into
Conversation
Add optional WindowsHcsshimURL, WindowsMobyContainerdURL and WindowsCrictlURL to KubernetesConfig and pass them to the Windows provisioning script. When all three are set, Windows CSE downloads the hcsshim, moby-containerd and kubernetes-cri-tools DALEC ZIPs and assembles the existing flat containerd layout in a staging directory before replacing the installation. crictl.yaml is written by CSE because the cri-tools package does not ship it. Missing or partial URLs, and network-isolated nodes, keep using the combined containerd package in WindowsContainerdURL. Invalid packages and a CSE package without the new installer fail provisioning instead of silently downgrading. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 565e4b3e-932b-426e-a44c-fdef566cf964
Contributor
Windows Unit Test Results 3 files 21 suites 1m 23s ⏱️ Results for commit 2197742. ♻️ This comment has been updated with latest results. |
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The new runtime installer and shared finalizer still require Windows CSE validation for service startup and supported VHD–CSE combinations before enabling the RP toggle.
No open issues 🎉
What changed in this PR
Adds an opt-in Windows containerd installation path using separate DALEC component packages, while preserving the combined archive as the default and fallback. VHD package caching is handled separately in #10037.
Changes:
- Passes three optional component URLs from the Go configuration into Windows provisioning.
- Validates and assembles component packages into the existing layout, then uses shared configuration and service setup.
- Adds Go and Pester coverage for URL propagation, package validation, installer selection, and fallback behavior.
| File | Description |
|---|---|
staging/cse/windows/containerdfunc.tests.ps1 |
Tests package assembly, missing files, and file conflicts. |
staging/cse/windows/containerdfunc.ps1 |
Adds component-package installation and extracts shared setup. |
pkg/agent/params.go |
Maps component URLs into template parameters. |
pkg/agent/datamodel/types.go |
Defines three optional Windows component URL fields. |
pkg/agent/baker_test.go |
Tests URL rendering and custom-data size limits. |
parts/windows/windowscsehelper.tests.ps1 |
Tests installer selection, fallbacks, and older CSE handling. |
parts/windows/windowscsehelper.ps1 |
Selects component installation when supported and fully configured. |
parts/windows/kuberneteswindowssetup.ps1.template |
Passes component URLs into the installation helper. |
Review effort: Balanced
Extract the three ZIPs straight into the containerd directory and drop the staging, file validation and network-isolated fallback. The RP only sends the URLs for public-cloud, non-network-isolated pools. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 565e4b3e-932b-426e-a44c-fdef566cf964
windowscsehelper.ps1 is delivered inline, but containerdfunc.ps1 comes from the CSE scripts cached on the VHD. Older VHDs don't have Install-ContainerdFromComponentPackages, so use the combined package there instead of failing provisioning. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 565e4b3e-932b-426e-a44c-fdef566cf964
Use Logs-To-Event so nodes that fall back to the combined containerd package on older VHDs show up in CSE telemetry, not only in the local CSE log. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 565e4b3e-932b-426e-a44c-fdef566cf964
Contributor
Contributor
Contributor
|
This branch has not been deployed
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:
Lets Windows CSE install containerd from the signed DALEC Windows ZIPs (hcsshim, moby-containerd, kubernetes-cri-tools) instead of the combined containerd package.
KubernetesConfiggetsWindowsHcsshimURL,WindowsMobyContainerdURLandWindowsCrictlURL, passed to the provisioning script.Install-ContainerdFromComponentPackagesdownloads each ZIP (VHD cache first), extracts it into the containerd directory, writescrictl.yaml(not in the DALEC ZIP; same content as the combined package) and runs the existing config/service setup.WindowsContainerdURLis used as today.The RP only sends the URLs for public-cloud, non-network-isolated pools. VHD caching is in #10037.
Testing:
mainon Linux.go test ./pkg/agent/...passes, including a custom data test for the new parameters.hcsshim 0.15.0-1,moby-containerd 2.3.7-4andkubernetes-cri-tools 1.37.0-6ZIPs: same executables andcrictl.yamlas the combined package layout.Which issue(s) this PR fixes:
Part of moving Windows containerd to DALEC packages (ADO 40250802).