Giter VIP home page Giter VIP logo

Comments (17)

jannfis avatar jannfis commented on May 30, 2024 2

I have just put a fix that's supposed to work for this issue into v0.5.1. Please let me know if that works out for you!

from argocd-image-updater.

jannfis avatar jannfis commented on May 30, 2024 1

PS: For the records: I wouldn't generally recommend using latest tag for argocd-image-updater image, since this will be an automated build from the current master, and although the builds should work fine, might lead to unexpected (and undocumented) changes.

from argocd-image-updater.

jannfis avatar jannfis commented on May 30, 2024

Hi, this seems to be a bug indeed. I guess the defaults for the target parameters are not correctly set.

As a workaround, can you please try to set the target parameters explicitly, as described here: https://argocd-image-updater.readthedocs.io/en/stable/configuration/images/#specifying-helm-parameter-names and see whether the update is done correctly?

from argocd-image-updater.

Zefool avatar Zefool commented on May 30, 2024

Hey, thanks for taking this on :)

So I tried this, but it did not work. The logs have not changed for the image-updater.

I am not sure I did it correctly though.

Here the Annotations:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  annotations:
    argocd-image-updater.argoproj.io/cas.helm.image-name: $IMAGE.image.repository
    argocd-image-updater.argoproj.io/cas.helm.image-tag: $IMAGE.image.tag
    argocd-image-updater.argoproj.io/image-list: cas=$REGISTRY/$REPOSITORY/$IMAGE:>=2.1.0-0

And here the relevant part of the Helm Chart values-file:

trusted-ca-service:
  image:
    repository: $REGISTRY/$REPOSITORY/$IMAGE
    tag: 2.1.0-dev.6

from argocd-image-updater.

jannfis avatar jannfis commented on May 30, 2024

Your annotations look good as far as I can see.

I suppose that the value for $IMAGE in your argocd-image-updater.argoproj.io/cas.helm.image-nameand argocd-image-updater.argoproj.io/cas.helm.image-tag annotations is trusted-ca-service?

Are you able to check the Application resource, especially the .spec.source.helm section? If you have the jq tool installed, what does the following give:

kubectl -n argocd get applications.argoproj.io <YOURAPP> -o json | jq '.spec.source.helm'

Are there any parameter overrides?

from argocd-image-updater.

Zefool avatar Zefool commented on May 30, 2024

I suppose that the value for $IMAGE in your argocd-image-updater.argoproj.io/cas.helm.image-nameand argocd-image-updater.argoproj.io/cas.helm.image-tag annotations is trusted-ca-service?

Correct

Are you able to check the Application resource, especially the .spec.source.helm section?

> kubectl -n argocd get applications.argoproj.io trusted-ca-service-test -o json | jq '.spec.source.helm' 
null

from argocd-image-updater.

jannfis avatar jannfis commented on May 30, 2024

