From 736ec8bc4780ddb1260ac4a2ddfd50cd8053e478 Mon Sep 17 00:00:00 2001 From: Vojtech Mares Date: Thu, 13 Jun 2024 09:34:37 +0200 Subject: [PATCH] feat(postgres): run ha postgres cluster --- manifests/postgres/postgres.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/manifests/postgres/postgres.yaml b/manifests/postgres/postgres.yaml index 217b5e9..79fb068 100644 --- a/manifests/postgres/postgres.yaml +++ b/manifests/postgres/postgres.yaml @@ -6,7 +6,7 @@ metadata: argocd.argoproj.io/sync-wave: "10" spec: imageName: ghcr.io/cloudnative-pg/postgresql:16.2 - instances: 1 + instances: 2 primaryUpdateStrategy: unsupervised primaryUpdateMethod: switchover superuserSecret: @@ -34,7 +34,14 @@ spec: postgresql: parameters: max_connections: "500" - # max_slot_wal_keep_size: "10GB" - # wal_keep_size: "5GB" + max_slot_wal_keep_size: "1GB" + wal_keep_size: "1GB" + # High Availability configuration + minSyncReplicas: 0 + maxSyncReplicas: 1 + # Enable replication slots for HA in the cluster + replicationSlots: + highAvailability: + enabled: true # monitoring: # enablePodMonitor: true