Skip to content

ACR credential provider regex doesn't handle regional endpoints or registries w/ DNL enabled #9975

@juliusl

Description

@juliusl

This isn't tied to an active incident, I just happened to be reviewing the code and noticed the regex here:

https://github.com/kubernetes-sigs/cloud-provider-azure/blob/17dbc506a6bed9d0127ce045891fb55af012b84c/pkg/credentialprovider/azure_credentials.go#L51C1-L52C1

Needs to be updated to support ACR's regional endpoints as well as registries w/ DNL enabled.

Azure/acr#842

https://learn.microsoft.com/en-us/azure/container-registry/container-registry-get-started-portal?tabs=azure-cli#configure-domain-name-label-dnl-option

The current regex wouldn't be able to capture DNL enabled because they include a dash, and for regional endpoints there would be extra dots.

What happened:

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version):
  • Cloud provider or hardware configuration:
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Network plugin and version (if this is a network-related bug):
  • Others:

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions