Yaml Helm模板三值集算子

Yaml Helm模板三值集算子,yaml,kubernetes-helm,Yaml,Kubernetes Helm,在Helmv3中,如何在模板中使用三元集运算符?如果设置了Values.global.postgresql.password(不是空的),我要查找逻辑,否则使用值.default.postgresql\u password。以下操作不起作用: apiVersion:v1 数据: postgresql密码:{{.Values.global.postgresql.password |.Values.default.postgresql|u password | b64enc} 种类:秘密 元数据:

在Helm
v3
中,如何在模板中使用三元集运算符?如果设置了Values.global.postgresql.password(不是空的),我要查找逻辑
,否则使用
值.default.postgresql\u password
。以下操作不起作用:

apiVersion:v1 数据: postgresql密码:{{.Values.global.postgresql.password |.Values.default.postgresql|u password | b64enc} 种类:秘密 元数据: 名称:postgresql密码 类型:不透明
如果设置了
x
,则使用该选项,否则使用
“一些默认值”

舵杆(弹簧)功能可以实现这一点<代码>{x | default“some default”},或
{{default”some default“x}

postgres密码:{{.Values.global.postgresql.password}default.Values.default.postgresql_password}b64enc}