argocd-image-updater icon indicating copy to clipboard operation
argocd-image-updater copied to clipboard

Skipping ApplicationSet Applications

Open seanlucey opened this issue 7 months ago • 7 comments

Describe the bug I have an ApplicationSet deployed in ArgoCD - this deploys 3 applications. For some reason, Argo Image Updater will manage and update only 1 of the 3 applications. I see this warning in the logs

│level=warning msg="skipping app 'application-1' of type '' because it's not of source type" │

To Reproduce Deploy ApplicationSet - nothing unusual

Expected behavior Argo Image Updater should consider every Application in the Application Set

Additional context n/a

Version Helm version 0.11.0

Logs Included Above

seanlucey avatar Apr 29 '25 12:04 seanlucey

Hi @seanlucey, could you please give us more details about your configuration if possible? ApplicationSet, helm charts, etc.

dkarpele avatar Apr 29 '25 16:04 dkarpele

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: appset
  namespace: argocd
spec:
  generators:
  - list:
      elements:
       - cluster: in-cluster
         name: prod
         region: euw1
         environment: eu
       - cluster: staging
         name: staging
         region: euw1
         environment: eu
       - cluster: dev
         name: dev
         region: use1
         environment: us
  template:
    metadata:
      name: '{{name}}-application-backend-{{region}}'
      labels:
        environment: '{{name}}'
        region: '{{region}}'
        app: backend
      annotations:
        argocd-image-updater.argoproj.io/activity.allow-tags: regexp:.*-{{name}}$
        argocd-image-updater.argoproj.io/activity.helm.image-spec: images.my-Service
        argocd-image-updater.argoproj.io/activity.update-strategy: newest-build
        argocd-image-updater.argoproj.io/image-list: <list>
        argocd-image-updater.argoproj.io/write-back-method: git 
    spec:
      project: '{{name}}'
      source:
        repoURL: '<GitHub URL>'
        targetRevision: 'app'
        path: "charts/{{name}}"
        helm:
          valueFiles:
          - "values.yaml"
          - "values.{{name}}.yaml"
          - "resources.{{name}}.yaml"
          parameters:
          - name: env
            value: '{{environment}}'
      destination:
        name: '{{cluster}}'
        namespace: master
      syncPolicy:
        automated:
          prune: true
          selfHeal: true
        syncOptions:
          - CreateNamespace=true

Just to iterate, this works perfectly for one of the applications - Argo Image Updater picks it up and manages it fine. Its the other two

seanlucey avatar Apr 29 '25 16:04 seanlucey

@seanlucey which image updater version do you use?

dkarpele avatar Apr 29 '25 17:04 dkarpele

@seanlucey image-updater helm 0.11.0 (https://github.com/argoproj/argo-helm/releases/tag/argocd-image-updater-0.11.0) is based on image-updater 0.14.0, which is a few versions old.

Do you see the same issue when running with newer versions of image-updater (0.16.0 latest)?

chengfang avatar Apr 29 '25 17:04 chengfang

Unfortunately still seeing the same issue on update to latest - I've had to revert it back to 0.14.0 but for a seperate issue

seanlucey avatar Apr 29 '25 18:04 seanlucey

@seanlucey I created ApplicationSet below and use image updater 0.14 or 0.16. But still can't reproduce. argocd-image-updater made commited and updated all 3 apps: https://github.com/dkarpele/image-updater-examples/commits/main/011-appset

Please let me know if you find a key difference between our setups.

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: seanlucey
  namespace: argocd
spec:
  generators:
  - list:
      elements:
       - cluster: in-cluster
         name: prod
         region: euw1
         environment: eu
       - cluster: staging
         name: staging
         region: euw1
         environment: eu
       - cluster: dev
         name: dev
         region: use1
         environment: us
  template:
    metadata:
      name: '{{name}}-application-backend-{{region}}'
      labels:
        environment: '{{name}}'
        region: '{{region}}'
        app: backend
      namespace: argocd
      annotations:
        argocd-image-updater.argoproj.io/activity.helm.image-name: image.repository
        argocd-image-updater.argoproj.io/activity.helm.image-tag: image.tag
        argocd-image-updater.argoproj.io/activity.update-strategy: newest-build
        argocd-image-updater.argoproj.io/image-list: activity=gcr.io/heptio-images/ks-guestbook-demo:0.2
        argocd-image-updater.argoproj.io/write-back-method: git
    #      finalizers:
#        - resources-finalizer.argocd.argoproj.io
    spec:
      project: "default"
      source:
        repoURL: https://github.com/dkarpele/image-updater-examples.git
        path: "./011-appset/cluster-addons/{{name}}"
        targetRevision: "HEAD"
        helm:
          valueFiles:
          - "values.yaml"
          parameters:
          - name: env
            value: '{{environment}}'
      destination:
        server: https://kubernetes.default.svc
        namespace: argocd
      syncPolicy:
        automated:
          prune: true
          selfHeal: true
        syncOptions:
          - CreateNamespace=true

dkarpele avatar Apr 29 '25 20:04 dkarpele

from the warning message: 'application-1' of type '' because it's not of supported source type, image-updater didn't get the expected application type (helm or kustomize). The actual application type is empty from the above warn messagae. But from your applicationset.yaml, the generated application should be of the supported type helm. Anything in your configuration could've caused this uninitialized application type?

https://github.com/argoproj-labs/argocd-image-updater/blob/release-0.14/pkg/argocd/argocd.go#L190-L194

chengfang avatar Apr 29 '25 23:04 chengfang