add external vault

This commit is contained in:
Vassiliy Yegorov
2022-08-23 17:15:45 +07:00
parent 17235aecda
commit 9c63fb579b
3 changed files with 1106 additions and 3 deletions

View File

@@ -29,10 +29,10 @@ spec:
app: vault-test
annotations:
vault.hashicorp.com/agent-inject: 'true'
vault.hashicorp.com/role: 'vault-test'
vault.hashicorp.com/agent-inject-secret-credentials: 'kv/secret/vault-test'
vault.hashicorp.com/role: 'k8s-role'
vault.hashicorp.com/agent-inject-secret-credentials: 'secret/k8s/config'
vault.hashicorp.com/agent-inject-template-credentials: |
{{- with secret "kv/secret/vault-test" -}}
{{- with secret "secret/k8s/config" -}}
postgresql://{{ .Data.data.username }}:{{ .Data.data.password }}@{{ .Data.data.psqlhost }}:5432/{{ .Data.data.database }}
{{- end -}}
spec: