我正在使用 helm 生成 Argo 模板,我需要使用一个参数(这将是一个列表)。
我想这样写
args: {{"{{"}}inputs.parameters.args{{"}}"}}
问题是我从 helm 收到此错误:
install.go:178: [debug] Original chart version: ""
install.go:195: [debug] CHART PATH: /Users/idanahal/projects/exportinno/JobSubmitterCrons/kubernetes-templates
Error: YAML parse error on photon-crons-chart/templates/job-submitter-workflow-template.yaml: error converting YAML to JSON: yaml: invalid map key: map[interface {}]interface {}{"inputs.parameters.args":interface {}(nil)}
helm.go:84: [debug] error converting YAML to JSON: yaml: invalid map key: map[interface {}]interface {}{"inputs.parameters.args":interface {}(nil)}
YAML parse error on photon-crons-chart/templates/job-submitter-workflow-template.yaml
helm.sh/helm/v3/pkg/releaseutil.(*manifestFile).sort
helm.sh/helm/v3/pkg/releaseutil/manifest_sorter.go:146
helm.sh/helm/v3/pkg/releaseutil.SortManifests
helm.sh/helm/v3/pkg/releaseutil/manifest_sorter.go:106
helm.sh/helm/v3/pkg/action.(*Configuration).renderResources
helm.sh/helm/v3/pkg/action/action.go:165
helm.sh/helm/v3/pkg/action.(*Install).RunWithContext
helm.sh/helm/v3/pkg/action/install.go:259
main.runInstall
helm.sh/helm/v3/cmd/helm/install.go:264
main.newTemplateCmd.func2
helm.sh/helm/v3/cmd/helm/template.go:82
github.com/spf13/cobra.(*Command).execute
github.com/spf13/[email protected]/command.go:856
github.com/spf13/cobra.(*Command).ExecuteC
github.com/spf13/[email protected]/command.go:974
github.com/spf13/cobra.(*Command).Execute
github.com/spf13/[email protected]/command.go:902
main.main
helm.sh/helm/v3/cmd/helm/helm.go:83
runtime.main
runtime/proc.go:250
runtime.goexit
runtime/asm_amd64.s:1571
我尝试了很多其他选择,但没有任何效果。
我希望结果是
{{inputs.parameters.args}}
而不是 "{{inputs.parameters.args}}"
试试这个:
args: '{{ "{{" }}inputs.parameters.args{{ "}}" }}'