Comments (6)
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.
from argocd-image-updater.
FWIW, I have update the docs: https://argocd-image-updater.readthedocs.io/en/latest/configuration/images/#always-deploy-the-latest-build
from argocd-image-updater.
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.
from argocd-image-updater.
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.
Basically, The images I'm using have 2 or 3 tags, it would seem that the image updater keeps seeing the tags from the same image as newer than each other.
Here's the image(s) in the registry:
What I've seen overnight is the deployment continually being provided overrides to the new
image tag.
eg. from v0.1.0-6e573a9c7455d88bf16c46638f299bbf3bf08b41
to cache
to 6e573a9c7455d88bf16c46638f299bbf3bf08b41
and so on:
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:
- Its cycling through the same docker image, with the varying tags associated.
- It doesn't seem to be respecting the semantic format tags only, I though it would discard the other tags.
- Does the image update update both images at once, so 1 deployment update, or will it set one container in a pod, then another (2 deployments?) - Sorry I can't tell, still have debug logs one, which I might turn off to see the logging improvements in info mode.
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 cache
and 6e573a9c7455d88bf16c46638f299bbf3bf08b41
, however i found that it was updating to older versions as I assume after v0.1.0-
its the evalutaing the githash alphabetically at that point.
So in that instance I found that image updater updated to the tag v0.1.0-fa5b97f04326847ffb0fc48f063ce089be18e7c4
which is actually 3 days older than the most recent image.
I am probably not using semver correctly here, I probably would need to move to something incremental in that scenario I think. Your advice very welcome though.
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 )
from argocd-image-updater.
Hi, thanks for the feedback!
I think I forgot to document that once you use an update strategy other than semver
, the constraint on semantic version specified in the images to update is not taken into account anymore, because ultimately we support any tag for the other update strategies.
You can narrow down the list using a tag name matcher, with the annotation
argocd-image-updater.argoproj.io/<image_name>.tag-match: regexp:<regexp>
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 glob
matcher func.
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.
from argocd-image-updater.
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.
Using latest
in combination with regex annotation allows me to craft something a but more bespoke when I'm not using a standard versioning system, but more limiting features because all bespoke standards can't be imagined and handled in one go.
I have just updated those on my test project and that's worked perfectly now. Thanks for the regex:
argocd-image-updater.argoproj.io/image-list: asfalia=gcr.io/sopost-k8s/asfalia, celery=gcr.io/sopost-k8s/asfalia
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/asfalia.tag-match: regexp:^v0.1.0-.*$
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
argocd-image-updater.argoproj.io/celery.tag-match: regexp:^v0.1.0-.*$
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: regexp:^v0.1.0-[0-0a-zA-Z]+$
but found that the example you gave in this thread worked for me.
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)
- Deploy 1 - App deployed with versions from git as expected.
- Deploy 2 - Image updater updated the asfalia deployment the latest tag but not the celery container.
- Deploy 3 - Image updater updated celery to the latest allowed image matching asfalia container.
It'd be nice if it held off and performed the updates at once, or had the option to perhaps.
Maybe another annotation to consider?
argocd-image-updater.argoproj.io/images-update:< 'individual' | 'multiple' >
# or
argocd-image-updater.argoproj.io/update-method:< 'individual' | 'multiple' >
(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 🌟.
I have another image I could possibly update (sql-proxy) in that deployment, so I'm going to give that a go now too.
from argocd-image-updater.
Related Issues (20)
- Issue with Authentication in ArgoCD Image Updater for Docker Hub
- golangci-lint context loading failed: no go files to analyze
- ArgoCD does not consider images for arch "linux/arm64/v8" HOT 2
- Sequential Builds Overwriting Image Tags in Git Repository
- Digest Update Strategy Incorrectly Adding "Latest" Tag HOT 1
- Bug between v0.12.2 to v0.13.0 in git write-back implementation HOT 2
- Unable to access /app/.aws for configuring ECR credentials after 0.13.0 upgrade HOT 8
- git: 'git' is not a git command HOT 3
- terminal prompts disabled HOT 15
- argocd-image-updater complains that "latest" strategy has been renamed to "newest-build", even though I'm using "newest-build" HOT 1
- Automate the release process with github actions workflow
- Image Updater not able to connect to Gitlab Repo HOT 1
- Image updater infinite loop
- cannot use helm chart from public helm chart repositories HOT 2
- Only use the last Registeries HOT 1
- Git write-back-target helmvalues does not replace tag and repo in the image section HOT 6
- Optionally allow Image Updater usage via CRD rather than just annotations HOT 2
- Add tests to validate manifests against schemas
- Bug: repocreds do not GitHub App credentials HOT 8
- Bug: Reading tags from GitHub Container registry causes panic HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from argocd-image-updater.