Skip to content

feat(windows): add Windows 2025 support for Windows Cilium Networking (WCN)#7778

Merged
timmy-wright merged 1 commit intomainfrom
davwei/win2025cilium
Apr 9, 2026
Merged

feat(windows): add Windows 2025 support for Windows Cilium Networking (WCN)#7778
timmy-wright merged 1 commit intomainfrom
davwei/win2025cilium

Conversation

@rzlink
Copy link
Copy Markdown
Contributor

@rzlink rzlink commented Feb 3, 2026

/kind feature

What this PR does / why we need it:
This enables Windows 2025 VHDs to download and cache the WCN package (v1.3.0) during VHD build, following the same pattern as Windows 23H2.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Release note:

Add Windows 2025 Cilium Networking (WCN) feature

Copilot AI review requested due to automatic review settings February 3, 2026 17:41
@github-actions github-actions bot added the components This pull request updates cached components on Linux or Windows VHDs label Feb 3, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Windows Server 2025 coverage for Windows Cilium Networking (WCN) so VHD build can download/cache the WCN package (mirroring the existing Windows 23H2 behavior), and extends snapshot/e2e scenarios to validate the generated Windows CSE artifacts.

Changes:

  • Extend components.json WCN OCI artifact selection to include Windows SKU 2025* (v1.3.0).
  • Add new Windows 2025 Gen2 NextGenNetworking snapshot test cases (enabled / enabled-no-config / disabled) and corresponding expected CustomData + CSECommand outputs.
  • Add a (currently skipped) e2e scenario for Windows 2025 Gen2 with WCN enabled.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
parts/common/components.json Adds windowsSkuMatch: "2025*" for the WCN OCI artifact so Windows 2025 VHD builds cache the package.
pkg/agent/baker_test.go Adds snapshot test entries for Windows 2025 Gen2 NextGenNetworking variants to validate generated outputs.
pkg/agent/testdata/AKSWindows2025Gen2+NextGenNetworking/CustomData New expected Windows CSE CustomData output with WCN enabled + config.
pkg/agent/testdata/AKSWindows2025Gen2+NextGenNetworking/CSECommand New expected CSE command output for the Windows 2025 Gen2 NextGenNetworking case.
pkg/agent/testdata/AKSWindows2025Gen2+NextGenNetworkingNoConfig/CustomData New expected Windows CSE CustomData output with WCN enabled + empty config.
pkg/agent/testdata/AKSWindows2025Gen2+NextGenNetworkingNoConfig/CSECommand New expected CSE command output for the “enabled but no config” case.
pkg/agent/testdata/AKSWindows2025Gen2+NextGenNetworkingDisabled/CustomData New expected Windows CSE CustomData output with WCN disabled.
pkg/agent/testdata/AKSWindows2025Gen2+NextGenNetworkingDisabled/CSECommand New expected CSE command output for the WCN-disabled case.
e2e/scenario_win_test.go Adds a skipped e2e scenario wiring NextGenNetworking/WCN on Windows 2025 Gen2 for future enablement.

@rzlink rzlink changed the title feat: Add Windows 2025 support for Windows Cilium Networking (WCN) feat: add new feature Windows 2025 support for Windows Cilium Networking (WCN) Feb 3, 2026
@rzlink rzlink changed the title feat: add new feature Windows 2025 support for Windows Cilium Networking (WCN) feat(windows): add Windows 2025 support for Windows Cilium Networking (WCN) Feb 3, 2026
Copy link
Copy Markdown
Contributor

@timmy-wright timmy-wright left a comment

Choose a reason for hiding this comment

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

I'm not sure why we needed the generated data update - it shouldn't be necessary for this PR. But if it was needed, then it was needed.

@rzlink rzlink force-pushed the davwei/win2025cilium branch from cc832dc to 24e9890 Compare February 9, 2026 22:43
Copilot AI review requested due to automatic review settings February 10, 2026 19:03
@rzlink rzlink force-pushed the davwei/win2025cilium branch from 24e9890 to 86be468 Compare February 10, 2026 19:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Comment on lines +608 to +609
$turncatedErrorMessage = $global:ErrorMessage.Substring(0, [Math]::Min(240 - $errorMessageLength, $global:ErrorMessage.Length))
Set-Content -Path $completionFilePath -Value "ExitCode: |$global:ExitCode|, Output: |$($global:ErrorCodeNames[$global:ExitCode])|, Error: |$turncatedErrorMessage|"
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

