Open
Description
Describe the bug
The problem is that when you store helm values files in a separate repo you use spes.sources
instead of spes.source
in your Application manifests. Thus instead of sourceType
string in application status we will have sourceTypes
array.
status:
sourceTypes:
- Helm
Unfortunately argocd-image-updater check for sourceType
only:
argocd-image-updater/pkg/argocd/argocd.go
Lines 520 to 533 in 49825ec
To Reproduce
Replace values surrounded by << >> and create Application with 2 sources and follow the logs:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: test
namespace: argocd
annotations:
argocd-image-updater.argoproj.io/write-back-method: git
argocd-image-updater.argoproj.io/image-list: test=<<REPO_URL/test>>
argocd-image-updater.argoproj.io/test.force-update: "true"
argocd-image-updater.argoproj.io/test.helm.image-tag: deployment.image.tag
argocd-image-updater.argoproj.io/test.helm.image-name: deployment.image.repository
argocd-image-updater.argoproj.io/test.update-strategy: latest
argocd-image-updater.argoproj.io/test.allow-tags: regexp:(tested-dev-)
spec:
project: default
sources:
- repoURL: <<rREPO_URL>>
chart: test
targetRevision: 0.1.0
helm:
releaseName: test
valueFiles:
- $values/dev/values/test.yaml
- repoURL: "git@github.com:<<YOUR_ORG>>/gitops-backend.git"
targetRevision: HEAD
ref: values
destination:
server: "https://kubernetes.default.svc"
namespace: dev
syncPolicy:
automated:
prune: true
selfHeal: true
allowEmpty: false
syncOptions:
- Validate=true
- CreateNamespace=true
- PrunePropagationPolicy=foreground
- PruneLast=true
Version
0.12.2
Logs
time="2023-04-24T08:48:37Z" level=info msg="Processing results: applications=0 images_considered=0 images_skipped=0 images_updated=0 errors=0"
time="2023-04-24T08:50:38Z" level=warning msg="skipping app 'test' of type '' because it's not of supported source type" application=test