diff --git a/clusters/cl01tl/helm/authentik/Chart.lock b/clusters/cl01tl/helm/authentik/Chart.lock index 4b3ce5155..9b850e501 100644 --- a/clusters/cl01tl/helm/authentik/Chart.lock +++ b/clusters/cl01tl/helm/authentik/Chart.lock @@ -8,5 +8,8 @@ dependencies: - name: postgres-cluster repository: oci://harbor.alexlebens.net/helm-charts version: 6.16.1 -digest: sha256:e6ea05d8bdb96164bc19da117078b5101f329ad5f1b461fa02f198bef45454f3 -generated: "2025-12-07T02:54:01.695741198Z" +- name: postgres-cluster + repository: oci://harbor.alexlebens.net/helm-charts + version: 6.16.1 +digest: sha256:3baf363781e7b7bfede344a1fc6442c10340eb404b6487d4d84acb8b1bfee75b +generated: "2025-12-11T16:00:06.802366-06:00" diff --git a/clusters/cl01tl/helm/authentik/Chart.yaml b/clusters/cl01tl/helm/authentik/Chart.yaml index 5c88d5fef..48b649d1e 100644 --- a/clusters/cl01tl/helm/authentik/Chart.yaml +++ b/clusters/cl01tl/helm/authentik/Chart.yaml @@ -31,5 +31,9 @@ dependencies: alias: postgres-17-cluster version: 6.16.1 repository: oci://harbor.alexlebens.net/helm-charts + - name: postgres-cluster + alias: postgres-18-cluster + version: 6.16.1 + repository: oci://harbor.alexlebens.net/helm-charts icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/authentik.png -appVersion: 2025.4.1 +appVersion: 2025.10.2 diff --git a/clusters/cl01tl/helm/authentik/templates/external-secret.yaml b/clusters/cl01tl/helm/authentik/templates/external-secret.yaml index a7a5e73b9..7c66a12ce 100644 --- a/clusters/cl01tl/helm/authentik/templates/external-secret.yaml +++ b/clusters/cl01tl/helm/authentik/templates/external-secret.yaml @@ -109,3 +109,70 @@ spec: key: /garage/home-infra/postgres-backups metadataPolicy: None property: ACCESS_REGION + +--- +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: authentik-postgresql-18-cluster-backup-secret + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: authentik-postgresql-18-cluster-backup-secret + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/part-of: {{ .Release.Name }} +spec: + secretStoreRef: + kind: ClusterSecretStore + name: vault + data: + - secretKey: ACCESS_KEY_ID + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /digital-ocean/home-infra/postgres-backups + metadataPolicy: None + property: access + - secretKey: ACCESS_SECRET_KEY + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /digital-ocean/home-infra/postgres-backups + metadataPolicy: None + property: secret + +--- +apiVersion: external-secrets.io/v1 +kind: ExternalSecret +metadata: + name: authentik-postgresql-18-cluster-backup-secret-garage + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: authentik-postgresql-18-cluster-backup-secret-garage + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/part-of: {{ .Release.Name }} +spec: + secretStoreRef: + kind: ClusterSecretStore + name: vault + data: + - secretKey: ACCESS_KEY_ID + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /garage/home-infra/postgres-backups + metadataPolicy: None + property: ACCESS_KEY_ID + - secretKey: ACCESS_SECRET_KEY + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /garage/home-infra/postgres-backups + metadataPolicy: None + property: ACCESS_SECRET_KEY + - secretKey: ACCESS_REGION + remoteRef: + conversionStrategy: Default + decodingStrategy: None + key: /garage/home-infra/postgres-backups + metadataPolicy: None + property: ACCESS_REGION diff --git a/clusters/cl01tl/helm/authentik/values.yaml b/clusters/cl01tl/helm/authentik/values.yaml index 2670289d3..735878161 100644 --- a/clusters/cl01tl/helm/authentik/values.yaml +++ b/clusters/cl01tl/helm/authentik/values.yaml @@ -106,3 +106,86 @@ postgres-17-cluster: # suspend: false # schedule: "0 0 4 * * SAT" # backupName: garage-remote +postgres-18-cluster: + mode: recovery + cluster: + image: + repository: ghcr.io/cloudnative-pg/postgresql + tag: 18.1-standard-trixie + storage: + storageClass: local-path + walStorage: + storageClass: local-path + monitoring: + enabled: true + prometheusRule: + enabled: true + recovery: + method: import + # objectStore: + # destinationPath: s3://postgres-backups/cl01tl/authentik/authentik-postgresql-18-cluster + # endpointURL: http://garage-main.garage:3900 + # index: 1 + # endpointCredentials: authentik-postgresql-18-cluster-backup-secret-garage + import: + type: "microservice" + databases: + - app + source: + host: "authentik-postgresql-17-cluster-rw" + port: 5432 + username: app + database: app + sslMode: "verify-full" + passwordSecret: + name: "authentik-postgresql-17-cluster-app" + key: "password" + sslKeySecret: + name: "authentik-postgresql-17-cluster-server" + key: "tls.key" + sslCertSecret: + name: "authentik-postgresql-17-cluster-server" + key: "tls.crt" + sslRootCertSecret: + name: "authentik-postgresql-17-cluster-ca" + key: "ca.crt" + backup: + objectStore: + - name: external + destinationPath: s3://postgres-backups-ce540ddf106d186bbddca68a/cl01tl/authentik/authentik-postgresql-18-cluster + index: 1 + retentionPolicy: "30d" + isWALArchiver: false + - name: garage-local + destinationPath: s3://postgres-backups/cl01tl/authentik/authentik-postgresql-18-cluster + index: 1 + endpointURL: http://garage-main.garage:3900 + endpointCredentials: authentik-postgresql-18-cluster-backup-secret-garage + endpointCredentialsIncludeRegion: true + retentionPolicy: "3d" + isWALArchiver: true + # - name: garage-remote + # destinationPath: s3://postgres-backups/cl01tl/authentik/authentik-postgresql-18-cluster + # index: 1 + # endpointURL: https://garage-ps10rp.boreal-beaufort.ts.net:3900 + # endpointCredentials: authentik-postgresql-18-cluster-backup-secret-garage + # retentionPolicy: "30d" + # data: + # compression: bzip2 + # jobs: 2 + scheduledBackups: + - name: daily-backup + suspend: false + immediate: true + schedule: "0 0 0 * * *" + backupName: external + - name: live-backup + suspend: false + immediate: true + schedule: "0 0 0 * * *" + backupName: garage-local + # - name: weekly-backup + # suspend: false + # immediate: true + # schedule: "0 0 4 * * SAT" + # backupName: garage-remote