Skip to content

image updater updates the wrong source #1147

@clambin

Description

@clambin

Describe the bug
I have an Application with multiple sources:

piVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: infra
  namespace: argocd
  annotations:
    argocd-image-updater.argoproj.io/write-back-method: git
    argocd-image-updater.argoproj.io/write-back-target: kustomization
    argocd-image-updater.argoproj.io/image-list: restarter=codeberg.org/clambin/k8s-restarter
    argocd-image-updater.argoproj.io/restarter.update-strategy: newest-build
spec:
  destination:
    namespace: infra
    server: https://kubernetes.default.svc
  project: default
  sources:
  - path: infra/kernelcheck
    repoURL: https://github.com/clambin/gitops
    targetRevision: HEAD
  - path: infra/timemachine/prod
    repoURL: https://github.com/clambin/gitops
    targetRevision: HEAD

The image to update is located in the 2nd source. However, when I produce a new image, the "images" section of the first source ("infra/kernelcheck/kustomization.yaml") is updated instead.

Once I flip the two sources, the correct source is updated.

So, it looks like image-updater always updates the first source, regardless of where the image is used.

To Reproduce
See above.

Expected behavior
The correct source should be updated.

Additional context
N/A

Version
v0.16.0

Logs
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions