Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get tags from Azure Container Registry #1033

Open
yavorivanov-cw opened this issue Feb 5, 2025 · 2 comments
Open

Cannot get tags from Azure Container Registry #1033

yavorivanov-cw opened this issue Feb 5, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@yavorivanov-cw
Copy link

Describe the bug
We use AKS with "integrated" ACR, we pull images without the need of pull secrets. But argocd-image-updater cannot get image tags.

time="2025-02-05T12:50:41Z" level=error msg="Could not get tags from registry: Get \"https://myregistry.azurecr.io/v2/my-app/frontend/tags/list\": unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information. CorrelationId: 9ec03127-1ad8-467b-8af4-749e6cf53fa6" alias=frontend application=my-app image_name=my-app/frontend image_tag=latest registry=myregistry.azurecr.io

we get the same error for the second image backend

To Reproduce
Create Application:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: my-app
  annotations:
    argocd-image-updater.argoproj.io/image-list: backend=myregistry.azurecr.io/my-app/backend:latest,frontend=myregistry.azurecr.io/my-app/frontend:latest
    argocd-image-updater.argoproj.io/frontend.helm.image-tag: frontend.image.tag
    argocd-image-updater.argoproj.io/backend.helm.image-tag: backend.image.tag
    argocd-image-updater.argoproj.io/frontend.update-strategy: digest
    argocd-image-updater.argoproj.io/backend.update-strategy: digest
spec:
  destination:
    namespace: my-app
    server: 'https://kubernetes.default.svc'
  project: my-app
  source:
    repoURL: '[email protected]:some-repo/my-app.git'
    targetRevision: dev
    path: deploy/app
    helm:
      releaseName: my-app
      parameters:
      - name: "backend.image.tag"
        value: "latest"
      parameters:
      - name: "frontend.image.tag"
        value: "latest"
      valueFiles:
          - ../app-values/values-dev.yaml
  syncPolicy:
    automated: {}

Expected behavior
I would expect that argocd-image-updater would be able to find the newest image and update the tags

Additional context
The only way of working was to enable Admin user in ACR and use its credentials in secret. This is not desired solution/workaround, we need to have the admin user disabled.

Version
argocd-image-updater v0.15.2+abc0072

Logs
Please paste any relevant logs here

@yavorivanov-cw yavorivanov-cw added the bug Something isn't working label Feb 5, 2025
@chengfang
Copy link
Collaborator

Looks same issue as #550

@yavorivanov-cw
Copy link
Author

Looks same issue as #550

I already tried the solution with the script but still get the same error as mentioned above. Maybe I am setting wrongly the client-id in the ServiceAccount patch?! There I used the same id that I assigned the AcrPull role. But still not sure if the issue is the same as the user tried to use secret

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants