fix(keycloak): Add backups

This commit is contained in:
2025-11-23 17:16:30 +01:00
parent 15f522d006
commit 6c05151a2e
+42 -3
View File
@@ -124,6 +124,45 @@ extraDeploy:
storage: storage:
resizeInUseVolumes: true resizeInUseVolumes: true
size: 10Gi size: 10Gi
backup: - apiVersion: barmancloud.cnpg.io/v1
retentionPolicy: 60d kind: ObjectStore
target: prefer-standby metadata:
name: tos-store
namespace: keycloak
spec:
retentionPolicy: "7d"
configuration:
destinationPath: s3://cnpg/prod-keycloak-db
endpointURL: http://10.255.241.30:30080
s3Credentials:
accessKeyId:
name: cnpg-s3
key: access_key
secretAccessKey:
name: cnpg-s3
key: access_secret
wal:
compression: snappy
- apiVersion: postgresql.cnpg.io/v1
kind: ScheduledBackup
metadata:
name: prod-keycloak-db
namespace: keycloak
spec:
schedule: "0 0 1 * * *"
backupOwnerReference: self
cluster:
name: prod-keycloak-db
method: plugin
pluginConfiguration:
name: barman-cloud.cloudnative-pg.io
- apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: prod-keycloak-db-monitor
spec:
selector:
matchLabels:
cnpg.io/cluster: prod-keycloak-db
podMetricsEndpoints:
- port: metrics