Coder Social home page Coder Social logo

Comments (6)

jannfis avatar jannfis commented on June 30, 2024 1

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.

jannfis avatar jannfis commented on June 30, 2024 1

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.

jannfis avatar jannfis commented on June 30, 2024

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.

hawksight avatar hawksight commented on June 30, 2024

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:
Screenshot from 2020-09-01 16-21-08

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:
Screenshot from 2020-09-02 09-03-59

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:

  1. Its cycling through the same docker image, with the varying tags associated.
  2. It doesn't seem to be respecting the semantic format tags only, I though it would discard the other tags.
  3. 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.

jannfis avatar jannfis commented on June 30, 2024

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.

hawksight avatar hawksight commented on June 30, 2024

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.

Screenshot from 2020-09-02 15-10-30

I deleted and recreated app to to see how it upgraded from git. What happened (as you can see by 3 version)

  1. Deploy 1 - App deployed with versions from git as expected.
  2. Deploy 2 - Image updater updated the asfalia deployment the latest tag but not the celery container.
  3. 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.