在 values.yaml 中传递新行 \n 时出现 Helm 错误

时间:2021-02-09 17:21:15

标签: kubernetes-helm

我有一个用例可以将一个字符串 pem 传递给秘密使用的值。但我收到以下错误

error converting YAML to JSON: yaml: line 11: could not find expected ':'

我的秘密

apiVersion: v1
kind: Secret
metadata:
  name: certificates-secret
type: Opaque
stringData:
  certificate: {{ .Values.certificate  }}

我的价值观.yaml

certificate: "-----BEGIN CERTIFICATE-----\nMIIDLzCCAhegAwIBAgIICNlgr6maU7QwDQY....\n-----END CERTIFICATE-----\n"

任何人都可以在这里帮忙。

0 个答案:

没有答案