Skip to content

Fix AKS AcrPull for existing cross-resource-group registries - #20919

Merged
Mitch Denny (mitchdenny) merged 22 commits into
mainfrom
mitchdenny-aks-cross-group-acr
Oct 16, 2026
Merged

Mitch Denny (mitchdenny) merged 22 commits into
mainfrom
mitchdenny-aks-cross-group-acr

Conversation

@mitchdenny

@mitchdenny Mitch Denny (mitchdenny) commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Description

Fixes #18277.

AKS can now pull application images from an existing ACR in another resource group or subscription using role assignments at the actual registry scope. No new public API or dependency is introduced.

Following review feedback, the cluster now uses separate pre-created user-assigned identities for the control plane and kubelets. Standard Azure role preparation grants kubelet AcrPull on the selected registry and control-plane Managed Identity Operator on the kubelet identity. For environment and node-pool WithSubnet selections, the control plane receives Network Contributor on the selected virtual networks. AKS manages its normal control-plane permissions in the node resource group.

The assignments precede cluster creation in both Aspire's deployment pipeline and generated main.bicep. Registry selection is resolved after model configuration, preparation is idempotent, excluded environments create no identities, and explicit resource scopes take precedence over existing-resource annotation scopes. Both identities inherit the cluster's final deployment scope, including scope selected through infrastructure callbacks. AKS-specific security remarks were moved out of generic AsExisting documentation into the AKS README.

User-facing usage

C#:

var registry = builder.AddAzureContainerRegistry("registry")
    .PublishAsExisting("myregistry", "registry-resource-group");

builder.AddAzureKubernetesEnvironment("aks")
    .WithContainerRegistry(registry);

TypeScript:

const registry = await builder.addAzureContainerRegistry("registry");
await registry.publishAsExisting("myregistry", { resourceGroup: "registry-resource-group" });

const aks = await builder.addAzureKubernetesEnvironment("aks");
await aks.withContainerRegistry(registry);

Breaking changes

Existing AKS deployments transition from a system-assigned control-plane identity and AKS-created kubelet identity to the new user-assigned identities. Kubelet identity changes can upgrade node pools and disrupt workloads; schedule the migration appropriately. Custom permissions are not transferred automatically, and the control plane can continue using its previous identity while cached tokens expire. The README describes the migration and required permission handling. Existing-cluster migration has not been live-validated.

Security considerations

Only the kubelet identity receives registry AcrPull; the control-plane identity does not receive registry access. No ACR administrator credentials or image-pull secrets are introduced. AcrPull is registry-wide and requires RBAC Registry Permissions mode, not ABAC Repository Permissions mode. A separate kubelet UAMI does not isolate its IMDS tokens from workloads; Workload Identity alone does not block this access. External registry role assignments still require separate cleanup after aspire destroy. Additional customized external networking/DNS resources require corresponding control-plane permissions. Formal security review has not been performed.