This is odd, especially considering that according to the logs from one of your above comments, that there should be at least something in the corresponding part of the spec (i.e. it sent helm:<releaseName:\"\" values:\"\" > chart:\"\" along with the spec update request).

May I ask what version of Argo CD is running at your side? And I also suppose you are running v0.5.0 of the image updater?

from argocd-image-updater.

Zefool avatar Zefool commented on May 30, 2024

Sure, here is the Argo setup:

argocd-application-controller   1/1     1            1           101d   argocd-application-controller   argoproj/argocd:v1.6.1       app.kubernetes.io/name=argocd-application-controller
argocd-dex-server               1/1     1            1           101d   dex                             quay.io/dexidp/dex:v2.22.0   app.kubernetes.io/name=argocd-dex-server
argocd-redis                    1/1     1            1           101d   redis                           redis:5.0.3                  app.kubernetes.io/name=argocd-redis
argocd-repo-server              1/1     1            1           101d   argocd-repo-server              argoproj/argocd:v1.6.1       app.kubernetes.io/name=argocd-repo-server
argocd-server                   1/1     1            1           101d   argocd-server                   argoproj/argocd:v1.6.1       app.kubernetes.io/name=argocd-server

the image-updater image was unfortunately set to "latest", and I couldn't find it in Docker Hub anymore (by SHA). So I deployed a dedicated v0.5.0 , but the logs still say the exact same thing

from argocd-image-updater.

jannfis avatar jannfis commented on May 30, 2024

I'm having a hard time trying to reproduce this. I tried with the helm-guestbook chart from argocd-example-apps in a live environment and it works as expected.

I will install an Argo CD v1.6.1 and see if it might be an incompatibility between the Argo CD Client (which is v1.6.2 for updater v0.5.0) and the Argo CD server.

In the meanwhile, would you mind sharing non-redacted log files with me, i.e. in a private Gist or something like this?

Also, do you have any output from kubectl -n argocd get applications.argoproj.io trusted-ca-service-test -o json | jq '.spec.source.helm' when you disable the image updater, right after the application has been created and synced? There should be something if you use a values.yaml, at least something along the lines of

$ kubectl -n argocd get applications.argoproj.io guestbook-helm -o json | jq '.spec.source.helm'
{
  "valueFiles": [
    "values.yaml"
  ]
}

If this is null also, what is the output of kubectl -n argocd get applications.argoproj.io <yourapp> -o json | jq '.spec.source'?

from argocd-image-updater.

Zefool avatar Zefool commented on May 30, 2024

kubectl -n argocd get applications.argoproj.io trusted-ca-service-test -o json | jq '.spec.source.helm'

{
  "parameters": [
    {
      "forceString": true,
      "name": "image.name",
      "value": "$REGISTRY/$REPOSITORY/$IMAGE"
    },
    {
      "forceString": true,
      "name": "image.tag",
      "value": "2.1.0-dev.102"
    }
  ]
}

So that seems to have changed now! I did not disable the image updater before getting this - probably the update?

from argocd-image-updater.

Zefool avatar Zefool commented on May 30, 2024

But the actual deployment / pod is still running the old version.

from argocd-image-updater.

Zefool avatar Zefool commented on May 30, 2024

I'm having a hard time trying to reproduce this. I tried with the helm-guestbook chart from argocd-example-apps in a live environment and it works as expected.

I'm suspecting that maybe the problem lies with our Chart:

trusted-ca-service:
  image:
    repository: $REGISTRY/$REPOSITORY/$IMAGE

.image.repository is not the same as the expected .image.name - it also includes registry and repository. What do you think?

from argocd-image-updater.

Zefool avatar Zefool commented on May 30, 2024

How do you propose I send you unredacted logs? I'd be open to that, there are no secrets printed

from argocd-image-updater.

jannfis avatar jannfis commented on May 30, 2024

OK, now we're one step further at least with parameters being set. Unfortunately, they seem to be the default parameters (image.name and image.tag) instead of the ones the chart needs (trusted-ca-service.image.repository and trusted-ca-service.image.tag).

But I think I found where the problem is. Can you please try if replacing the annotation

argocd-image-updater.argoproj.io/image-list: cas=$REGISTRY/$REPOSITORY/$IMAGE:>=2.1.0-0

with

argocd-image-updater.argoproj.io/image-list: cas=$REGISTRY/$REPOSITORY/$IMAGE:~2.1.0-0

will work for you? I think there is a bug in the parser when the version constraint contains an equal sign.

from argocd-image-updater.

Zefool avatar Zefool commented on May 30, 2024

And it immediately runs the new image. Bug fixed, thank you very much!

from argocd-image-updater.

Zefool avatar Zefool commented on May 30, 2024

Just to add, I only updated the image updater to 0.5.1, and did not change the annotation

from argocd-image-updater.

jannfis avatar jannfis commented on May 30, 2024

And it immediately runs the new image. Bug fixed, thank you very much!

Thanks for your patience and working this out with me! Much appreciated. Glad that it works now.

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.