admin管理员组文章数量:1123063
I am trying to render '{{ tpl .Values.Kuber.Namespace . }}'
and got error:
in ./helmfile.yaml: failed to read .helmfile\environments.yaml: failed to load environment values file "envs\local\ns\values\names.yaml.gotmpl": failed to render [envs\local\ns\values\names.yaml.gotmpl], because of template: stringTemplate:15:24: executing "stringTemplate" at <.Values.Name.LoDash>: map has no entry for key "Name"
I have found a bug but have no idea how modify my code to get values rendered properly. Could somebody please
tell where the error and what should be modified to get tpl
function working? (it able to see Kuber.Namespace
but can not see anything other)
Thanks in advance!
helmfile.yaml
bases:
- .helmfile/environments.yaml
---
helmDefaults:
kubeContext: {{ .Values.kubeContext }}
helmfiles:
- path: helmfile-app.yaml
values:
- {{ toYaml .Values | nindent 8 }}
helmfile-app.yaml
helmDefaults:
kubeContext: {{ .Values.kubeContext }}
cleanupOnFail: false
verify: false
historyMax: 10
skipDeps: true
reuseValues: false
repositories:
- name: ealenn
url:
releases:
- name: postgres
namespace: '{{ tpl .Values.Kuber.Namespace . }}'
chart: ealenn/echo-server
createNamespace: true
.helmfile/environments.yaml
environments:
local/ns:
missingFileHandler: Info
values:
- envs/{{ .Environment.Name }}/values/*.*
- envs/{{ .Environment.Name }}/*.*
envs/local/ns/values/names.yaml.gotmpl
kubeContext: minikube
LoDash: '{{ .Environment.Name | replace "/" "_" }}'
Name:
LoDash: '{{ .Environment.Name | replace "/" "_" }}'
Dash: '{{ .Environment.Name | replace "/" "-" }}'
Slash: '{{ .Environment.Name }}'
Kuber:
Namespace: "{{ .Values.Name.LoDash }}"
本文标签: kubernetes helmHelmfile no values during tpl functionStack Overflow
版权声明:本文标题:kubernetes helm - Helmfile no values during tpl function - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736545737a1944443.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论