Closed roseDickinson closed 2 months ago
Nevermind - this was a misunderstanding of the purpose of the version
field in the VaultStaticSecret
spec. I was setting it to 2
because I thought it signified that it was the kv version 2 not the version of the secret to pull. Removing the .
just happened to fix my issue (multiple times) because the "fixed" secrets were all the second versions of the secrets.
Describe the bug We are using Vault with the Vault Secrets Operator in our Kubernetes cluster. I have been trying to track down for a few days now why some secrets in Vault were being added to the cluster fine but others were not. The only log that I found anywhere was in the events in the secret namespace/describe of the VaultStaticSecret's that were not being created
Failed to read Vault secret: empty response from Vault, path="kvv2/data/prod/secret-name"
. The message itself wasn't very helpful so I just started random changes, it turned out to be the fact that in Vault the value of the secret started with a.
as soon as I removed the.
from the start of the secret it appeared in our Kubernetes cluster.To Reproduce Steps to reproduce the behavior:
.
at the start e.g.secret-name='.secret_value'
Failed to read Vault secret: empty response from Vault, path="kvv2/data/prod/secret-name
error message.
prefix from the secret valueApplication deployment:
We have Vault setup externally on a VM, no special config for it.
Expected behavior The secret to be created in the cluster regardless of whether there is a
.
at the start. Or at the very least some documentation somewhere that explains restrictions in secret values (I haven't found this anywhere but apologies if it exists somewhere already).Environment