26 lines
705 B
YAML
26 lines
705 B
YAML
|
|
apiVersion: secrets.hashicorp.com/v1beta1
|
||
|
|
kind: VaultDynamicSecret
|
||
|
|
metadata:
|
||
|
|
name: stalwart-db
|
||
|
|
namespace: stalwart
|
||
|
|
spec:
|
||
|
|
mount: database
|
||
|
|
path: static-creds/stalwart
|
||
|
|
allowStaticCreds: true
|
||
|
|
refreshAfter: 5m
|
||
|
|
destination:
|
||
|
|
name: stalwart-db
|
||
|
|
create: true
|
||
|
|
overwrite: true
|
||
|
|
transformation:
|
||
|
|
excludeRaw: true
|
||
|
|
excludes:
|
||
|
|
- .*
|
||
|
|
templates:
|
||
|
|
username:
|
||
|
|
text: '{{ get .Secrets "username" }}'
|
||
|
|
password:
|
||
|
|
text: '{{ get .Secrets "password" }}'
|
||
|
|
dsn:
|
||
|
|
text: 'postgresql://{{ get .Secrets "username" }}:{{ get .Secrets "password" }}@main-rw.postgres.svc.cluster.local:5432/stalwart?sslmode=disable'
|
||
|
|
vaultAuthRef: default
|