argocd-image-updater: Image not being updated

The Updater sees that there is a newer tag and seems to understand it needs to do a thing, says its doing a thing, but nothing changes. I don’t see an error, but I don’t know your logs well enough to know what its doing. I have a very basic install, all defaults plus config to talk to private registry which is working fine. Version: argocd-image-updater v99.9.9+f1cc8e4 Here are the logs, let me know if you need more specific info.

time="2021-04-08T19:29:45Z" level=info msg="Setting new image to tjsacs.azurecr.io/itac-web:v1.1.14" alias= application=itac-web-tst-az-prd-c01 image_name=itac-web image_tag=v1.1.13 registry=tjsacs.azurecr.io
time="2021-04-08T19:29:45Z" level=info msg="Successfully updated image 'tjsacs.azurecr.io/itac-web:v1.1.13' to 'tjsacs.azurecr.io/itac-web:v1.1.14', but pending spec update (dry run=false)" alias= application=itac-web-tst-az-prd-c01 image_name=itac-web image_tag=v1.1.13 registry=tjsacs.azurecr.io
time="2021-04-08T19:29:45Z" level=info msg="Committing 0 parameter update(s) for application itac-web-tst-az-prd-c01" application=itac-web-tst-az-prd-c01
time="2021-04-08T19:29:45Z" level=debug msg="found 7 from 7 tags eligible for consideration" image="tjsacs.azurecr.io/itac-web:v1.1.13"
time="2021-04-08T19:29:45Z" level=info msg="Setting new image to tjsacs.azurecr.io/itac-web:v1.1.14" alias= application=itac-web-tst-op-prd-c01 image_name=itac-web image_tag=v1.1.13 registry=tjsacs.azurecr.io
time="2021-04-08T19:29:45Z" level=info msg="Successfully updated image 'tjsacs.azurecr.io/itac-web:v1.1.13' to 'tjsacs.azurecr.io/itac-web:v1.1.14', but pending spec update (dry run=false)" alias= application=itac-web-tst-op-prd-c01 image_name=itac-web image_tag=v1.1.13 registry=tjsacs.azurecr.io
time="2021-04-08T19:29:45Z" level=info msg="Committing 0 parameter update(s) for application itac-web-tst-op-prd-c01" application=itac-web-tst-op-prd-c01
time="2021-04-08T19:29:45Z" level=info msg="Successfully updated the live application spec" application=itac-web-tst-test2-op
time="2021-04-08T19:29:45Z" level=info msg="Successfully updated the live application spec" application=itac-web-tst-az-prd-c01
time="2021-04-08T19:29:45Z" level=info msg="Successfully updated the live application spec" application=itac-web-tst-op-prd-c01
time="2021-04-08T19:29:45Z" level=info msg="Processing results: applications=3 images_considered=3 images_skipped=0 images_updated=3 errors=0"```

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 15
  • Comments: 32 (5 by maintainers)

Most upvoted comments

@jannfis

Hi. My application is not updated although the logs is showing Successfully updated the live application spec . I am trying to change the image every time the latest has built but I don’t know what I have missed. P.S. I am using ECR and I have written a script to get the credentials.

Application.yaml

    argocd-image-updater.argoproj.io/image-list: my-app=xxx.dkr.ecr.ap-southeast-1.amazonaws.com/my-app:latest
    argocd-image-updater.argoproj.io/my-app.update-strategy: digest
    argocd-image-updater.argoproj.io/my-app.pull-secret: ext:/tmp/script.sh

registries.conf:

  registries.conf: |
    registries:
    - name: ECR
      api_url: https://xxx.dkr.ecr.ap-southeast-1.amazonaws.com
      prefix: xxx.dkr.ecr.ap-southeast-1.amazonaws.com
      ping: no
      tagsortmode: none
      credentials: ext:/tmp/script.sh

Logs in image-updater:ccccc

time="2021-07-06T04:26:18Z" level=info msg=/tmp/script.sh dir= execID=Cgvft
time="2021-07-06T04:26:20Z" level=info msg="Setting new image to xxx.dkr.ecr.ap-southeast-1.amazonaws.com/my-app@sha256:58a17de6205060528f56fb735c81619bec5744bd074959ca0770ddf6ad5f3365" alias=my-app application=my-app image_name=my-app image_tag=dummy registry=xxx.dkr.ecr.ap-southeast-1.amazonaws.com
time="2021-07-06T04:26:20Z" level=info msg="Successfully updated image 'xxx.dkr.ecr.ap-southeast-1.amazonaws.com/my-app@dummy' to 'xxx.dkr.ecr.ap-southeast-1.amazonaws.com/my-app@sha256:58a17de6205060528f56fb735c81619bec5744bd074959ca0770ddf6ad5f3365', but pending spec update (dry run=false)" alias=my-app application=my-app image_name=my-app image_tag=dummy registry=xxx.dkr.ecr.ap-southeast-1.amazonaws.com
time="2021-07-06T04:26:20Z" level=info msg="Committing 0 parameter update(s) for application my-app" application=my-app
time="2021-07-06T04:26:20Z" level=info msg="Successfully updated the live application spec" application=my-app
time="2021-07-06T04:26:20Z" level=info msg="Processing results: applications=1 images_considered=1 images_skipped=0 images_updated=1 errors=0"

@andrei-dascalu I think it’s not yet documented but if you want to use SSH git repositories you need to provide .ssh/known_hosts file. For example if you installed Image Updater in ArgoCD’s namespace:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: argocd-image-updater
spec:
  template:
    spec:
      volumes:
        - name: ssh-known-hosts
          configMap:
            name: argocd-ssh-known-hosts-cm
      containers:
        - name: argocd-image-updater
          volumeMounts:
            - mountPath: /app/config/ssh
              name: ssh-known-hosts

@kyleli666 That’s the ANSWER I was looking for. It’ s an issue with combination of ApplicationSet and Image Updater.

If it’s related to Image updater + ApplicationSet, then there is a work arround by changing ApplicationSet controller policy. See my comment here https://github.com/argoproj/applicationset/issues/547#issuecomment-1674693159

Had to add helm parameters to get it to work, see my comment here: https://github.com/argoproj-labs/argocd-image-updater/issues/431#issuecomment-1471871799

i configure the write-back method to git but now it keeps recreating my pods, example of argocd logs

time="2021-09-28T13:11:47Z" level=info msg="Initialized new operation: {&SyncOperation{Revision:d33baeaa80095e8d859b4d298f2677985134151a,Prune:true,DryRun:false,SyncStrategy:nil,Resources:[]SyncOperationResource{SyncOperationResource{Group:apps,Kind:Deployment,Name:user-register-test-listener,Namespace:,},},Source:nil,Manifests:[],SyncOptions:[CreateNamespace=true PrunePropagationPolicy=foreground],} { true} [] {5 nil}}" application=user-cmd-unstable-register-user-test
time="2021-09-28T13:11:47Z" level=info msg="Ignore status for CustomResourceDefinitions"
time="2021-09-28T13:11:47Z" level=info msg="Ignore '/spec/preserveUnknownFields' for CustomResourceDefinitions"
time="2021-09-28T13:11:47Z" level=info msg="Comparing app state (cluster: https://kubernetes.default.svc, namespace: default)" application=user-cmd-unstable-register-user-test
time="2021-09-28T13:11:47Z" level=info msg="getRepoObjs stats" application=eck build_options_ms=0 helm_ms=0 plugins_ms=0 repo_ms=0 time_ms=345 unmarshal_ms=345 version_ms=0
time="2021-09-28T13:11:48Z" level=info msg="getRepoObjs stats" application=user-cmd-unstable-register-user-live build_options_ms=0 helm_ms=0 plugins_ms=0 repo_ms=0 time_ms=4071 unmarshal_ms=4071 version_ms=0
time="2021-09-28T13:11:48Z" level=info msg="getRepoObjs stats" application=user-cmd-unstable-register-user-test build_options_ms=0 helm_ms=0 plugins_ms=0 repo_ms=0 time_ms=4081 unmarshal_ms=4081 version_ms=0
time="2021-09-28T13:11:48Z" level=error msg="Failed to initiate auto-sync to d33baeaa80095e8d859b4d298f2677985134151a: rpc error: code = FailedPrecondition desc = another operation is already in progress" application=user-cmd-unstable-register-user-test
time="2021-09-28T13:11:48Z" level=error msg="Failed to initiate auto-sync to d33baeaa80095e8d859b4d298f2677985134151a: rpc error: code = FailedPrecondition desc = another operation is already in progress" application=user-cmd-unstable-register-user-live
time="2021-09-28T13:11:48Z" level=info msg="Update successful" application=user-cmd-unstable-register-user-live
time="2021-09-28T13:11:48Z" level=info msg="Reconciliation completed" application=user-cmd-unstable-register-user-live dedup_ms=0 dest-name= dest-namespace=default dest-server="https://kubernetes.default.svc" diff_ms=25 fields.level=824814551928 git_ms=4071 health_ms=4 live_ms=1 settings_ms=0 sync_ms=0 time_ms=4309

it seems that argocd its fighting the update. any ideas?

PD: I’m using argocd, application set and image update just to be clear