-
Notifications
You must be signed in to change notification settings - Fork 293
Image updater updates the wrong helm values when having more than one chart in an Argocd Application #821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
so the issue is, you're expecting the updates in repo1, but it actually goes to repo2 in this multi-source app? Have you tried |
I have exactly the same problem when using
Image updater recognizes that the new image (with new digest) was pushed to the repository, but gets that digest and for example tries to update the first one deployment ( The message looks like: I know that as a workaround I could prepare single values.yaml file and specify the
but I would prefer to have separate values files to keep the possibility to deploy some subset of the apps, not always all of them. I do not want to prepare merged values file each time with double (or trippled) field names prefixed with app. |
This is a critical bug for me. I have an application composed of three Helm charts:
The Migration component must be part of the same application because it includes a PreSync hook Job that scales down all replicas before running migrations. If it’s in a separate application, ArgoCD will immediately reconcile the replica count, preventing proper scaling down. When new image versions are available (typically for all components at once), the API chart gets updated with the Poller image instead. This seems like a major bug with potentially serious consequences, as it allows unintended containers from the same application to be injected into a deployment. Manifest (it's a patch but has everything needed to understand the problem): # app-patch.yaml
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: redacted
namespace: argocd
annotations:
argocd-image-updater.argoproj.io/image-list: "api=ghcr.io/redacted/redacted-api:staging,poller=ghcr.io/redacted/redacted-poller:staging"
argocd-image-updater.argoproj.io/api.update-strategy: digest
argocd-image-updater.argoproj.io/api.helm.image-spec: image
argocd-image-updater.argoproj.io/poller.update-strategy: digest
argocd-image-updater.argoproj.io/poller.helm.image-spec: image
spec:
sources:
- repoURL: https://github.com/redacted/redacted.git
path: charts/api
targetRevision: staging
helm:
releaseName: redacted
valuesObject:
image: ghcr.io/redacted/redacted-api:staging
imagePullPolicy: Always
imagePullSecret: ghcr-secret
envFrom:
- secretRef:
name: redacted-db-creds
- repoURL: https://github.com/redacted/redacted.git
path: charts/migration
targetRevision: staging
helm:
releaseName: migration
valuesObject:
image: ghcr.io/redacted/redacted-migration:staging
imagePullPolicy: Always
imagePullSecret: ghcr-secret
envFrom:
- secretRef:
name: redacted-db-creds
- repoURL: https://github.com/redacted/redacted.git
path: charts/poller
targetRevision: staging
helm:
releaseName: initiation-2
valuesObject:
image: ghcr.io/redacted/redacted-poller:staging
imagePullPolicy: Always
imagePullSecret: ghcr-secret
envFrom:
- secretRef:
name: redacted-db-creds
syncPolicy:
syncOptions:
- CreateNamespace=true Logs, it looks like it's saying it's updating the right thing:
But it updates the image for api with the poller image (updated manifest from argocd UI): sources:
- repoURL: https://github.com/redacted/redacted.git
path: charts/api
targetRevision: staging
helm:
parameters:
- name: image
value: >-
ghcr.io/redacted/redacted-poller:staging@sha256:b2a101f0da48daa17514aaf7fda9e1ff565e757b5dbb58256d467ec32bd363db There was a PR that was kind of ignored working on this I believe #635 |
Describe the bug
When having more than one helm chart deployed in the same Application file, the annotation
argocd-image-updater.argoproj.io/XXXX.helm.image-name
does not update the properties for the correct chart, but for the first one.To Reproduce
Application.yaml
Expected behavior
Version
Chart version 0.11.0
Logs
The logs mentions that the properties are updated correctly and does not throw errors, but the place where the properties are updated is logically wrong
Additional-context
In the case above, we only had to swap chart-2 with chart-1 in the Application.yaml and it worked fine, since for chart-1 we don't need to use image updater. But in the cases where we have to update two images in two different values files which are in the same Application.yaml, this will not succeed. (Splitting the charts to different apps is a workaround ofcourse, but not always desired)
The text was updated successfully, but these errors were encountered: