【发布时间】:2020-10-14 05:00:44
【问题描述】:
我想要一个if exists 签入我的 helm 模板的数组对象。我的 YAML 如下所示:
servers:
- hosts: dev
port: 443
{{- if .Values.stage.enabled -}}
- hosts: stage
port: 443
{{- end -}}
我收到了error converting YAML to JSON: yaml: mapping values are not allowed in this context
helm 模板中是否不允许嵌套 if 条件?如果是这样,我该如何解决?
【问题讨论】:
标签: kubernetes-helm