我有地狱档案
releases:
- name: controller
values:
- values/valuedata.yaml
hooks:
{{ toYaml .Values.hooks }}带值的文件
hooks:
- events: [ "presync" ]
showlogs: true
command: "bash"
args: [ "args"]我想从价值中传递钩子--我怎么能做到这一点?我尝试了很多方法,得到了一个错误--这是命令
helmfile --file ./myhelmfile.yaml sync failed to read myhelmfile.yaml: reading document at index 1: yaml: line 26: did not find expected '-' indicator发布于 2021-12-08 20:10:25
您要做的是将values.yaml的一部分插入到模板中。因此,您需要适当地处理缩进。
在你的情况下,我想应该是这样的:
releases:
- name: controller
values:
- values/valuedata.yaml
hooks:
{{ toYaml .Values.hooks | indent 6 }}您可以找到类似案例这里的工作示例。
https://stackoverflow.com/questions/70279692
复制相似问题