Validation

  • dotnet test --project tests/Aspire.Hosting.Azure.Kubernetes.Tests/Aspire.Hosting.Azure.Kubernetes.Tests.csproj --no-launch-profile -- --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true' — 124 passed at 833f64395c, including final cluster-scope inheritance coverage.
  • dotnet test --project tests/Aspire.Hosting.Azure.Tests/Aspire.Hosting.Azure.Tests.csproj --no-launch-profile -- --filter-not-trait 'quarantined=true' --filter-not-trait 'outerloop=true' — 1,946 passed, 5 skipped at 693435bb65.
  • dotnet build tests/Aspire.Deployment.EndToEnd.Tests/Aspire.Deployment.EndToEnd.Tests.csproj --no-restore --verbosity quiet — passed, no warnings or errors, after the final scope correction.
  • Generated literal cross-group and parameterized cross-subscription main.bicep templates compiled with Azure CLI Bicep. The new complete scoped-cluster snapshot bundles also compiled using az bicep build --file <bundle>/main.bicep for both literal and parameter-valued cluster scopes. Only unused standard provisioning-parameter warnings were reported. Cross-subscription behavior and custom cluster scope have artifact coverage, not live deployment coverage.
  • Azure E2E run 38328663624 — failed before deployment: the generated AppHost omitted suppression of ASPIREAZURE003 for experimental Azure networking APIs. Commit e499003d6b adds the suppression and an explicit AppHost build so compilation failures fail promptly.
  • Azure E2E run 38333538328 at e499003d6b — passed. Downloaded TRX confirms the deployment scenario executed and passed in 12m46s.
  • The E2E uses an external private ACR and a custom VNet, checks the complete direct role sets for both identities (including AKS-managed node-group Contributor), verifies private-image pulls and an HTTP response, repeats deployment to verify identity and assignment stability, then destroys the application and confirms the external registry survives before final cleanup.
  • gh workflow run deployment-tests.yml --repo microsoft/aspire --ref mitchdenny-aks-cross-group-acr -f pr_number=20919 -f test_filter=AksCrossResourceGroupRegistryDeploymentTests — passed at 833f64395c: Azure E2E run 38336886787. Downloaded TRX confirms the actual deployment test passed in 12m11s, including repeat deployment and resource-group cleanup.
  • gh workflow run deployment-tests.yml --repo microsoft/aspire --ref mitchdenny-aks-cross-group-acr -f pr_number=20919 — completed, overall failed at current head 100128e96e: Full deployment E2E run 38339704524. All 54 deployment matrix jobs ran; 53 jobs succeeded and one failed. Downloaded and inspected every job's TRX: 60 tests passed, 1 failed, 1 skipped, with no missing result files. All AKS, ACA, scoped-resource, and run-mode role-assignment scenarios passed.
  • The sole failure is FoundryDotnetProjectDeploymentTests: deployment, hosted agent version checks, and published image verification succeeded, but constructing the response client at FoundryDotnetProjectDeploymentTests.cs:117 threw MissingMethodException for OpenAI.Responses.ResponsesClient(ClientPipeline, OpenAIClientOptions) from Azure.AI.Extensions.OpenAI.ProjectResponsesClient. This is an SDK binary-compatibility failure after provisioning; the Foundry test and dependency manifests are unchanged by this PR. It has not been fixed or rerun here.
  • AzureConnectorNamespaceDeploymentTests was skipped by its existing environment gate: the deployment environment lacks required Connector Namespace preview enrollment. The job ran successfully but did not execute the deployment scenario.
  • Run 38217840141 passed for the earlier scoped-role spike; it does not validate this UAMI refactor.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: aa93f73f-c514-4794-8eb1-6522875bf176
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: aa93f73f-c514-4794-8eb1-6522875bf176
Preserve deployment state for Aspire teardown in the isolated test workspace.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: aa93f73f-c514-4794-8eb1-6522875bf176
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20919

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20919"

@aspire-repo-bot
aspire-repo-bot Bot requested a balanced review from Copilot October 12, 2026 06:27
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #20919...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@github-actions github-actions Bot added the area-integrations Issues pertaining to Aspire Integrations packages label Oct 12, 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.

🟡 Changes recommended

The externally scoped role assignment survives aspire destroy, leaving stale RBAC and potentially blocking redeployment.

1 open finding
What changed in this PR

Fixes AKS AcrPull assignments for existing ACRs in another resource group by emitting a separately scoped Bicep module.

Changes:

  • Adds cross-scope role-assignment generation and ordering.
  • Adds unit, snapshot, pipeline, and live Azure deployment coverage.
  • Documents cross-resource-group registry usage.
