Skip to content

fix: remove hardcode MAR endpoint in ensurePodInfraContainerImage for Network isolated cluster#8735

Open
fseldow wants to merge 5 commits into
mainfrom
xinhl/mcrfixcontinue
Open

fix: remove hardcode MAR endpoint in ensurePodInfraContainerImage for Network isolated cluster#8735
fseldow wants to merge 5 commits into
mainfrom
xinhl/mcrfixcontinue

Conversation

@fseldow

@fseldow fseldow commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:
Remove hardcode of MAR endpoint in ensurePodInfra (only implemented in network isolated cluster)

Which issue(s) this PR fixes:

Fixes #

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Removes the hardcoded mcr.microsoft.com registry base when rewriting the pause (pod infra) image for network-isolated clusters, making the replacement respect the configured MCR base for both Windows and Linux provisioning paths.

Changes:

  • Windows: update Set-PodInfraContainerImage to replace using MCRRepositoryBase (trimmed) instead of a hardcoded mcr.microsoft.com.
  • Windows: add Pester coverage for MCRRepositoryBase set/unset/trailing-slash cases.
  • Linux: update ensurePodInfraContainerImage to replace using MCR_REPOSITORY_BASE (trimmed) with ShellSpec coverage for the same cases.

Reviewed changes

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

File Description
staging/cse/windows/networkisolatedclusterfunc.ps1 Uses MCRRepositoryBase (trimmed) as the replacement source registry base when rewriting the pause image.
staging/cse/windows/networkisolatedclusterfunc.tests.ps1 Adds Pester tests validating pause image rewrite behavior with custom MCR base, default fallback, and trailing slash handling.
parts/linux/cloud-init/artifacts/cse_config.sh Uses MCR_REPOSITORY_BASE (trimmed, with default) instead of hardcoded mcr.microsoft.com for pause image rewrite.
spec/parts/linux/cloud-init/artifacts/cse_config_spec.sh Adds ShellSpec tests validating MCR_REPOSITORY_BASE behavior (set/unset/trailing slash) for pause image rewrite.

Comment thread staging/cse/windows/networkisolatedclusterfunc.tests.ps1 Outdated
Comment thread staging/cse/windows/networkisolatedclusterfunc.tests.ps1 Outdated
Comment thread staging/cse/windows/networkisolatedclusterfunc.tests.ps1 Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 18, 2026 08:54
fseldow and others added 2 commits June 18, 2026 18:54
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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 1 comment.

Comment thread staging/cse/windows/networkisolatedclusterfunc.tests.ps1 Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 18, 2026 09:04
@fseldow fseldow changed the title fix: remove hardcode mcr.microsoft.com in ensurePodInfraContainerImage fix: remove hardcode MAR endpoint in ensurePodInfraContainerImage for Network isolated cluster Jun 18, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 1 comment.

Comment thread staging/cse/windows/networkisolatedclusterfunc.tests.ps1
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