Skip to content

fix: add credential provider config for custom cloud network isolated…#8962

Open
fseldow wants to merge 1 commit into
mainfrom
xinhl/fix-custom-cloud-ni-credential-provider
Open

fix: add credential provider config for custom cloud network isolated…#8962
fseldow wants to merge 1 commit into
mainfrom
xinhl/fix-custom-cloud-ni-credential-provider

Conversation

@fseldow

@fseldow fseldow commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

… clusters

When both AKS_CUSTOM_CLOUD_CONTAINER_REGISTRY_DNS_SUFFIX and BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER are set (custom cloud + NI), the credential provider config was missing the --registry-mirror arg because the custom cloud branch took priority over the NI branch. This caused kubelet to fail authenticating against the bootstrap ACR, resulting in ImagePullBackOff for all system pods (azure-cni-node, kube-proxy, etc.) and nodes stuck in NotReady.

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

… clusters

When both AKS_CUSTOM_CLOUD_CONTAINER_REGISTRY_DNS_SUFFIX and
BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER are set (custom cloud + NI),
the credential provider config was missing the --registry-mirror arg
because the custom cloud branch took priority over the NI branch.
This caused kubelet to fail authenticating against the bootstrap ACR,
resulting in ImagePullBackOff for all system pods (azure-cni-node,
kube-proxy, etc.) and nodes stuck in NotReady.

Co-Authored-By: Claude <noreply@anthropic.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

This PR fixes Linux CSE credential provider config generation for the “custom cloud + network isolated” case by ensuring the kubelet ACR credential provider config includes the --registry-mirror argument when both AKS_CUSTOM_CLOUD_CONTAINER_REGISTRY_DNS_SUFFIX and BOOTSTRAP_PROFILE_CONTAINER_REGISTRY_SERVER are set.

Changes:

  • Added a higher-priority branch in writeCredentialProviderConfig() to generate a combined “custom cloud + network isolated” config including --registry-mirror=<mcr base>:<bootstrap ACR>.
  • Added a ShellSpec test case covering the combined environment-variable scenario.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
parts/linux/cloud-init/artifacts/cse_config.sh Adds a dedicated config-generation branch for custom cloud + network isolated clusters so --registry-mirror is not omitted.
spec/parts/linux/cloud-init/artifacts/cse_config_spec.sh Adds regression coverage asserting the combined config (including --registry-mirror) is written as expected.

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.

2 participants