argocd-image-updater icon indicating copy to clipboard operation
argocd-image-updater copied to clipboard

Could not get tags from registry: name unknown: Repository name not known to registry.

Open sharadkhoji123 opened this issue 2 years ago • 1 comments

Describe the bug We configured argocd image updater and set below annotations:- argocd-image-updater.argoproj.io/git-branch: main argocd-image-updater.argoproj.io/image-list: python-local.artifactory.int.net.com/python-qa argocd-image-updater.argoproj.io/write-back-method: git:secret:argocd/git-creds

Below are the settings for argocd-image-updater-config: apiVersion: v1 data: log.level: debug registries.conf: | registries: - name: Jfrog Container Registry api_url: https://python-local.artifactory.int.net.com prefix: artifactory.int.net.com ping: no credentials: pullsecret:argocd/jfrog-secret kind: ConfigMap metadata: labels: app.kubernetes.io/name: argocd-image-updater-config app.kubernetes.io/part-of: argocd-image-updater name: argocd-image-updater-config namespace: argocd resourceVersion: "210602174" uid: ca6ae6a5-b56d-4c34-93dd-6affb1c7cbfa

It works fine if I try using CLI:- / $ argocd-image-updater test python-local.artifactory.int.net.com/python-backend-qa --credentials env:DOCKER_HUB_CREDS DEBU[0000] Creating in-cluster Kubernetes client INFO[0000] retrieving information about image image_alias= image_name=python-local.artifactory.int.net.com/python-backend-qa registry_url=python-local.artifactory.int.net.com DEBU[0000] setting rate limit to 20 requests per second prefix=python-local.artifactory.int.net.com registry="https://python-local.artifactory.int.net.com" DEBU[0000] Inferred registry from prefix python-local.artifactory.int.net.com to use API https://python-local.artifactory.int.net.com INFO[0000] Fetching available tags and metadata from registry application=test image_alias= image_name=python-local.artifactory.int.net.com/python-backend-qa registry_url=python-local.artifactory.int.net.com INFO[0000] Found 2 tags in registry application=test image_alias= image_name=python-local.artifactory.int.net.com/python-backend-qa registry_url=python-local.artifactory.int.net.com DEBU[0000] found 2 from 2 tags eligible for consideration image=python-local.artifactory.int.net.com/python-backend-qa INFO[0000] latest image according to constraint is python-local.artifactory.int.net.com/python-backend-qa:v19.0 application=test image_alias= image_name=python-local.artifactory.int.net.com/python-backend-qa registry_url=python-local.artifactory.int.net.com

Please help in the issue, what is I am missing here.

To Reproduce Steps to reproduce the behavior: Try configuring Jfrog private repository with argocd image updater Expected behavior Pull the new tags uploaded in the Jfrog image artifactory

Additional context Add any other context about the problem here.

Version Argocd: v2.8.0+804d4b8

Logs Below are the errors we are hitting in argocd image updater pod log: [root@nesc-cluster-poc argocd]# k logs -f argocd-image-updater-84ffbd4747-l9pbj -n argocd time="2023-08-24T17:04:28Z" level=info msg="argocd-image-updater v0.12.0+aee153d starting [loglevel:DEBUG, interval:2m0s, healthport:8080]" time="2023-08-24T17:04:28Z" level=warning msg="commit message template at /app/config/commit.template does not exist, using default" time="2023-08-24T17:04:28Z" level=debug msg="Successfully parsed commit message template" time="2023-08-24T17:04:28Z" level=debug msg="rate limiting is disabled" prefix=artifactory.int.net.com registry="https://python-local.artifactory.int.net.com" time="2023-08-24T17:04:28Z" level=info msg="Loaded 1 registry configurations from /app/config/registries.conf" time="2023-08-24T17:04:28Z" level=debug msg="Creating in-cluster Kubernetes client" time="2023-08-24T17:04:28Z" level=info msg="ArgoCD configuration: [apiKind=kubernetes, server=argocd-server.argocd, auth_token=false, insecure=false, grpc_web=false, plaintext=false]" time="2023-08-24T17:04:28Z" level=info msg="Starting health probe server TCP port=8080" time="2023-08-24T17:04:28Z" level=info msg="Starting metrics server on TCP port=8081" time="2023-08-24T17:04:28Z" level=info msg="Warming up image cache" time="2023-08-24T17:04:28Z" level=debug msg="Processing application p2c" time="2023-08-24T17:04:28Z" level=debug msg="Considering this image for update" alias= application=p2c image_name=python-backend-qa image_tag=v18.0 registry=python-local.artifactory.int.net.com time="2023-08-24T17:04:28Z" level=debug msg="setting rate limit to 20 requests per second" prefix=python-local.artifactory.int.net.com registry="https://python-local.artifactory.int.net.com" time="2023-08-24T17:04:28Z" level=debug msg="Inferred registry from prefix python-local.artifactory.int.net.com to use API https://python-local.artifactory.int.net.com" time="2023-08-24T17:04:28Z" level=debug msg="Using no version constraint when looking for a new tag" alias= application=p2c image_name=python-backend-qa image_tag=v18.0 registry=python-local.artifactory.int.net.com time="2023-08-24T17:04:28Z" level=error msg="Could not get tags from registry: name unknown: Repository name not known to registry." alias= application=p2c image_name=python-backend-qa image_tag=v18.0 registry=python-local.artifactory.int.net.com time="2023-08-24T17:04:28Z" level=info msg="Finished cache warm-up, pre-loaded 0 meta data entries from 3 registries" time="2023-08-24T17:04:28Z" level=info msg="Starting image update cycle, considering 1 annotated application(s) for update" time="2023-08-24T17:04:28Z" level=debug msg="Processing application p2c" time="2023-08-24T17:04:28Z" level=debug msg="Considering this image for update" alias= application=p2c image_name=python-backend-qa image_tag=v18.0 registry=python-local.artifactory.int.net.com time="2023-08-24T17:04:28Z" level=debug msg="Using no version constraint when looking for a new tag" alias= application=p2c image_name=python-backend-qa image_tag=v18.0 registry=python-local.artifactory.int.net.com time="2023-08-24T17:04:28Z" level=error msg="Could not get tags from registry: name unknown: Repository name not known to registry." alias= application=p2c image_name=python-backend-qa image_tag=v18.0 registry=python-local.artifactory.int.net.com time="2023-08-24T17:04:28Z" level=info msg="Processing results: applications=1 images_considered=1 images_skipped=0 images_updated=0 errors=1"

sharadkhoji123 avatar Aug 24 '23 17:08 sharadkhoji123

The issue is resolved now, we made following change in prefix under config map: Before prefix: artifactory.int.net.com After: prefix: python-local.artifactory.int.net.com

sharadkhoji123 avatar Aug 25 '23 10:08 sharadkhoji123