我正在创建一个舵图,我想在其中使用模板函数指定值的默认值。具体来说,我想使用覆盖值 image.name,或默认为模板函数 Chart.name:
{{ .Values.image.name | default include chart.name . }}
Run Code Online (Sandbox Code Playgroud)
但是在对图表进行 linting 时出现以下错误:
[ERROR] templates/: render error in "chart/templates/deployment.yaml": template: chart/templates/deployment.yaml:22:81: executing "chart/templates/deployment.yaml" at <include>: wrong number of args for include: want 2 got 0
Run Code Online (Sandbox Code Playgroud)
是否可以使用包含的模板函数作为默认值?或者我只能使用文字吗?
| 归档时间: |
|
| 查看次数: |
1479 次 |
| 最近记录: |