File Description
src/​Aspire.Hosting.Azure.Kubernetes/​AzureKubernetesEnvironmentExtensions.cs Generates scoped AcrPull modules.
src/​Aspire.Hosting.Azure.Kubernetes/​README.md Documents existing ACR usage.
tests/​Aspire.Deployment.EndToEnd.Tests/​AksCrossResourceGroupRegistryDeploymentTests.cs Adds live cross-group deployment coverage.
tests/​Aspire.Hosting.Azure.Kubernetes.Tests/​AzureKubernetesEnvironmentExtensionsTests.cs Tests scope and mode behavior.
tests/​Aspire.Hosting.Azure.Kubernetes.Tests/​AzureKubernetesInfrastructureTests.cs Tests pipeline ordering.
tests/​Aspire.Hosting.Azure.Kubernetes.Tests/​Snapshots/​AzureKubernetesInfrastructureTests.CrossGroupRegistryRoleProvisioningPrecedesHelmDeployment.verified.txt Captures dependency graph.
tests/​Aspire.Hosting.Azure.Kubernetes.Tests/​Snapshots/​AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_UnscopedExistingRegistryKeepsInlineRole.verified.bicep Captures unscoped behavior.
tests/​Aspire.Hosting.Azure.Kubernetes.Tests/​Snapshots/​AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_RunModePreservesInlineRole.verified.bicep Captures run-mode behavior.
tests/​Aspire.Hosting.Azure.Kubernetes.Tests/​Snapshots/​AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_CrossResourceGroupPublishesScopedKubeletRole_parameterizedScope=True#00.verified.bicep Captures parameterized main module.
tests/​Aspire.Hosting.Azure.Kubernetes.Tests/​Snapshots/​AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_CrossResourceGroupPublishesScopedKubeletRole_parameterizedScope=True#01.verified.bicep Captures parameterized AKS module.
tests/​Aspire.Hosting.Azure.Kubernetes.Tests/​Snapshots/​AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_CrossResourceGroupPublishesScopedKubeletRole_parameterizedScope=True#02.verified.bicep Captures parameterized role module.
tests/​Aspire.Hosting.Azure.Kubernetes.Tests/​Snapshots/​AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_CrossResourceGroupPublishesScopedKubeletRole_parameterizedScope=True#03.verified.bicep Captures parameterized registry module.
tests/​Aspire.Hosting.Azure.Kubernetes.Tests/​Snapshots/​AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_CrossResourceGroupPublishesScopedKubeletRole_parameterizedScope=False#00.verified.bicep Captures literal main module.
tests/​Aspire.Hosting.Azure.Kubernetes.Tests/​Snapshots/​AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_CrossResourceGroupPublishesScopedKubeletRole_parameterizedScope=False#01.verified.bicep Captures literal AKS module.
tests/​Aspire.Hosting.Azure.Kubernetes.Tests/​Snapshots/​AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_CrossResourceGroupPublishesScopedKubeletRole_parameterizedScope=False#02.verified.bicep Captures literal role module.
tests/​Aspire.Hosting.Azure.Kubernetes.Tests/​Snapshots/​AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_CrossResourceGroupPublishesScopedKubeletRole_parameterizedScope=False#03.verified.bicep Captures literal registry module.

🧠 Review effort: Balanced

Log the expected principal and returned assignments so deployment failures retain actionable RBAC evidence.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: aa93f73f-c514-4794-8eb1-6522875bf176
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #20919...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

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.

🔵 Needs a closer look

Destroy leaves the external role assignment behind, causing AKS recreation to reuse an immutable assignment ID with a different principal.

1 open finding

🧠 Review effort: Balanced

A subshell cannot wait for the parent shell port-forward process. Keep wait in the command shell with a brace group.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: aa93f73f-c514-4794-8eb1-6522875bf176
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #20919...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

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.

🔵 Needs a closer look

aspire destroy leaves the externally scoped AcrPull role assignment orphaned after deleting AKS.

1 open finding
Previously missed (1)

In code that hasn't changed since last review

Medium severity Avoid hard-coded port in deployment test

tests/​Aspire.Deployment.EndToEnd.Tests/​AksCrossResourceGroupRegistryDeploymentTests.cs:142