Typo in variable name: $turncatedErrorMessage should be $truncatedErrorMessage for readability/maintainability. Since this is generated CustomData, the fix likely belongs in the source template (and then re-run generation) rather than editing the snapshot directly.

Suggested change
$turncatedErrorMessage = $global:ErrorMessage.Substring(0, [Math]::Min(240 - $errorMessageLength, $global:ErrorMessage.Length))
Set-Content -Path $completionFilePath -Value "ExitCode: |$global:ExitCode|, Output: |$($global:ErrorCodeNames[$global:ExitCode])|, Error: |$turncatedErrorMessage|"
$truncatedErrorMessage = $global:ErrorMessage.Substring(0, [Math]::Min(240 - $errorMessageLength, $global:ErrorMessage.Length))
Set-Content -Path $completionFilePath -Value "ExitCode: |$global:ExitCode|, Output: |$($global:ErrorCodeNames[$global:ExitCode])|, Error: |$truncatedErrorMessage|"

Copilot uses AI. Check for mistakes.
Comment on lines +608 to +609
$turncatedErrorMessage = $global:ErrorMessage.Substring(0, [Math]::Min(240 - $errorMessageLength, $global:ErrorMessage.Length))
Set-Content -Path $completionFilePath -Value "ExitCode: |$global:ExitCode|, Output: |$($global:ErrorCodeNames[$global:ExitCode])|, Error: |$turncatedErrorMessage|"
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

Typo in variable name: $turncatedErrorMessage should be $truncatedErrorMessage for readability/maintainability. Since this is generated CustomData, the fix likely belongs in the source template (and then re-run generation) rather than editing the snapshot directly.

Suggested change
$turncatedErrorMessage = $global:ErrorMessage.Substring(0, [Math]::Min(240 - $errorMessageLength, $global:ErrorMessage.Length))
Set-Content -Path $completionFilePath -Value "ExitCode: |$global:ExitCode|, Output: |$($global:ErrorCodeNames[$global:ExitCode])|, Error: |$turncatedErrorMessage|"
$truncatedErrorMessage = $global:ErrorMessage.Substring(0, [Math]::Min(240 - $errorMessageLength, $global:ErrorMessage.Length))
Set-Content -Path $completionFilePath -Value "ExitCode: |$global:ExitCode|, Output: |$($global:ErrorCodeNames[$global:ExitCode])|, Error: |$truncatedErrorMessage|"

Copilot uses AI. Check for mistakes.
Comment on lines +608 to +609
$turncatedErrorMessage = $global:ErrorMessage.Substring(0, [Math]::Min(240 - $errorMessageLength, $global:ErrorMessage.Length))
Set-Content -Path $completionFilePath -Value "ExitCode: |$global:ExitCode|, Output: |$($global:ErrorCodeNames[$global:ExitCode])|, Error: |$turncatedErrorMessage|"
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

Typo in variable name: $turncatedErrorMessage should be $truncatedErrorMessage for readability/maintainability. Since this is generated CustomData, the fix likely belongs in the source template (and then re-run generation) rather than editing the snapshot directly.

Suggested change
$turncatedErrorMessage = $global:ErrorMessage.Substring(0, [Math]::Min(240 - $errorMessageLength, $global:ErrorMessage.Length))
Set-Content -Path $completionFilePath -Value "ExitCode: |$global:ExitCode|, Output: |$($global:ErrorCodeNames[$global:ExitCode])|, Error: |$turncatedErrorMessage|"
$truncatedErrorMessage = $global:ErrorMessage.Substring(0, [Math]::Min(240 - $errorMessageLength, $global:ErrorMessage.Length))
Set-Content -Path $completionFilePath -Value "ExitCode: |$global:ExitCode|, Output: |$($global:ErrorCodeNames[$global:ExitCode])|, Error: |$truncatedErrorMessage|"

