configure postgresql for crowdsec
This commit is contained in:
6
crowdsec/templates/serviceaccount.yaml
Normal file
6
crowdsec/templates/serviceaccount.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: crowdsec
|
||||
namespace: {{ .Release.Namespace }}
|
||||
automountServiceAccountToken: true
|
||||
13
crowdsec/templates/vaultauth.yaml
Normal file
13
crowdsec/templates/vaultauth.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: secrets.hashicorp.com/v1beta1
|
||||
kind: VaultAuth
|
||||
metadata:
|
||||
name: crowdsec
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
method: kubernetes
|
||||
mount: kubernetes
|
||||
kubernetes:
|
||||
role: crowdsec
|
||||
serviceAccount: crowdsec
|
||||
audiences:
|
||||
- vault
|
||||
25
crowdsec/templates/vaultdynamicsecret.yaml
Normal file
25
crowdsec/templates/vaultdynamicsecret.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
apiVersion: secrets.hashicorp.com/v1beta1
|
||||
kind: VaultDynamicSecret
|
||||
metadata:
|
||||
name: crowdsec-db-credentials
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
|
||||
# Mount path of the secrets backend
|
||||
mount: postgres
|
||||
|
||||
# Path to the secret
|
||||
path: creds/crowdsec
|
||||
|
||||
# Where to store the secrets, VSO will create the secret
|
||||
destination:
|
||||
create: true
|
||||
name: crowdsec-db-credentials
|
||||
|
||||
# Restart these pods when secrets rotated
|
||||
rolloutRestartTargets:
|
||||
- kind: Deployment
|
||||
name: crowdsec-lapi
|
||||
|
||||
# Name of the CRD to authenticate to Vault
|
||||
vaultAuthRef: crowdsec
|
||||
Reference in New Issue
Block a user