-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Description
Checklist:
- I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
- I've included steps to reproduce the bug.
- I've pasted the output of
argocd version.
Describe the bug
When using the .repo.GetAppDetails function inside a notification template, the returned object has a nil Helm field for multi-source applications. This makes it impossible to reliably access Helm values (e.g. image.tag) via $appDetails.Helm.GetParameterValueByName in notification templates for multi-source apps.
The function always operates on app.spec.source (the single-source field), which is nil for multi-source applications, meaning the result never includes any Helm data regardless of how the sources are configured.
To Reproduce
- Create a multi-source ArgoCD application with the following structure:
spec:
sources:
- repoURL: 'https://github.com/foo/bar-apps.git'
targetRevision: HEAD
ref: values
- repoURL: 'registry.example.com/helm'
chart: 'foo-default-chart'
targetRevision: '1.2.3'
helm:
valueFiles:
- '$values/clusters/env/cluster/shared.yaml'
- '$values/applications/foo-app/shared.yaml'
- '$values/applications/foo-app/env/cluster/values.yaml'- Create a notification template that calls
.repo.GetAppDetailsand checks$appDetails.Helm:
template.slack-on-deployed: |
slack:
blocks: |
{{- $appDetails := (call .repo.GetAppDetails) }}
{{- if and $appDetails $appDetails.Helm }}
{{- $imageVersion = $appDetails.Helm.GetParameterValueByName "foo-default-chart.image.tag" }}
{{- end }}- Trigger a sync on the multi-source application.
- Observe that
$appDetails.Helmis alwaysnil, so$imageVersionis never populated from Helm parameters.
Expected behavior
(call .repo.GetAppDetails) should either:
- Accept a source index argument so callers can specify which source to inspect (e.g.
(call .repo.GetAppDetails 1)for the second source), or - Return aggregated Helm data across all sources when the application uses
spec.sources
Currently there is no reliable way to retrieve Helm parameter values inside notification templates for multi-source applications.
Workarounds attempted
- Passing a source index:
(call .repo.GetAppDetails 0)— causes a runtime error:wrong number of args for $.repo.GetAppDetails: got 1 want 0 - Falling back to
app.status.summary.images— unreliable during canary rollouts where multiple image tags coexist across stable and canary pods - Falling back to
app.status.operationState.syncResult.resources[*].images— works but is fragile and depends on resource ordering and it is only useful to access image information, not other helm values
Version
argocd: v3.3.2
BuildDate: 2026-02-22T12:33:55Z
GitCommit: 8a3940d8db27928931f0a85ba7c636e54786bddc
GitTreeState: clean
GitTag: v3.3.2
GoVersion: go1.25.5
Compiler: gc
Platform: linux/amd64