【发布时间】:2018-12-20 11:20:13
【问题描述】:
我在 json 文件中定义了值。
cat templates/encrypt.json
{"encrypt": "cg8StVXbQJ0gPvMd9o7yrg=="}
该值必须传递给 yaml 文件,如下所示
-config-file={{ tpl (.Files.Get "encrypt.json") . | b64enc }} \
下面是舵图sn-p
exec /bin/consul agent \
-node="${NODE}" \
-advertise="${POD_IP}" \
-bind=0.0.0.0 \
-client=0.0.0.0 \
{{- if .Values.client.grpc }}
-hcl="ports { grpc = 8502 }" \
{{- end }}
-config-dir=/consul/config \
{{- range .Values.client.extraVolumes }}
{{- if .load }}
-config-dir=/consul/userconfig/{{ .name }} \
{{- end }}
{{- end }}
-datacenter={{ .Values.global.datacenter }} \
-data-dir=/consul/data \
-config-file={{ tpl (.Files.Get "encrypt.json") . | b64enc }} \
{{- if (.Values.client.join) and (gt (len .Values.client.join) 0) }}
当我运行我的健康图表时,我收到以下错误。
Error: unable to decode "": Object 'Kind' is missing in '{"encrypt":"cg8StVXbQJ0gPvMd9o7yrg=="}'
【问题讨论】:
标签: kubernetes kubernetes-helm