Secret Type - KEYVALUE
The KEYVALUE-Type is made for synchronising Secrets stored in a KV Secret Engine with Kubernetes Secrets.
It only supports simple Key-Value pairs and not nested Values.
First write some secrets to HashiCorp Vault:
$ vault write secret/test-secret key=value key1=value1
After this create the following Vault-Resource and apply it to Kubernetes:
apiVersion: "koudingspawn.de/v1"
kind: Vault
metadata:
name: test-secret
spec:
type: "KEYVALUE"
path: "secret/test-secret"
Now you should see, that new Secret and the Vault resource are available:
$ kubectl get vault test-secret
NAME AGE
test-secret 7d
$ kubectl get secret test-secret
NAME TYPE DATA AGE
test-secret Opaque 2 7d
Last modified 3yr ago