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

newest-build constraint

Open dudo opened this issue 10 months ago • 1 comments

I'd love to see similar functionality to digest when using newest-build. Specifically, I'd like to lean on the latest tag, but reference a corresponding tag that's paired with it (the 40 character git sha, for instance).

Something like this:

argocd-image-updater.argoproj.io/image-list: 'app=ghcr.io/{{ .organization }}/{{ regexReplaceAll "-deployment$" .repository "" }}:latest'
argocd-image-updater.argoproj.io/app.update-strategy: newest-build
argocd-image-updater.argoproj.io/app.allow-tags: regexp:^[0-9a-f]{40}$

Then when comparing diffs, the date could be used instead of the digest.

This pic shows my use case. The newest image will often not be the image I want deployed to production.

image

dudo avatar Jan 15 '25 01:01 dudo

This comment seems relevant https://github.com/argoproj-labs/argocd-image-updater/blob/10a01f381aa7d55e9806c7e8df75fee78976cebc/registry-scanner/pkg/image/version.go#L109-L110

dudo avatar Jan 15 '25 01:01 dudo