argoproj-labs / argocd-image-updater

Automatic container image update for Argo CD
https://argocd-image-updater.readthedocs.io/en/stable/
Apache License 2.0
1.29k stars 265 forks source link

Argo image updater config map configuration for multiple container registry from same registry #940

Open DimitarMicevski1 opened 1 week ago

DimitarMicevski1 commented 1 week ago

Is there a way to have 2 container registry from same registry but different project? Argo image updater is having trouble to authenticate with both at the same time, it can only authenticate for one, i am trying this config map

apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-image-updater-config
  labels:
    app.kubernetes.io/name: argocd-image-updater-config
    app.kubernetes.io/part-of: argocd-image-updater

data:
  log.level: debug
  registries.conf: |
    registries:
    - name: DigitalOcean Registry 1 / Project 1
      api_url: https://registry.digitalocean.com/
      ping: yes
      credentials: pullsecret:argocd/secret1
      defaultns: library
      prefix: registry.digitalocean.com   

    - name: DigitalOcean Registry 2 / Project 2
      api_url: https://registry.digitalocean.com/
      ping: no
      credentials: pullsecret:argocd/secret2
      prefix: registry.digitalocean.com
bebosudo commented 2 days ago

See this issue and this PR

DimitarMicevski1 commented 2 days ago

@bebosudo tnx, but tryed it and does work ...

    - name: One container registry
      api_url: https://registry.digitalocean.com/refix-one
      ping: no
      credentials: pullsecret:argocd/secret-one
      prefix: registry.digitalocean.com/one-container-registry

    - name: Two container registry
      api_url: https://registry.digitalocean.com/prefix-two  
      ping: yes
      credentials: pullsecret:argocd/secret-two
      defaultns: library
      prefix: registry.digitalocean.com/two-container-registry
  and in application

argocd-image-updater.argoproj.io/image-name.registry-prefix: one-container-registry

bebosudo commented 1 day ago

Yeah I know, it isn't working for me either For now I solved it by using a single secret to pull images from multiple repos in the same registry, but I know it doesn't apply to all cases