authentik cluster refactor

This commit is contained in:
2025-06-10 16:32:29 -04:00
parent b43e1a8021
commit 95204ab87d
3 changed files with 13 additions and 11 deletions

View File

@@ -1,9 +1,10 @@
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: authentik-postgres
name: postgres-cluster
namespace: authentik
annotations:
# needed to allow for recovery from same name cluster backup
cnpg.io/skipEmptyWalArchiveCheck: enabled
spec:
instances: 3
@@ -15,20 +16,21 @@ spec:
login: true
bootstrap:
# initdb:
# database: authentik
# owner: authentik
# secret:
# name: authentik-postgres-credentials
recovery:
source: authentik-postgres
initdb:
database: authentik
owner: authentik
secret:
name: authentik-postgres-credentials
# NOTE: uncomment this and commend the above initdb when recovering
# recovery:
# source: postgres-cluster
storage:
size: 8Gi
storageClass: longhorn-pg
externalClusters:
- name: authentik-postgres
- name: postgres-cluster
barmanObjectStore:
destinationPath: "s3://mthomson-cnpg-backup/authentik/"
endpointURL: "https://s3.ca-central-1.wasabisys.com"

View File

@@ -17,7 +17,7 @@ spec:
authentik:
secret_key: file:///secret-key/key
postgresql:
host: authentik-postgres-rw
host: postgres-cluster-rw
user: file:///postgres-creds/username
password: file:///postgres-creds/password
server:

View File

@@ -8,4 +8,4 @@ spec:
backupOwnerReference: self
#immediate: true
cluster:
name: authentik-postgres
name: postgres-cluster