Skip to content

Image Updater writes back to repo but does not trigger new deployment (dry run=true) #1338

@anishbista60

Description

@anishbista60

Description:

Hi team,

I’m using the latest version of Argo CD Image Updater and facing an issue where the updater successfully writes back the updated image digest to the Git repository, but the new image is not deployed to the cluster.

The logs show:

Successfully updated image '...@sha256:966c4a3...' 
to '...:dev@sha256:fb78c6f...', but pending spec update (dry run=true)

It seems like the updater is running in dry-run mode, even though that’s not configured anywhere.

Configuration Details

ImageUpdater CR

apiVersion: argocd-image-updater.argoproj.io/v1alpha1
kind: ImageUpdater
metadata:
  name: all-apps-image-updater
  namespace: argocd
spec:
  namespace: argocd
  applicationRefs:
    - namePattern: "proxy"
      images:
        - alias: "proxy"
          imageName: "<ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/abc-dev/proxy:dev"
          commonUpdateSettings:
            allowTags: "regexp:dev"
            updateStrategy: "digest"
  writeBackConfig:
    method: "git:secret:argocd/argocd-ssh"
    gitConfig:
      branch: dev

Application YAML

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: proxy
  namespace: argocd
  annotations:
    notifications.argoproj.io/subscribe.on-deployed.slack: abc-deployments
    notifications.argoproj.io/subscribe.on-sync-failed.slack: abc-deployments
spec:
  destination:
    namespace: proxy
    server: https://kubernetes.default.svc
  project: default
  source:
    path: code/infra/kubernetes/apps/proxy/dev
    repoURL: <REPO_URL>
    targetRevision: dev
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true

Observed Behavior

The write-back commit includes two image references:

kustomize:
  images:
  - <ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/abc-dev/proxy@sha256:fb78c6fc9a2d84a6d3f8de902c1da822f7e38792a6c8f678a443068a5d652a7e
  - <ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/abc-dev/proxy:dev@sha256:fb78c6fc9a2d84a6d3f8de902c1da822f7e38792a6c8f678a443068a5d652a7e

I’m not sure why two images are being written back, and which one the application actually picks up.
The deployment itself references the digest-only format (without the tag), so the extra :dev@sha256 entry might be confusing the sync detection.


What’s Working

  • Image Updater can successfully read images from ECR
  • It writes the updated digest back to the Git repository

What’s Not Working

  • The new image is not deployed to the cluster
  • Logs show dry run=true even though not set

Expected Behavior

Once the digest is updated and written to Git, Argo CD should detect the change and trigger a new deployment.

Environment

  • Argo CD Image Updater version: v1.0.0 (latest)
  • Argo CD version: v3.2.0
  • Image registry: AWS ECR
  • Git write-back method: git:secret:argocd/argocd-ssh

Additional Context

The Argo CD Application remains Synced and Healthy, but no new deployment is triggered after the image updater commit.
It feels like the updater believes it’s in dry-run mode or not detecting spec changes correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions