cnpg with authentik

This commit is contained in:
Ruben Hensen
2026-03-15 00:27:17 +01:00
parent 09f019264f
commit 4d551d43b0
3 changed files with 46 additions and 11 deletions
+11 -10
View File
@@ -24,7 +24,12 @@ spec:
bootstrap_password: ""
bootstrap_token: ""
postgresql:
host: authentik-postgres-rw
name: authentik
user: authentik
password: ""
existingSecret:
secretName: authentik-secrets
global:
env:
- name: AUTHENTIK_SECRET_KEY
@@ -42,6 +47,11 @@ spec:
secretKeyRef:
name: authentik-secrets
key: bootstrap_token
- name: AUTHENTIK_POSTGRESQL__PASSWORD
valueFrom:
secretKeyRef:
name: authentik-postgres-credentials
key: password
server:
ingress:
enabled: true
@@ -55,16 +65,7 @@ spec:
hosts:
- authentik.rubenhensen.nl
postgresql:
enabled: true
auth:
password: ""
postgresPassword: ""
primary:
persistence:
storageClass: longhorn
size: 8Gi
existingSecret: authentik-secrets
existingSecretKey: postgres_password
enabled: false
redis:
enabled: true
master:
+19 -1
View File
@@ -23,7 +23,25 @@ spec:
remoteRef:
key: kv/authentik
property: bootstrap_token
- secretKey: postgres_password
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: authentik-postgres-credentials
spec:
secretStoreRef:
name: vault-backend
kind: ClusterSecretStore
refreshInterval: 15m
target:
name: authentik-postgres-credentials
creationPolicy: Owner
data:
- secretKey: username
remoteRef:
key: kv/authentik
property: postgres_user
- secretKey: password
remoteRef:
key: kv/authentik
property: postgres_password
+16
View File
@@ -0,0 +1,16 @@
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: authentik-postgres
spec:
instances: 1
primaryUpdateStrategy: unsupervised
bootstrap:
initdb:
database: authentik
owner: authentik
secret:
name: authentik-postgres-credentials
storage:
storageClass: longhorn
size: 8Gi