Skip to content

argocd-image-updater updates image spec on changes in git source #1173

@milenpankov

Description

@milenpankov

I am using argocd-image-updater with a digest update strategy, e.g.

argocd-image-updater.argoproj.io/image-list: myapp=bcr.internal.cloud/myapprepo/myapp:test
argocd-image-updater.argoproj.io/myapp.update-strategy: digest
argocd-image-updater.argoproj.io/myapp.helm.image-spec: images.myapp.image

Everything seems to work fine and the image tag hash is updated and the deployment is restarted wherever there is a change and a new image is pushed in the registry.
However wherever there is an update in the git repository, which is the source of the ArgoCD application (for example a new commit pushed), but this change does not affect the application source path itself, the deployment is restarted and the cause seems to be the argocd-image-updater. On every git source change I see in the argocd-image-updater logs that argocd-image-updater is setting new image hash (which is actually the same as the old one) and the deployment gets restarted. It happens to all applications using argocd-image-updater annotations and the git repository as a source.
Such a behavior is not documented anywhere in the argocd-image-updater docs. Is it normal or is it a bug?
These are part of the logs wherever there is a change in the git source:

level=info msg="Setting new image to bcr.internal.cloud/myapprepo/myapp:test@sha256:273356a745f52c490e92be8b41e2b853e34d1deba1e099fdc8221a4b5b83b6d4" alias=myapp application=myapp image_name=myapprepo/myapp image_tag=dummy registry=bcr.internal.cloud
level=info msg="Successfully updated image 'bcr.internal.cloud/myapprepo/myapp:test@dummy' to 'bcr.internal.cloud/myapprepo/myapp:test@sha256:273356a745f52c490e92be8b41e2b853e34d1deba1e099fdc8221a4b5b83b6d4', but pending spec update (dry run=false)" alias=myapp application=myapp image_name=myapprepo/myapp image_tag=dummy registry=bcr.internal.cloud
level=info msg="Committing 1 parameter update(s) for application cx-data-extractor-dev" application=cx-data-extractor-dev
level=info msg="Successfully updated the live application spec" application=myapp

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions