From dde9610341a78ed8570ca673ef7c51d97dac5605 Mon Sep 17 00:00:00 2001 From: Jo Date: Tue, 19 Sep 2023 14:54:38 +0200 Subject: [PATCH] fix: cnpg acid consistency compliance (#419) --- .../kontinuous/tests/__snapshots__/extends-ovh.prod.yaml | 8 ++++---- packages/kontinuous/tests/__snapshots__/pg.prod.yaml | 4 ++-- plugins/fabrique/charts/pg/values.yaml | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/kontinuous/tests/__snapshots__/extends-ovh.prod.yaml b/packages/kontinuous/tests/__snapshots__/extends-ovh.prod.yaml index f895757652..7043f79acb 100644 --- a/packages/kontinuous/tests/__snapshots__/extends-ovh.prod.yaml +++ b/packages/kontinuous/tests/__snapshots__/extends-ovh.prod.yaml @@ -770,8 +770,8 @@ spec: name: fabrique-prod-backups-access-key wal: compression: gzip - minSyncReplicas: 0 - maxSyncReplicas: 0 + minSyncReplicas: 1 + maxSyncReplicas: 1 postgresql: parameters: TimeZone: Europe/Paris @@ -852,8 +852,8 @@ spec: name: fabrique-prod-backups-access-key wal: compression: gzip - minSyncReplicas: 0 - maxSyncReplicas: 0 + minSyncReplicas: 1 + maxSyncReplicas: 1 postgresql: parameters: TimeZone: Europe/Paris diff --git a/packages/kontinuous/tests/__snapshots__/pg.prod.yaml b/packages/kontinuous/tests/__snapshots__/pg.prod.yaml index 07721b8065..d684c8e0cb 100644 --- a/packages/kontinuous/tests/__snapshots__/pg.prod.yaml +++ b/packages/kontinuous/tests/__snapshots__/pg.prod.yaml @@ -530,8 +530,8 @@ spec: name: fabrique-prod-backups-access-key wal: compression: gzip - minSyncReplicas: 0 - maxSyncReplicas: 0 + minSyncReplicas: 1 + maxSyncReplicas: 1 postgresql: parameters: TimeZone: Europe/Paris diff --git a/plugins/fabrique/charts/pg/values.yaml b/plugins/fabrique/charts/pg/values.yaml index abd2bab7c4..a582d683df 100644 --- a/plugins/fabrique/charts/pg/values.yaml +++ b/plugins/fabrique/charts/pg/values.yaml @@ -11,6 +11,8 @@ recovery: cnpg-cluster: enabled: true + ~tpl~minSyncReplicas: "{{ or (and .Values.Parent._ProjectValues (index .Values.Parent._ProjectValues `cnpg-cluster`).minSyncReplicas) ((or .Values.global.isProd .Values.global.isPreProd) | ternary `1` `0`) }}" + ~tpl~maxSyncReplicas: "{{ or (and .Values.Parent._ProjectValues (index .Values.Parent._ProjectValues `cnpg-cluster`).maxSyncReplicas) ((or .Values.global.isProd .Values.global.isPreProd) | ternary `1` `0`) }}" fullnameOverride: test-cluster ~tpl~fullnameOverride: "{{ index .Values.kontinuous.chartContext 2 }}" ~tpl~nameOverride: "{{ index .Values.kontinuous.chartContext 2 }}"