mirror of
https://gitlab.com/deepcypher/dc-kc.git
synced 2026-01-27 11:12:08 +00:00
Added cnpg blue restore
Changelog: added Signed-off-by: GeorgeRaven <GeorgeRavenCommunity@pm.me>
This commit is contained in:
55
charts/keycloak/templates/cnpg/cluster-blue.yaml
Normal file
55
charts/keycloak/templates/cnpg/cluster-blue.yaml
Normal file
@@ -0,0 +1,55 @@
|
||||
{{- if .Values.psql.enabled }}
|
||||
# https://blog.palark.com/cloudnativepg-and-other-kubernetes-operators-for-postgresql/
|
||||
# https://cloudnative-pg.io/documentation/current/rolling_update/#automated-updates-unsupervised
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Cluster
|
||||
metadata:
|
||||
name: psql-blue
|
||||
spec:
|
||||
|
||||
instances: 2
|
||||
imageName: ghcr.io/cloudnative-pg/postgresql:17.5 # renovate: datasource=docker depName=ghcr.io/cloudnative-pg/postgresql
|
||||
primaryUpdateStrategy: unsupervised # enables automated updates
|
||||
primaryUpdateMethod: switchover # how to handle updates switch to new or restart old primary
|
||||
enablePDB: false
|
||||
storage:
|
||||
size: 8Gi
|
||||
|
||||
bootstrap:
|
||||
recovery:
|
||||
backup:
|
||||
name: psql-daily-backup-20260118000000
|
||||
|
||||
initdb:
|
||||
database: keycloak
|
||||
owner: keycloak
|
||||
secret:
|
||||
name: psql
|
||||
dataChecksums: true
|
||||
#encoding: 'LATIN1'
|
||||
encoding: 'UTF8'
|
||||
|
||||
managed:
|
||||
roles:
|
||||
- name: keycloak
|
||||
ensure: present
|
||||
comment: keycloak database user
|
||||
login: true
|
||||
superuser: true
|
||||
passwordSecret:
|
||||
name: psql
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 150m
|
||||
limits:
|
||||
memory: 400Mi
|
||||
|
||||
backup:
|
||||
retentionPolicy: "10d"
|
||||
volumeSnapshot:
|
||||
online: true
|
||||
onlineConfiguration:
|
||||
immediateCheckpoint: true
|
||||
snapshotOwnerReference: backup
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user