try vault kvv2 secret engine
This commit is contained in:
13
chart/templates/vaultauth.yaml
Normal file
13
chart/templates/vaultauth.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: secrets.hashicorp.com/v1beta1
|
||||
kind: VaultAuth
|
||||
metadata:
|
||||
name: static-auth
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
method: kubernetes
|
||||
mount: kubernetes
|
||||
kubernetes:
|
||||
role: webapp
|
||||
serviceAccount: {{ include "webapp.serviceAccountName" . }}
|
||||
audiences:
|
||||
- vault
|
||||
24
chart/templates/vaultsecret.yaml
Normal file
24
chart/templates/vaultsecret.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
apiVersion: secrets.hashicorp.com/v1beta1
|
||||
kind: VaultStaticSecret
|
||||
metadata:
|
||||
name: vault-kv-app
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
type: kv-v2
|
||||
|
||||
# mount path
|
||||
mount: kvv2
|
||||
|
||||
# path of the secret
|
||||
path: webapp/config
|
||||
|
||||
# dest k8s secret
|
||||
destination:
|
||||
name: secretkv
|
||||
create: true
|
||||
|
||||
# static secret refresh interval
|
||||
refreshAfter: 30s
|
||||
|
||||
# Name of the CRD to authenticate to Vault
|
||||
vaultAuthRef: static-auth
|
||||
Reference in New Issue
Block a user