Skip to content

feat: network isolated cluster skip cse download#8077

Merged
fseldow merged 2 commits into
mainfrom
xinhl/niforcecached
Mar 19, 2026
Merged

feat: network isolated cluster skip cse download#8077
fseldow merged 2 commits into
mainfrom
xinhl/niforcecached

Conversation

@fseldow

@fseldow fseldow commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:
feat: network isolated cluster skip cse download because network isolated cluster cannot download scripts from packages.aks.microsoft.com

Which issue(s) this PR fixes:

Fixes #

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.

Pull request overview

This PR updates the Windows provisioning flow for network-isolated clusters so the node bootstrap can skip downloading the Windows CSE scripts package (which may be unreachable) and instead use a cached scripts zip baked into the VHD.

Changes:

  • Add Install-CachedScripts helper to locate and expand a cached aks-windows-cse-scripts-current.zip from the VHD cache.
  • Update kuberneteswindowssetup.ps1 to skip CSE scripts download when BootstrapProfileContainerRegistryServer is set and install from cache instead.
  • Add Pester unit tests covering the new cached-scripts install behavior.

Reviewed changes

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

File Description
parts/windows/windowscsehelper.ps1 Adds a new error code and introduces Install-CachedScripts to expand cached CSE scripts from the VHD cache.
parts/windows/kuberneteswindowssetup.ps1 Alters script acquisition logic to avoid downloading in network-isolated mode and use cached scripts.
parts/windows/windowscsehelper.tests.ps1 Adds unit tests validating cached scripts are expanded and proper exit behavior when missing.

Comment thread parts/windows/kuberneteswindowssetup.ps1
Comment thread parts/windows/kuberneteswindowssetup.ps1 Outdated

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.

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.

Comment thread parts/windows/windowscsehelper.ps1 Outdated
Comment thread parts/windows/kuberneteswindowssetup.ps1

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.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.

Comment thread parts/windows/kuberneteswindowssetup.ps1 Outdated
Comment thread parts/windows/kuberneteswindowssetup.ps1 Outdated

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.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.

Comment thread parts/windows/kuberneteswindowssetup.ps1 Outdated
Comment thread parts/windows/kuberneteswindowssetup.ps1 Outdated
Copilot AI review requested due to automatic review settings March 17, 2026 06:45

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.

Pull request overview

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

Comment thread parts/windows/kuberneteswindowssetup.ps1 Outdated
Comment thread pkg/agent/testdata/AKSWindows2019+ootcredentialprovider/CustomData Outdated
Comment thread pkg/agent/testdata/AKSWindows2019+SecurityProfile/CustomData Outdated
Comment thread pkg/agent/testdata/AKSWindows2019+ManagedIdentity/CustomData Outdated

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.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Comment thread parts/windows/kuberneteswindowssetup.ps1
@fseldow fseldow enabled auto-merge (squash) March 19, 2026 01:48
@fseldow fseldow disabled auto-merge March 19, 2026 07:46
@fseldow fseldow force-pushed the xinhl/niforcecached branch from 5abcc18 to 77b5630 Compare March 19, 2026 07:48
@fseldow fseldow enabled auto-merge (squash) March 19, 2026 07:50

@jiashun0011 jiashun0011 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.

lgtm

@fseldow fseldow merged commit 728d320 into main Mar 19, 2026
29 checks passed
@fseldow fseldow deleted the xinhl/niforcecached branch March 19, 2026 09:14
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.

4 participants