Skip to content

Expose Azure Compute Environment's Container Registry #13754

@eerhardt

Description

@eerhardt

There are scenarios where consumers need to get access to the Azure Container Registry that an ACA or App Service Environment is going to use. For example, to set up additional roles / permissions to the ACR.

We should add a new interface that both ACA Environment Resource and App Service Environment Resource implement that exposes a method or property to retrieve the AzureContainerRegistryResource used by the compute environment. Its implementation should be the same as this method:

private IContainerRegistry? GetContainerRegistry()
{
// Check for explicit container registry reference annotation
if (this.TryGetLastAnnotation<ContainerRegistryReferenceAnnotation>(out var annotation))
{
return annotation.Registry;
}
// Fall back to default container registry
return DefaultContainerRegistry;
}

But it shouldn't be nullable. It has to return a non-null instance. If there is no annotation, and the DefaultContainerRegistry is null, an exception should be thrown.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions