Skip to content

feat: oras pull pause image if not cached for windows network isolated cluster#8038

Merged
fseldow merged 13 commits intomainfrom
xinhl/niwind4
Mar 16, 2026
Merged

feat: oras pull pause image if not cached for windows network isolated cluster#8038
fseldow merged 13 commits intomainfrom
xinhl/niwind4

Conversation

@fseldow
Copy link
Contributor

@fseldow fseldow commented Mar 8, 2026

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 #

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

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-PodInfraContainerImage function to networkisolatedclusterfunc.ps1 that 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-Containerd in containerdfunc.ps1, calling it when BootstrapProfileContainerRegistryServer is 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

Copilot AI review requested due to automatic review settings March 9, 2026 15:40
fseldow and others added 3 commits March 10, 2026 02:42
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 9, 2026 16:27
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 4 out of 4 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings March 11, 2026 08:45
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 4 out of 4 changed files in this pull request and generated no new comments.

@fseldow fseldow enabled auto-merge (squash) March 16, 2026 02:29
@jiashun0011
Copy link
Contributor

lgtm, thanks for the pr

auto-merge was automatically disabled March 16, 2026 04:20

Pull request was closed

@fseldow fseldow reopened this Mar 16, 2026
Copy link
Contributor

@jiashun0011 jiashun0011 left a comment

Choose a reason for hiding this comment

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

lgtm, thanks for the pr

@fseldow fseldow enabled auto-merge (squash) March 16, 2026 04:32
@fseldow fseldow merged commit 7b57ab2 into main Mar 16, 2026
45 checks passed
@fseldow fseldow deleted the xinhl/niwind4 branch March 16, 2026 05:54
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