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

Using version constraint 'latest' when looking for a new tag

Open kaikiat opened this issue 3 years ago • 1 comments

Describe the bug Hi team whenever I push a docker image to ghcr using docker push ghcr.io/kaikiat/python-docker:latest , I get the error Using version constraint 'latest' when looking for a new tag even though I have specify the update strategy to be latest

To Reproduce

  1. Define the argocd manifest file with these attributes
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  annotations:
    argocd-image-updater.argoproj.io/image-list: ntuasr=ghcr.io/kaikiat/python-docker:latest
    argocd-image-updater.argoproj.io/ntuasr.update-strategy: latest
    argocd-image-updater.argoproj.io/write-back-method: git:secret:argocd/git-creds
    argocd-image-updater.argoproj.io/git-branch: main
  1. Push an image to the registry docker push ghcr.io/kaikiat/python-docker:latest
  2. Check the logs kubectl logs argocd-image-updater-59cd8b9785-8bdq5 -n argocd -f
  3. This is the error logs
time="2022-08-13T15:27:57Z" level=debug msg="Processing application sgdecoding-online-scaled"
time="2022-08-13T15:27:57Z" level=debug msg="Considering this image for update" alias=ntuasr application=sgdecoding-online-scaled image_name=kaikiat/python-docker image_tag=latest registry=ghcr.io
time="2022-08-13T15:27:57Z" level=debug msg="Using version constraint 'latest' when looking for a new tag" alias=ntuasr application=sgdecoding-online-scaled image_name=kaikiat/python-docker image_tag=latest registry=ghcr.io
time="2022-08-13T15:27:58Z" level=info msg="Processing results: applications=1 images_considered=1 images_skipped=0 images_updated=0 errors=1"
time="2022-08-13T15:27:58Z" level=error msg="Could not get tags from registry: Get \"https://ghcr.io/v2/kaikiat/python-docker/tags/list\": unauthorized" alias=ntuasr application=sgdecoding-online-scaled image_name=kaikiat/python-docker image_tag=latest registry=ghcr.io

I wonder if anyone has any insights / solutions to this ? Thank you !

kaikiat avatar Aug 13 '22 15:08 kaikiat

Using version constraint 'latest' when looking for a new tag is not an error, it's a debug message (as indicated by the level=debug in the same line).

To always use the latest image, follow this guide; TL;DR: remove the :latest from the end of your image-list annotation.

The actual error that is likely to cause issues with your updates is this: Could not get tags from registry: Get \"https://ghcr.io/v2/kaikiat/python-docker/tags/list\": unauthorized". You do not have valid credentials to access the GitHub Container Registry, thus the lookup of a more recent image failed.

mvarendorff avatar Aug 14 '22 13:08 mvarendorff