We are using helm-secrets with the vault driver to get secrets from our hashicorp vault. On top of that we are using helmfile. The problem I have is to get the multi row secrets (such as certificates) to be handled correctly.
I have the secrets.yaml file as follows:
db:
clientCert: !vault secret/certs#clientCert
But that gives me the error of Error converting YAML to JSON: yaml: line 2: could not find expected ':'
I assume this is is because the resulting yaml when getting the cert is like this:
db:
clientCert: -----BEGIN CERTIFICATE-----
blablabla
balbalblalb
balblablbbal
-----END CERTIFICATE-----
I understand that I need the pipe when putting in the cert so it would be like this:
db:
clientCert: |
-----BEGIN CERTIFICATE-----
blablabla
balbalblalb
balblablbbal
-----END CERTIFICATE-----
So to do this I would like to do something like this:
db:
clientCert: |
!vault secret/certs#clientCert
But that does not work and gives me Error converting YAML to JSON: yaml: unknown anchor 'helm-secret-secret_certs_clientCert' referenced
What am I doing wrong? How can I get the multiline certificate from vault into the secrets file correctly?
I hope this makes sense to some one.