argocd-image-updater
argocd-image-updater copied to clipboard
Image tag is not updated in application spec if deploed image and image considered for update are the same.
Describe the bug Image updater does not update an image tag in the application spec of the deployed image and the image considered for update is the same although the image tag in application spec is something else which leaves the application in out of sync status in some scenarios.
To Reproduce Example:
- Set application annotation to something like this: argocd-image-updater.argoproj.io/image-list: ghcr.io/runatlantis/atlantis:~0.18 and sync your application
- The deployed image now would be 0.18.X
- Change the annotation to: argocd-image-updater.argoproj.io/image-list: ghcr.io/runatlantis/atlantis:~0.19
- The application would be updated with tag 0.19.X but not synced yet
- Don't sync the app and reset annotation to argocd-image-updater.argoproj.io/image-list: ghcr.io/runatlantis/atlantis:~0.18
- The application would stay in out of sync status and image tag would stay 0.19.X in application spec which is wrong as considered image and deployed image are the same and application should go back to synced status.
Expected behavior Expected the application to go back to synced status.
Additional context This is what I find in application manifest from ArgoCD UI even after I set the annotation to ~0.18 as per the steps above.
kustomize:
images:
- 'ghcr.io/runatlantis/atlantis:v0.19.2'
Version 0.12.0
Logs
time="2022-04-18T20:51:23Z" level=info msg="Processing results: applications=1 images_considered=1 images_skipped=0 images_updated=0 errors=0" time="2022-04-18T20:53:24Z" level=info msg="Starting image update cycle, considering 1 annotated application(s) for update" time="2022-04-18T20:53:24Z" level=debug msg="Processing application atlantis" time="2022-04-18T20:53:24Z" level=debug msg="Considering this image for update" alias= application=atlantis image_name=runatlantis/atlantis image_tag=v0.18.5 registry=ghcr.io time="2022-04-18T20:53:24Z" level=debug msg="Using version constraint '~0.18' when looking for a new tag" alias= application=atlantis image_name=runatlantis/atlantis image_tag=v0.18.5 registry=ghcr.io time="2022-04-18T20:53:25Z" level=debug msg="could not parse input tag dev as semver: Invalid Semantic Version" time="2022-04-18T20:53:25Z" level=debug msg="could not parse input tag latest as semver: Invalid Semantic Version" time="2022-04-18T20:53:25Z" level=debug msg="found 6 from 17 tags eligible for consideration" image="ghcr.io/runatlantis/atlantis:v0.18.5" time="2022-04-18T20:53:25Z" level=debug msg="Image 'ghcr.io/runatlantis/atlantis:v0.18.5' already on latest allowed version" alias= application=atlantis image_name=runatlantis/atlanti s image_tag=v0.18.5 registry=ghcr.io