Copilot uses AI. Check for mistakes.
@zylxjtu zylxjtu force-pushed the davwei/win2025cilium branch from d90465d to 5c500e9 Compare April 7, 2026 22:10
Copilot AI review requested due to automatic review settings April 8, 2026 20:36
@zylxjtu zylxjtu force-pushed the davwei/win2025cilium branch from 5c500e9 to 50c0eac Compare April 8, 2026 20:36
@zylxjtu zylxjtu force-pushed the davwei/win2025cilium branch from 50c0eac to cbc090f Compare April 8, 2026 20:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Comment on lines 2242 to +2249
"renovateTag": "<DO_NOT_UPDATE>",
"latestVersion": "1.3.0",
"windowsSkuMatch": "23H2*"
},
{
"renovateTag": "<DO_NOT_UPDATE>",
"latestVersion": "1.6.0",
"windowsSkuMatch": "2025*"
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

The PR description says Windows 2025 will download/cache WCN package v1.3.0, but components.json selects latestVersion: 1.6.0 for windowsSkuMatch: 2025*. Please align the PR description with the actual version being introduced (or adjust the component version if 1.3.0 is intended for 2025).

Copilot uses AI. Check for mistakes.
# Determine the CSE package URL
$WindowsCSEScriptsPackage = "aks-windows-cse-scripts-current.zip"
# CSEScriptsPackage is cached on VHD. Previously the cse package version was managed in components.json, whereas RP set the package URL which is a storage account.
# From 2025-06 The CSE packages is eleased on the VHD. RP can use fully qualified URL to download CSE scripts package when required out of VHD release cycle.
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

Correct spelling in comment: 'eleased' -> 'released'.

Suggested change
# From 2025-06 The CSE packages is eleased on the VHD. RP can use fully qualified URL to download CSE scripts package when required out of VHD release cycle.
# From 2025-06 The CSE packages is released on the VHD. RP can use fully qualified URL to download CSE scripts package when required out of VHD release cycle.

Copilot uses AI. Check for mistakes.
Notes on modifying this file:
- This file extension is PS1, but it is actually used as a template from pkg/engine/template_generator.go
- All of the lines that have braces in them will be modified. Please do not change them here, change them in the Go sources
- Single quotes are forbidden, they are reserved to delineate the different members for the ARM template concat() call
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

This header states “Single quotes are forbidden”, but this generated fixture contains multiple single-quoted strings later in the script. Please either update the header comment to reflect current constraints for these testdata fixtures, or regenerate/adjust the fixture so it actually complies with the stated template restrictions (to avoid future edits being guided by incorrect rules).

Suggested change
- Single quotes are forbidden, they are reserved to delineate the different members for the ARM template concat() call
- Quote usage in this template must remain compatible with the ARM template concat() generation performed by pkg/engine/template_generator.go

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

@timmy-wright timmy-wright left a comment

Choose a reason for hiding this comment

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

The test data (CSECommand and CustomData) aren't required anymore. Please remove.

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.

We removed all this test data from the repo a few weeks ago - you shouldn't need to create it anymore. Make sure you've merged the latest main branch and you should be able to delete the CSECommand and CustomData files.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

Changes cached containers or packages on windows VHDs

Please get a Windows SIG member to approve.

The following dif file shows any additions or deletions from what will be cached on windows VHDs organised by VHD type.

  • Additions are new things cached.
  • Deletions are things no longer cached.
diff --git a/vhd_files/2025-gen2.txt b/vhd_files/2025-gen2.txt
index d31b59b..a1b2b36 100644
--- a/vhd_files/2025-gen2.txt
+++ b/vhd_files/2025-gen2.txt
@@ -14,0 +15 @@ c:\akse-cache\csi-proxy\: https://packages.aks.azure.com/csi-proxy/v1.1.2-hotfix
+c:\akse-cache\wcn\: mcr.microsoft.com/wcn/package:1.6.0-cpu-arch
diff --git a/vhd_files/2025.txt b/vhd_files/2025.txt
index 03661ca..7e331bb 100644
--- a/vhd_files/2025.txt
+++ b/vhd_files/2025.txt
@@ -14,0 +15 @@ c:\akse-cache\csi-proxy\: https://packages.aks.azure.com/csi-proxy/v1.1.2-hotfix
+c:\akse-cache\wcn\: mcr.microsoft.com/wcn/package:1.6.0-cpu-arch

@zylxjtu zylxjtu enabled auto-merge (squash) April 9, 2026 20:46
@timmy-wright timmy-wright disabled auto-merge April 9, 2026 21:33
@timmy-wright timmy-wright merged commit 80851cf into main Apr 9, 2026
40 of 45 checks passed
@timmy-wright timmy-wright deleted the davwei/win2025cilium branch April 9, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

components This pull request updates cached components on Linux or Windows VHDs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants