Xinhl/winall2#8545
Open
fseldow wants to merge 13 commits into
Open
Conversation
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- ORAS reference construction for azure-vnet-cni, overlay, and swift variants - Correct destination path passed to ORAS download - URL parse failure handling with correct error code - ORAS pull failure with correct error code - HTTP download fallback when registry server is not set
Follow containerdfunc.tests.ps1 pattern - mock DownloadFileWithOras instead of Retry-Command, mock Move-Item/Remove-Item for file cleanup
ParameterFilter needs named params to match against
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
PR Title Lint Failed ❌Current Title: Your PR title doesn't follow the expected format. Please update your PR title to follow one of these patterns: Conventional Commits Format:
Guidelines:
Examples:
Please update your PR title and the lint check will run again automatically. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Windows CSE behavior for network-isolated clusters by adding ORAS-based download support for Azure CNI plugins and extending credential provider configuration for bootstrap-profile registry mirroring, along with new unit tests and an e2e scenario adjustment.
Changes:
- Add ORAS download path for Windows Azure VNet CNI plugins when
BootstrapProfileContainerRegistryServeris set. - Update Windows credential provider config generation to include an MCR mirror configuration for network-isolated scenarios.
- Add Pester coverage for CNI URL parsing + ORAS reference construction, and tweak a Windows e2e scenario configuration.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| staging/cse/windows/configfunc.ps1 | Updates kubelet credential provider config generation for bootstrap profile registry scenarios. |
| staging/cse/windows/azurecnifunc.ps1 | Adds ORAS-based download flow for Azure CNI plugins and URL parsing helper. |
| staging/cse/windows/azurecnifunc.tests.ps1 | Adds Pester tests for URL parsing and ORAS behavior in Install-VnetPlugins. |
| parts/windows/windowscsehelper.ps1 | Adds a new ORAS-related exit code constant and updates max code/name list. |
| e2e/scenario_win_test.go | Adjusts a Windows network-isolated e2e scenario cluster selection and bootstrap config. |
Comment on lines
+412
to
+417
| defaultCacheDuration: "10m" | ||
| apiVersion: credentialprovider.kubelet.k8s.io/v1 | ||
| args: | ||
| - $azureConfigFile | ||
| - name: mcr-credential-provider | ||
| matchImages: |
Comment on lines
+35
to
+40
| Logs-To-Event -TaskName "AKS.WindowsCSE.DownloadAzureVnetCniWithOras" -TaskMessage "Start to download Azure VNet CNI with oras. CniPackageVersionTag: $cniPackageVersionTag, BootstrapProfileContainerRegistryServer: $global:BootstrapProfileContainerRegistryServer" | ||
| $orasReference = "$global:BootstrapProfileContainerRegistryServer/aks/packages/azure/${orasPackageName}:${cniPackageVersionTag}" | ||
| $cachedFileName = Get-FileNameFromUrl -Url $VNetCNIPluginsURL | ||
| try { | ||
| Retry-Command -Command "DownloadFileWithOras" -Args @{Reference = $orasReference; DestinationPath = $zipfile; CachedFile = $cachedFileName } -Retries 5 -RetryDelaySeconds 10 | ||
| } |
| }, | ||
| Config: Config{ | ||
| Cluster: ClusterAzureBootstrapProfileCache, | ||
| Cluster: clusterAzureNetworkIsolated, |
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:
Which issue(s) this PR fixes:
Fixes #