Open wanddynosios opened 4 months ago
We are experiencing a similar problem with the git
generator. In our case we want to be able to load additional properties stored in a separate repository. Here's an example:
generators:
- matrix:
generators:
- scmProvider:
cloneProtocol: ssh
github:
organization: xyz
allBranches: true
tokenRef:
secretName: github-token
key: token
filters:
- repositoryMatch: ^.*$
branchMatch: ^scm/([0-9]+).*$
pathsExist: [deployment/kubernetes/kustomization.yaml]
- plugin:
configMapRef:
name: applicationset-branch-generator-plugin
input:
parameters:
branch: "{{.branch}}"
requeueAfterSeconds: 15
- git:
repoURL: "git@github.com:{{.organization}}/{{.repository}}.git"
revision: "{{.branch}}"
files:
- path: "deployment/kubernetes/properties/{{.case_number}}.yml"
We've also tried various combinations:
merge
generator = [ scmProvider, matrix = [plugin, git] ]
matrix
generator = [ scmProvider, git]
(just to be sure the custom plugin generator we have isn't the problem)matrix
generator = [ scmProvider, merge = [plugin, git] ]
None of these combos work and it's a big blocker. Any ideas on how to fix this?
Facing the same issue in v2.12.0+ec30a48 version.
error failed to get params for first generator in matrix generator: child generator returned an error on parameter generation:
Facing the same issue in v2.12.0+ec30a48 version.
I have App which deploy AppSet which deploy App
After deploy App is created correctly and it creates AppSet which also correct creates one App
but after 4min (next reconciliation) I get message :
error generating params from git: error retrieving Git files: rpc error: code = Internal desc = unable to resolve git revision :
time="2024-09-02T14:27:01Z" level=error msg="error generating params" error="error generating params from git: error retrieving Git files: rpc error: code = Internal desc │
│ = unable to resolve git revision : error creating SSH agent: \"SSH agent requested but SSH_AUTH_SOCK not-specified\"" generator="&{0xc000aa4d40}" │
│ time="2024-09-02T14:27:01Z" level=error msg="error generating application from params" applicationset=argocd/wxo error="error generating params from git: error retrieving │
│ Git files: rpc error: code = Internal desc = unable to resolve git revision : error creating SSH agent: \"SSH agent requested but SSH_AUTH_SOCK not-specified\"" generato │
│ r="{nil nil &GitGenerator{RepoURL:ssh://git@github.com/myrepo/edge-infra.git,Directories:[]GitDirectoryGeneratorItem{},Files:[]GitFileGeneratorItem{GitFileGenerator │
│ Item{Path:clusters/qa/**/cluster-config.yaml,},},Revision:HEAD,RequeueAfterSeconds:nil,Template:ApplicationSetTemplate{ApplicationSetTemplateMeta:ApplicationSetTemplateMe │
│ ta{Name:,Namespace:,Labels:map[string]string{},Annotations:map[string]string{},Finalizers:[],},Spec:ApplicationSpec{Source:nil,Destination:ApplicationDestination{Server:, │
│ Namespace:,Name:,},Project:,SyncPolicy:nil,IgnoreDifferences:[]ResourceIgnoreDifferences{},Info:[]Info{},RevisionHistoryLimit:nil,Sources:[]ApplicationSource{},},},PathPa │
│ ramPrefix:,Values:map[string]string{},} nil nil nil nil nil nil nil}"
``` │
│
generators:
- git:
files:
- path: clusters/qa/**/cluster-config.yaml
repoURL: ssh://git@github.com/myrepo/edge-infra.git
revision: master
config
Checklist:
argocd version
.Describe the bug It appears not to be possible to gotemplate anything inside the first child of a matrix generator inside the first element of a merge generator.
To Reproduce
produces an error:
Unable to resolve '{{default "main" "main"}}' to a commit SHA
When I switch the git and the list generators in the matrix generator, I get those errors for the list generator, so it appears to always be the first one. However, the error does not appear in the second matrix generator.
I have added a few debug outputs to the applicationset-controller, and the critical section never passes through
deeplyReplace
. Expected behaviorIt should be possible to gotemplate here.
Version
Logs
Slack link