argoproj / argoproj/argo-cd

Applicationset generators unable to pass the parameter key values to template

Open
#22,012 1 comment 1 reaction 0 assignees View on GitHub
bug
Dominant language
Go
Stars
24.2k
Forks
7.8k
Avg merge
1d 14h
Merged PRs (30d)
246

Description

Checklist:

* [x] I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
* [x] I've included steps to reproduce the bug.
* [x] I've pasted the output of `argocd version`.

**Describe the bug**

ApplicationSet generator parameters are being passed blank to template

**To Reproduce**

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: rhacm-policies-rollout
spec:
generators:
- list:
elements:
- environment: "dev"
phase: "phase_a"
version: "0.1.44"
syncWave: "0"
- environment: "dev"
phase: "phase_b"
version: "0.1.45"
syncWave: "-1"
- environment: "rnd"
phase: "phase_a"
version: "0.1.44"
syncWave: "0"
- environment: "rnd"
phase: "phase_b"
version: "0.1.45"
syncWave: "-1"
template:
metadata:
name: "push-policies-{{.environment}}-{{.phase}}"
annotations:
argocd.argoproj.io/sync-wave: "{{.syncWave}}"
debug-version: "{{.version}}"
spec:
project: default
source:
repoURL: "https://rmyrepo.com/nice"
targetRevision: "{{ .version }}"
chart: acm-policies-healthcheck
destination:
server: https://kubernetes.default.svc
namespace: openshift-gitops
syncPolicy:
automated:
prune: false
selfHeal: false

**Expected behavior**

Values from list parameters should be passed in template, but it is not happening

**Screenshots**

![Image](https://github.com/user-attachments/assets/76dc52c5-46af-4c6e-9707-244d7ac82548)

**Version**

2.13.1 (OpenShift GITOPS ARGOCD)

**Logs**
[
```
Paste any relevant application logs here.
```](install.go:200: [debug] Original chart version: "")

Contributor guide

Open the contributing guide

Research direction

Start by applying the provided ApplicationSet manifest and checking the generated Application metadata and source revision; compare the list generator parameters with the template output. Trace the ApplicationSet generator and template handling in the Go controller, then add or update a regression test for list parameters. Done means environment, phase, version, and syncWave values appear in the generated Application instead of blank values.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, helm, kubernetes
Domain
ci-cd, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.