Skip to content

feat: windows cse ensure oras and reserve some exit code for network isolated cluster#7995

Open
fseldow wants to merge 6 commits intomainfrom
xinhl/niabwin2
Open

feat: windows cse ensure oras and reserve some exit code for network isolated cluster#7995
fseldow wants to merge 6 commits intomainfrom
xinhl/niabwin2

Conversation

@fseldow
Copy link
Contributor

@fseldow fseldow commented Mar 2, 2026

What this PR does / why we need it:
init oras and reserve some exit code for network isolated cluster

Which issue(s) this PR fixes:

Fixes #

Copilot AI review requested due to automatic review settings March 2, 2026 17:36
@fseldow fseldow marked this pull request as ready for review March 2, 2026 17:37
@fseldow fseldow changed the title feat: init oras and reserve some exit code for network isolated cluster feat: windows cse init oras and reserve some exit code for network isolated cluster Mar 2, 2026
@fseldow fseldow changed the title feat: windows cse init oras and reserve some exit code for network isolated cluster feat: windows cse ensure oras and reserve some exit code for network isolated cluster Mar 2, 2026
Copy link
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 initial ORAS bootstrap support for network-isolated Windows clusters and reserves dedicated exit codes to classify ORAS-related failures.

Changes:

  • Introduces Ensure-Oras to install ORAS from a cached archive on Windows nodes.
  • Reserves/records new ORAS-related Windows CSE exit codes and registers them in ErrorCodeNames.
  • Wires ORAS bootstrapping into BasePrep when a bootstrap profile registry server is configured, and adds Pester coverage.

Reviewed changes

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

File Description
parts/windows/windowscsehelper.tests.ps1 Adds Pester tests covering Ensure-Oras success and failure paths.
parts/windows/windowscsehelper.ps1 Adds ORAS-related exit codes and implements Ensure-Oras.
parts/windows/kuberneteswindowssetup.ps1 Defines ORAS globals for network-isolated clusters and calls Ensure-Oras during base prep.

Copy link
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 3 out of 3 changed files in this pull request and generated 3 comments.

@fseldow fseldow requested review from YaoC and yewmsft as code owners March 2, 2026 18:17
Copilot AI review requested due to automatic review settings March 2, 2026 20:40
Copy link
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 22 out of 22 changed files in this pull request and generated 4 comments.

Copilot AI review requested due to automatic review settings March 2, 2026 20:52
Copy link
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 22 out of 22 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings March 2, 2026 21:03
Copy link
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI review requested due to automatic review settings March 3, 2026 02:33
Copy link
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 24 out of 24 changed files in this pull request and generated 7 comments.

$global:BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER="{{GetBootstrapProfileContainerRegistryServer}}"
$global:MCR_REPOSITORY_BASE="{{GetMCRRepositoryBase}}"
$global:BootstrapProfileContainerRegistryServer="{{GetBootstrapProfileContainerRegistryServer}}"
$global:MCRRepositoryBase="{{GetMCRRepositoryBase}}"
Copy link
Contributor

Choose a reason for hiding this comment

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

These variables (MCR_REPOSITORY_BASE and BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER) are used in "containerdfunc.ps1". This file is cached on the VHD so will not be updateded in older VHDs. This will create an inconsistency when we bootstrap older VHDS and potentially cause bootstrap/provision failure. Please change back to the old variable name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the variable BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER is added in #7902
I think there is no vhd released since that time?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Besides, when network isolated cluster allow windows for preview, i will setup one minimun supported vhd version for this feature. So it should not appear old vhd with old variable name

For non-network isolated cluster,

if ((Test-Path variable:global:BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER) -and -not [string]::IsNullOrEmpty($global:BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER)) {

should directly return false, if no BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER is defined, which is by expected

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