The hard-coded host port can make this deployment test fail when port 18080 is already occupied. Allocate an available loopback port and interpolate it into both the kubectl port-forward and curl commands, as AksPersistentVolumeDeploymentTests.GetAvailablePort() does.

🧠 Review effort: Balanced

@mitchdenny
Mitch Denny (mitchdenny) marked this pull request as ready for review October 12, 2026 10:29
Share existing-resource remarks across AsExisting and PublishAsExisting resource-group surfaces, and explain AKS registry-wide pull access, IMDS isolation, and external assignment cleanup in the README.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: aa93f73f-c514-4794-8eb1-6522875bf176
@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: de26b94e-818b-43a7-ae02-6f6be2ddca94
Make role deployment wait for its target resource so callback-configured scopes are resolved before provisioning. Add a frozen system-assigned AKS baseline and verify upgrade to separate managed identities and external-registry image pulls. Remove the redundant AppHost prebuild now that the test uses AddDotnetProject.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: de26b94e-818b-43a7-ae02-6f6be2ddca94
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #20919...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

Preserve the separate AKS identities while adopting main's typed ingress profile and updated provisioning API versions.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: de26b94e-818b-43a7-ae02-6f6be2ddca94
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #20919...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@github-actions

This comment has been minimized.

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.

🔵 Needs a closer look

Security-sensitive identity and RBAC changes, including an existing-cluster migration not live-validated, require human review.

1 open finding
1 resolved since last review

🧠 Review effort: Balanced

Use short RG-scoped physical cluster and network names and isolate fresh and upgrade scenarios by resource group.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: de26b94e-818b-43a7-ae02-6f6be2ddca94
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployment tests starting on PR #20919...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

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.

🔵 Needs a closer look

The changes require final human review because they are too complex or risky for automated approval.

1 open finding

🧠 Review effort: Balanced

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Review findings: 1 correctness issue (P2), documented inline.

Validation: 22 focused shared Azure regressions and 16 focused AKS regressions passed locally. Inspected the current-head deployment TRX from run 38819691848: both fresh deployment and legacy-cluster upgrade passed. A broader shared Azure run passed 111 tests and failed 8 because existing verified snapshots contain CRLF line endings.

Retain target provisioning dependencies for role scope resolution without propagating grants held by that target. Cover reciprocal managed-identity grants and update the AKS dependency snapshots.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: de26b94e-818b-43a7-ae02-6f6be2ddca94
@github-actions

This comment has been minimized.

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.

🔵 Needs a closer look

The changes require final human review because they are too complex or risky for automated approval.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

13 / 99 PR test projects · 3 PR jobs, from 81 changed files.

Selected PR test projects (13 / 99)

Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Azure.Kusto.Tests, Aspire.Hosting.Azure.Provisioning.Tests, Aspire.Hosting.Azure.Tests, Aspire.Hosting.Blazor.Tests, Aspire.Hosting.CodeGeneration.TypeScript.Tests, Aspire.Hosting.Docker.Tests, Aspire.Hosting.Dotnet.Tests, Aspire.Hosting.Foundry.Tests, Aspire.Hosting.Radius.Tests, Aspire.Hosting.Tests, Aspire.Playground.Tests, Infrastructure.Tests

Selected PR jobs (3)

extension-e2e, polyglot, typescript-api-compat


How these were chosen — grouped by what changed

⚠️ 12 of the 13 selected test projects come from a single change — src/Aspire.Hosting.Azure/Aspire.Hosting.Azure.csproj.

🔧 src/Aspire.Hosting.Azure/Aspire.Hosting.Azure.csproj (changed source)
→ 2 directly: Aspire.Hosting.Azure.Tests, Infrastructure.Tests
→ 10 via the project graph: Aspire.Hosting.Azure.Kusto.Tests (2 hops), Aspire.Hosting.Azure.Provisioning.Tests (2 hops), Aspire.Hosting.Blazor.Tests (3 hops), Aspire.Hosting.CodeGeneration.TypeScript.Tests (2 hops), Aspire.Hosting.Docker.Tests (2 hops), Aspire.Hosting.Dotnet.Tests (3 hops), Aspire.Hosting.Foundry.Tests (2 hops), Aspire.Hosting.Radius.Tests (3 hops), Aspire.Hosting.Tests (2 hops), Aspire.Playground.Tests (2 hops)

