Open sangcom15 opened 11 months ago
I'm encountering the same issue. Are there any updates on its status?
Thank you for the trick with elements: []
, as the instructions don't mention it (probably some pending fix in the code)
I got your example to work with one important change: move the charts
element from under app
to the top of the YAML file.
I am also encountering the same issue. Moving the list.elementsYaml
generator out to the topmost merge
generator fixes the issue, but (unfortunately) breaks the structure that I was trying to implement -- where the {git: {files: [...]}}
generator depends on values set by a previous cluster
generator.
In contrast to what @nastacio said above, I don't see any difference between:
elements: []
on the list generatorelementsYaml
to a nested vs. top-level value in the fileDid ya'll find a workaround for this?
ArgoCD versions 2.10 and below have reached EOL. Can you upgrade and let us know if the issue is still present, please?
@andrii-korotkov-verkada, Facing the same issue in v2.11.8+e7d8b31
Like @mkoval suggested, moving matrix generator to the top worked for me,
spec:
goTemplate: true
goTemplateOptions: ["missingkey=error"]
generators:
- matrix:
generators:
- matrix:
generators:
- git:
repoURL: git@github.com/xxxxxxx/teleportv2
revision: HEAD
files:
- path: charts/teleport-cluster/prod-me-teleport-tenants.yaml
- list:
elements: []
elementsYaml: "{{ .teleport.tenants | toJson }}"
- list:
elements:
- envType: "production"
region: "me-central-1"
but this didn't work,
spec:
goTemplate: true
goTemplateOptions: ["missingkey=error"]
generators:
- matrix:
generators:
- list:
elements:
- envType: "production"
region: "me-central-1"
- matrix:
generators:
- git:
repoURL: git@github.com/xxxxxxxx/teleportv2
revision: HEAD
files:
- path: charts/teleport-cluster/prod-me-teleport-tenants.yaml
- list:
elements: []
elementsYaml: "{{ .teleport.tenants | toJson }}"
But this is ok for my usecase.
Checklist:
argocd version
.Describe the bug
I was trying to use 'elementsYaml' of list generator. i referred to https://argo-cd.readthedocs.io/en/release-2.9/operator-manual/applicationset/Generators-List/#dynamically-generated-elements and it worked. But when i use 'elementsYaml' of list generator in nested matrix, it is not working with the error message below.
failed to get params for second generator in the matrix generator: child generator returned an error on parameter generation: failed to replace parameters in generator: failed to execute go template {{ .app.charts | toJson }}: template: :1:7: executing "" at <.app.charts>: map has no entry for key "app"
To Reproduce
The
configs/config.yaml
file:Expected behavior
application set will deploy applications when PR is created.
Version