feat(windows): oras pull azure vnet cni#8465
Open
fseldow wants to merge 12 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for downloading the Windows Azure VNet CNI plugin via ORAS when BootstrapProfileContainerRegistryServer is set (network-isolated cluster path), including a helper to parse package name/version from the CNI URL and a new Windows CSE exit code constant.
Changes:
- Add ORAS-based download path for Azure VNet CNI in
Install-VnetPluginswhen a bootstrap profile registry is provided. - Introduce
Get-PackageNameAndVersionFromCniUrland add unit tests for URL parsing. - Add a new Windows CSE exit code constant for generic ORAS package pull failures.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| staging/cse/windows/azurecnifunc.ps1 | Adds ORAS download logic for Azure VNet CNI and a URL parsing helper (currently has correctness/robustness issues). |
| staging/cse/windows/azurecnifunc.tests.ps1 | Adds Pester tests validating CNI URL parsing for package name/version extraction. |
| parts/windows/windowscsehelper.ps1 | Adds a new ORAS-related exit code constant and increments WINDOWS_CSE_ERROR_MAX_CODE (requires corresponding ErrorCodeNames update). |
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>
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:
feat(windows): oras pull azure vnet cni
Which issue(s) this PR fixes:
Fixes #