feat: oras pull pause image if not cached for windows network isolated cluster#8038
Merged
feat: oras pull pause image if not cached for windows network isolated cluster#8038
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds functionality to pull and cache the Kubernetes pause (pod infra) container image via ORAS for Windows nodes in network-isolated clusters. The problem being solved is that containerd cannot use credential providers to pull the pause image from a private ACR in isolated environments, so the image must be pre-pulled and pinned in containerd's local store.
Changes:
- Added
Set-PodInfraContainerImagefunction tonetworkisolatedclusterfunc.ps1that pulls the pause image from the private registry using oras, imports it into containerd's k8s.io namespace, and pins it to prevent garbage collection. - Integrated the new function into
Install-Containerdincontainerdfunc.ps1, calling it whenBootstrapProfileContainerRegistryServeris configured. - Updated the Windows e2e test to use the correct non-anonymous ACR (requiring authentication) for the network isolated test scenario.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
staging/cse/windows/networkisolatedclusterfunc.ps1 |
New Set-PodInfraContainerImage function: reads pause image from cluster config, checks if already cached, pulls via oras, imports via ctr, and pins with label |
staging/cse/windows/networkisolatedclusterfunc.tests.ps1 |
Unit tests for Set-PodInfraContainerImage covering empty image, early return when cached, successful pull/import, and retry exhaustion |
staging/cse/windows/containerdfunc.ps1 |
Calls Set-PodInfraContainerImage from within Install-Containerd when BootstrapProfileContainerRegistryServer is set |
e2e/scenario_win_test.go |
Fixes the e2e test to use PrivateACRName (auth required) instead of PrivateACRNameNotAnon (anonymous pull enabled) for the NonAnonymousACR-tagged Windows network isolated test |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
timmy-wright
reviewed
Mar 9, 2026
timmy-wright
approved these changes
Mar 10, 2026
jiashun0011
reviewed
Mar 16, 2026
Contributor
|
lgtm, thanks for the pr |
jiashun0011
approved these changes
Mar 16, 2026
Contributor
jiashun0011
left a comment
There was a problem hiding this comment.
lgtm, thanks for the pr
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:
containerd cannot implement credential provider to pull the pause image if not exists. Thus for network isolated cluster, whose pause image neeeds to pull from private acr, it needs to ensure the pause image always cached.
Which issue(s) this PR fixes:
Fixes #