【发布时间】:2019-06-20 05:22:03
【问题描述】:
这是 values.yaml 文件。它包含以下内容,当我尝试将其放入 _helper.tpl 时,我得到了Helm template failed. Error: render error in "windows/templates/ingresses/windows.yaml": template: windows/templates/_helpers.tpl:38:18: executing "windows.certificate" at <.Values.ingress.enab...>: can't evaluate field ingress in type interface {} : exit status 1
values.yaml
ingress:
enabled: true
tls: true
certificate: ''
issuer:
name: letsencrypt-staging
hosts:
windows:
- name: ''
path: /
_helpers.tpl
{{/*
Calculate certificate
*/}}
{{- define "windows.certificate" }}
{{- printf .Values.ingress.enabled }} // error line is this. line no 38
{{- end }}
在 windows.yaml 中
- secretName: {{ template "windows.certificate" . }} // calling the helper method.
【问题讨论】:
标签: yaml kubernetes-helm