Skip to content

feat(windows): install containerd from DALEC component packages - #10036

Open
Shun Lyu (sinmentis) wants to merge 4 commits into
mainfrom
sinmentis/windows-split-runtime-packages
Open

Shun Lyu (sinmentis) wants to merge 4 commits into
mainfrom
sinmentis/windows-split-runtime-packages

Conversation

@sinmentis

@sinmentis Shun Lyu (sinmentis) commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

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.

  • KubernetesConfig gets WindowsHcsshimURL, WindowsMobyContainerdURL and WindowsCrictlURL, passed to the provisioning script.
  • If all three are set, Install-ContainerdFromComponentPackages downloads each ZIP (VHD cache first), extracts it into the containerd directory, writes crictl.yaml (not in the DALEC ZIP; same content as the combined package) and runs the existing config/service setup.
  • Otherwise nothing changes: WindowsContainerdURL is used as today.

The RP only sends the URLs for public-cloud, non-network-isolated pools. VHD caching is in #10037.

Testing:

  • Pester: new cases for the install and the URL selection pass; the other failures are the same on main on Linux.
  • go test ./pkg/agent/... passes, including a custom data test for the new parameters.
  • Ran the installer against the published hcsshim 0.15.0-1, moby-containerd 2.3.7-4 and kubernetes-cri-tools 1.37.0-6 ZIPs: same executables and crictl.yaml as the combined package layout.

Which issue(s) this PR fixes:

Part of moving Windows containerd to DALEC packages (ADO 40250802).

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
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Windows Unit Test Results

  3 files   21 suites   1m 23s ⏱️
795 tests 795 ✅ 0 💤 0 ❌
821 runs  821 ✅ 0 💤 0 ❌

Results for commit 2197742.

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 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
Copilot AI balanced review requested due to automatic review settings November 10, 2026 04:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new branch can call an undefined function on older supported VHDs and fail provisioning; it needs an availability check, a combined-package fallback, and regression coverage.

1 open issue

Review effort: Balanced

Comment thread parts/windows/windowscsehelper.ps1 Resolved
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
Copilot AI balanced review requested due to automatic review settings November 11, 2026 00:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Human assessment is needed because case-insensitive PowerShell comparisons make the test filters accept incorrect URLs, leaving URL forwarding unverified.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

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
Copilot AI balanced review requested due to automatic review settings November 11, 2026 01:10
@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
test 0% ❌
windows 27% ❌
staging_cse_windows Package 1 71% ➖
debug 0% ❌
provisioningscripts 2% ❌
parts_windows Package 1 74% ➖
Summary 40% (2000 / 7239) ❌

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
shellspec spec 30% ❌
Summary 30% (4912 / 16591) ❌

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Human assessment is needed because case-insensitive PowerShell variable comparisons make all three URL checks always pass, leaving incorrect or swapped URL forwarding undetected.

No open issues 🎉

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
github.com/Azure/agentbaker/aks-node-controller 73% ➖
github.com/Azure/agentbaker/aks-node-controller/common 100% ✔
github.com/Azure/agentbaker/aks-node-controller/helpers 68% ➖
github.com/Azure/agentbaker/aks-node-controller/parser 88% ✔
github.com/Azure/agentbaker/aks-node-controller/pkg/gpu 100% ✔
github.com/Azure/agentbaker/aks-node-controller/pkg/nodeconfigutils 92% ✔
github.com/Azure/agentbaker/aks-node-controller/utils 0% ❌
github.com/Azure/agentbaker/apiserver 24% ❌
github.com/Azure/agentbaker/cmd 0% ❌
github.com/Azure/agentbaker/cmd/starter 0% ❌
github.com/Azure/agentbaker/fuzz/api 0% ❌
github.com/Azure/agentbaker/hotfix/render-nodecustomdata 35% ❌
github.com/Azure/agentbaker/pkg/agent 79% ➖
github.com/Azure/agentbaker/pkg/agent/datamodel 77% ➖
github.com/Azure/agentbaker/pkg/agent/toggles 0% ❌
github.com/Azure/agentbaker/pkg/vhdbuilder/datamodel 87% ✔
Summary 76% (6097 / 8043) ➖

This branch has not been deployed

No deployments
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.

3 participants