我正在关注https://helm.sh/docs/chart_template_guide/accessing_files/中提到的示例。
我可以在 configmap 中加载 toml 文件,但是当我使用 rego 文件时,出现错误:
cat multiple_config.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-configmap
data:
{{- $files := .Files }}
{{- range tuple "label-check.rego" }}
{{ . }}: |-
{{ $files.Get . }}
{{- end }}
Error :-
Error: YAML parse error on opa/templates/multiple_config.yaml: error converting YAML to JSON: yaml: line 14: could not find expected ':'