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

Image tag not updated if application default values are updated

Open m-yosefpor opened this issue 3 years ago • 0 comments

Describe the bug

Image tag not updated if application is updated with argocd --upsert.

To Reproduce

We have an image with these tags v0.1.0, v0.1.1, v0.1.2

We have a helm chart with .image.tag=v0.1.0 default value. We create an argocd app with the chart and it syncs correctly (with default image.tag=v0.1.0). Then image updater finds the v0.1.2 as latest update available and updates the params image.tag=v.0.1.2 and we sync it to latest tag. so far so good.

Now we use argocd app create --upsert -f apps.yaml to update some app parameters, it overrides all the parameters including the image.tag updated by image-updater, and argocd shows a diff +v0.1.0 -v0.1.2`. However it remains in this state and image-updater no longer updates this updated application param with correct tag.

time="2022-03-08T14:37:31Z" level=debug msg="Image 'image-registry.openshift-image-registry.svc:5000/snappdoctor-search/search-cron:v0.1.2' already on latest allowed version" alias=cron application=snappdoctor-search image_name=snappdoctor-search/search-cron image_tag=v0.1.2 registry="image-registry.openshift-image-registry.svc:5000"

However the application parameters still show image.tag is set to v0.1.0 (default helm value created with app) and argocd still wants to rollback the version (showing diff). I think the image-updater only checks the already deployed image, and sees the version deployed is v0.1.2 == latest find version and does nothing.

Expected behavior

Image updater should check argocd helm value tag (argocd-image-updater.argoproj.io/webserver.helm.image-tag or image.tag by default) and see if it matches the latest version found in registry. If it is not the same, it should override the param in application again.

Additional context Add any other context about the problem here.

Version Please tell us about the version you encountered the issue with:

image updater: v0.11.3 argocd: v2.2.5

Logs

time="2022-03-08T14:37:31Z" level=debug msg="Image 'image-registry.openshift-image-registry.svc:5000/snappdoctor-search/search-cron:v0.1.2' already on latest allowed version" alias=cron application=snappdoctor-search image_name=snappdoctor-search/search-cron image_tag=v0.1.2 registry="image-registry.openshift-image-registry.svc:5000"

m-yosefpor avatar Mar 08 '22 14:03 m-yosefpor