🔧 src/Aspire.Hosting.Azure.Kubernetes/AzureKubernetesEnvironmentExtensions.cs (changed source)
→ 2 directly: Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Azure.Tests

🔧 src/Aspire.Hosting.Azure.Kubernetes/AzureKubernetesEnvironmentResource.cs (changed source)
→ 2 directly: Aspire.Hosting.Azure.Kubernetes.Tests, Aspire.Hosting.Azure.Tests

🔧 src/Aspire.Hosting.Azure/AzureProvisioningResource.cs (changed source)
→ 1 directly: Aspire.Hosting.Azure.Tests

🔧 src/Aspire.Hosting.Azure/AzurePublishingContext.cs (changed source)
→ 1 directly: Aspire.Hosting.Azure.Tests

🔧 src/Aspire.Hosting.Azure/AzureResourcePreparer.cs (changed source)
→ 1 directly: Aspire.Hosting.Azure.Tests

🔧 src/Aspire.Hosting.Azure/ExistingAzureResourceExtensions.cs (changed source)
→ 1 directly: Aspire.Hosting.Azure.Tests

🔧 src/Aspire.Hosting.Azure/Provisioning/Provisioners/BicepProvisioner.cs (changed source)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/AzureKubernetesEnvironmentExtensionsTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/AzureKubernetesInfrastructureTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.AddLoadBalancer_BicepEnablesIngressProfileAndUsesPreviewApi.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.ClusterScope_IsInheritedByIdentitiesAndOperatorRole_configuredScope=False#00.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.ClusterScope_IsInheritedByIdentitiesAndOperatorRole_configuredScope=False#01.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.ClusterScope_IsInheritedByIdentitiesAndOperatorRole_configuredScope=False#02.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.ClusterScope_IsInheritedByIdentitiesAndOperatorRole_configuredScope=False#03.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.ClusterScope_IsInheritedByIdentitiesAndOperatorRole_configuredScope=False#04.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.ClusterScope_IsInheritedByIdentitiesAndOperatorRole_configuredScope=False#05.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.ClusterScope_IsInheritedByIdentitiesAndOperatorRole_configuredScope=False#06.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.ClusterScope_IsInheritedByIdentitiesAndOperatorRole_configuredScope=True#00.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.ClusterScope_IsInheritedByIdentitiesAndOperatorRole_configuredScope=True#01.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.ClusterScope_IsInheritedByIdentitiesAndOperatorRole_configuredScope=True#02.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.ClusterScope_IsInheritedByIdentitiesAndOperatorRole_configuredScope=True#03.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.ClusterScope_IsInheritedByIdentitiesAndOperatorRole_configuredScope=True#04.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.ClusterScope_IsInheritedByIdentitiesAndOperatorRole_configuredScope=True#05.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.ClusterScope_IsInheritedByIdentitiesAndOperatorRole_configuredScope=True#06.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.RegistryAndSubnetCallbacks_ApplyFinalScopeToRoleModules_parameterizedScope=False#00.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.RegistryAndSubnetCallbacks_ApplyFinalScopeToRoleModules_parameterizedScope=False#01.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.RegistryAndSubnetCallbacks_ApplyFinalScopeToRoleModules_parameterizedScope=False#02.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.RegistryAndSubnetCallbacks_ApplyFinalScopeToRoleModules_parameterizedScope=False#03.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.RegistryAndSubnetCallbacks_ApplyFinalScopeToRoleModules_parameterizedScope=False#04.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.RegistryAndSubnetCallbacks_ApplyFinalScopeToRoleModules_parameterizedScope=False#05.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.RegistryAndSubnetCallbacks_ApplyFinalScopeToRoleModules_parameterizedScope=False#06.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.RegistryAndSubnetCallbacks_ApplyFinalScopeToRoleModules_parameterizedScope=False#07.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.RegistryAndSubnetCallbacks_ApplyFinalScopeToRoleModules_parameterizedScope=False#08.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.RegistryAndSubnetCallbacks_ApplyFinalScopeToRoleModules_parameterizedScope=True#00.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.RegistryAndSubnetCallbacks_ApplyFinalScopeToRoleModules_parameterizedScope=True#01.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.RegistryAndSubnetCallbacks_ApplyFinalScopeToRoleModules_parameterizedScope=True#02.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.RegistryAndSubnetCallbacks_ApplyFinalScopeToRoleModules_parameterizedScope=True#03.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.RegistryAndSubnetCallbacks_ApplyFinalScopeToRoleModules_parameterizedScope=True#04.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.RegistryAndSubnetCallbacks_ApplyFinalScopeToRoleModules_parameterizedScope=True#05.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.RegistryAndSubnetCallbacks_ApplyFinalScopeToRoleModules_parameterizedScope=True#06.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.RegistryAndSubnetCallbacks_ApplyFinalScopeToRoleModules_parameterizedScope=True#07.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.RegistryAndSubnetCallbacks_ApplyFinalScopeToRoleModules_parameterizedScope=True#08.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_CrossResourceGroupPublishesScopedKubeletRole_parameterizedScope=False#00.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_CrossResourceGroupPublishesScopedKubeletRole_parameterizedScope=False#01.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_CrossResourceGroupPublishesScopedKubeletRole_parameterizedScope=False#02.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_CrossResourceGroupPublishesScopedKubeletRole_parameterizedScope=False#03.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_CrossResourceGroupPublishesScopedKubeletRole_parameterizedScope=False#04.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_CrossResourceGroupPublishesScopedKubeletRole_parameterizedScope=False#05.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_CrossResourceGroupPublishesScopedKubeletRole_parameterizedScope=False#06.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_CrossResourceGroupPublishesScopedKubeletRole_parameterizedScope=True#00.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_CrossResourceGroupPublishesScopedKubeletRole_parameterizedScope=True#01.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_CrossResourceGroupPublishesScopedKubeletRole_parameterizedScope=True#02.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_CrossResourceGroupPublishesScopedKubeletRole_parameterizedScope=True#03.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_CrossResourceGroupPublishesScopedKubeletRole_parameterizedScope=True#04.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_CrossResourceGroupPublishesScopedKubeletRole_parameterizedScope=True#05.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_CrossResourceGroupPublishesScopedKubeletRole_parameterizedScope=True#06.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_RunModeDoesNotProvisionClusterIdentities.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesEnvironmentExtensionsTests.WithContainerRegistry_UnscopedExistingRegistryUsesKubeletIdentity.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Kubernetes.Tests/Snapshots/AzureKubernetesInfrastructureTests.CrossGroupRegistryRoleProvisioningPrecedesHelmDeployment.verified.txt (changed test)
→ 1 directly: Aspire.Hosting.Azure.Kubernetes.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/AzureBicepProvisionerTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/AzureEnvironmentResourceTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/AzureResourcePreparerTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/ResourceNameHelpersTests.cs (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureDeployerTests.Diagnostics_CrossScopeAcrPullRoleModulesPrecedeTargetedWorkloadProvisioning.verified.txt (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureEnvironmentResourceTests.AzurePublishingContext_BoundsDeploymentNamesWithoutChangingLogicalNames.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureResourcePreparerTests.ExplicitResourceScopeIsPreservedForResourceAndRoleAssignments_operation=Publish#00.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureResourcePreparerTests.ExplicitResourceScopeIsPreservedForResourceAndRoleAssignments_operation=Publish#01.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureResourcePreparerTests.ExplicitResourceScopeIsPreservedForResourceAndRoleAssignments_operation=Run#00.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureResourcePreparerTests.ExplicitResourceScopeIsPreservedForResourceAndRoleAssignments_operation=Run#01.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureResourcePreparerTests.InfrastructureCallbackScopeIsPropagatedToPreparedRoleResources_operation=Publish_parameterizedScope=False#00.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureResourcePreparerTests.InfrastructureCallbackScopeIsPropagatedToPreparedRoleResources_operation=Publish_parameterizedScope=False#01.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureResourcePreparerTests.InfrastructureCallbackScopeIsPropagatedToPreparedRoleResources_operation=Publish_parameterizedScope=True#00.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureResourcePreparerTests.InfrastructureCallbackScopeIsPropagatedToPreparedRoleResources_operation=Publish_parameterizedScope=True#01.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureResourcePreparerTests.InfrastructureCallbackScopeIsPropagatedToPreparedRoleResources_operation=Run_parameterizedScope=False#00.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureResourcePreparerTests.InfrastructureCallbackScopeIsPropagatedToPreparedRoleResources_operation=Run_parameterizedScope=False#01.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureResourcePreparerTests.InfrastructureCallbackScopeIsPropagatedToPreparedRoleResources_operation=Run_parameterizedScope=True#00.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/AzureResourcePreparerTests.InfrastructureCallbackScopeIsPropagatedToPreparedRoleResources_operation=Run_parameterizedScope=True#01.verified.bicep (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

🧪 tests/Aspire.Hosting.Azure.Tests/Snapshots/ResourceNameHelpersTests.ShortenedNamesAreStable.verified.txt (changed test)
→ 1 directly: Aspire.Hosting.Azure.Tests

Job reasons

Job Triggered by
extension-e2e affected project Aspire.Hosting.Azure.Functions
polyglot • affected project Aspire.Hosting.Azure.Kubernetes
• affected project Aspire.Hosting.Azure.Provisioning.ContainerService
typescript-api-compat affected project Aspire.Hosting.Azure.Kubernetes

Selection computed for commit 0ac1a14.

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.

🔵 Needs a closer look

Identity migration and cross-scope security permissions warrant final human review.

0 open findings

🧠 Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Pull request created: #1900

Generated by PR Documentation Check · copilot · auto · 89.8 AIC · ⌖ 26.7 AIC · ⊞ 20.4K

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

📝 Documentation has been drafted in microsoft/aspire.dev#1900 targeting release/17.0.

Updated the AKS hosting integration reference (integrations/cloud/azure/aks/index.mdx) to document the cross-resource-group registry fix. Triggered signals: integration_readme_changed (README added "Existing container registries" and "Cluster identities and permissions" sections, mirrored here), pr_label_breaking_change and pr_body_has_breaking_change_marker-adjacent content (new "Updating existing clusters" caution documents the control-plane/kubelet identity migration), pr_body_has_user_facing_section (new "Use an existing container registry" section reproduces the WithContainerRegistry/PublishAsExisting C#/TypeScript usage example from the PR body), and pr_body_has_cli_flag_mention (covered incidentally via existing aspire destroy behavior notes, no new CLI flags were introduced). Added sections: existing-registry usage and AcrPull scoping/destroy caveats, a cluster identities/permissions table (kubelet AcrPull, control-plane Managed Identity Operator/Network Contributor), and a breaking-change callout for migrating pre-existing clusters.

Note

This draft PR needs human review before merging.

Comment on lines +587 to +589
// Azure.Provisioning's ModuleImport does not expose or emit dependsOn. Extend its compiled
// body so parameter, scope, and name generation remain owned by the provisioning SDK.
private sealed class DependencyAwareModuleImport(string identifier, string path) : ModuleImport(identifier, path)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Mitch Denny (@mitchdenny) - should we log an issue in the Azure SDK for this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-integrations Issues pertaining to Aspire Integrations packages breaking-change Issue or PR that represents a breaking API or functional change over a prerelease.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AKS environment does not support AcrPull for a cross-resource-group existing ACR

4 participants