-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple aliases with same image #75
Comments
Thanks! There was indeed a logic flaw in how the images are handled. Should be fixed with #76, which will be included in v0.5.0 that's going to be released either Friday or on the upcoming weekend. |
This should be fixed in v0.5.0 - you can now specify multiple equal images with different aliases, and they will be upgraded independently. Also, image alias is now logged. Closing issue, feel free to re-open if you encounter problems. |
Hey @jannfis thanks for the update. I can certainly see that tag logging now which is very helpful. I am still seeing issues, and I'm not sure if this might be a regression from v.0.4.0 beahviour. Here's the image(s) in the registry: What I've seen overnight is the deployment continually being provided overrides to the Overnight its nearly up to 600 revisions... I actually deleted the app yday whilst testing new 0.5.0 features, so it started from revision 1. For reference my annotations are currently: argocd-image-updater.argoproj.io/image-list: asfalia=gcr.io/sopost-k8s/asfalia:~v0.1.0-0, celery=gcr.io/sopost-k8s/asfalia:~v0.1.0-0
argocd-image-updater.argoproj.io/asfalia.update-strategy: latest
argocd-image-updater.argoproj.io/asfalia.helm.image-name: image.repository
argocd-image-updater.argoproj.io/asfalia.helm.image-tag: image.tag
argocd-image-updater.argoproj.io/celery.update-strategy: latest
argocd-image-updater.argoproj.io/celery.helm.image-name: celery.image.repository
argocd-image-updater.argoproj.io/celery.helm.image-tag: celery.image.tag So the issues I'm seeing is:
On point 2 above - I have tried: argocd-image-updater.argoproj.io/asfalia.update-strategy: semver
argocd-image-updater.argoproj.io/celery.update-strategy: lsemver With that strategy, it ignored the other tags On 1 above - I think this might be a common use case to have multiple tags on an image. And certainly for me it's part of moving towards a world where we do version our image semantically, but until then I need to keep the original tagging format. {edit} - In v0.4.0 of the image updater, i used the same annotations and did not have the issue of switching between tags on the same image. It would just say the other named were not in scope ( I think ) |
Hi, thanks for the feedback! I think I forgot to document that once you use an update strategy other than You can narrow down the list using a tag name matcher, with the annotation
so in your case: argocd-image-updater.argoproj.io/asfalia.tag-match: regexp:^v0.1.0-.*$
argocd-image-updater.argoproj.io/celery.tag-match: regexp:^v0.1.0-.*$ With above annotations, the image updater will only consider tags matching the regexp for finding the latest one. I think for v0.6.0, we'll also provide a more simple I'm not sure whether it was a smart move to drop the check on the semver constraint for simplified tag matching, or whether we should keep it. Sorry for the circumstances. |
FWIW, I have update the docs: https://argocd-image-updater.readthedocs.io/en/latest/configuration/images/#always-deploy-the-latest-build |
Thanks for replying. I thought i might be using them wrong but I wasn't sure what the right combination was. Ok so semver, needs to be semver.. its easier to program around because its a defined standard. I have just updated those on my test project and that's worked perfectly now. Thanks for the regex:
I tried the regex in the docs but it did not seem to get any image results at all. Just so you know. I tried: Thank you for fixing. I have one last comment about multiple image in an application. I deleted and recreated app to to see how it upgraded from git. What happened (as you can see by 3 version)
It'd be nice if it held off and performed the updates at once, or had the option to perhaps.
(maybe not he best names - but hope that gets the idea across, update all at once, or one at a time) I might just need to test the scenario a few more times, but just feeding back what I'm seeing at the moment. Btw I think we can close this issue as resolved now, thank you for the help 🌟. |
Describe the bug
When specifying multiple images to update via the annotation with two of those images as the same docker image but for different containers in your k8s deployment. Image Updater seems to update only one instance of the image.
It does not seem to update the second alias.
To Reproduce
Using this feature here, create an application with two image to update.
Here is my example from our own Django helm chart:
What i find is the container (aso alias)
asfalia
does get updated. But thecelery
container / alias does not.Here are my helm values input for reference:
Expected behavior
Both containers should be updated at the same time when a new image is pushed to the docker registry.
Additional context
Here are some logs showing that the image-updater is aware of the image but only seems to update one of the containers.
It would be helpful if in the log output, it showed the alias name too, so you know from the log which container would have been updated.
Version
v0.4.0
Logs
See above.
Also some images in the UI showing only the main image / tag was overridden:
celery
is not updated.asfalia
is updatedThe text was updated successfully, but these errors were encountered: