From 25ba4b71152393ea9b1bbac4130562350255fd9d Mon Sep 17 00:00:00 2001 From: MichaelFisher1997 Date: Sun, 29 Mar 2026 03:15:23 +0000 Subject: [PATCH] fix: Add skipEmptyWalArchiveCheck annotation and B2 secret healthcheck to CNPG - Skip WAL archive emptiness check so recovery works when restoring over an existing backup archive in B2 - Add healthCheck for b2-credentials secret in CNPG kustomization to prevent recovery from starting before ExternalSecret has synced --- infrastructure/addons/cnpg/postgres-cluster.yaml | 2 ++ infrastructure/addons/kustomization-cnpg.yaml | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/infrastructure/addons/cnpg/postgres-cluster.yaml b/infrastructure/addons/cnpg/postgres-cluster.yaml index 8fc8100..3c7e25c 100644 --- a/infrastructure/addons/cnpg/postgres-cluster.yaml +++ b/infrastructure/addons/cnpg/postgres-cluster.yaml @@ -3,6 +3,8 @@ kind: Cluster metadata: name: rancher-db namespace: cnpg-cluster + annotations: + cnpg.io/skipEmptyWalArchiveCheck: "enabled" spec: description: "Rancher external database cluster" imageName: ghcr.io/cloudnative-pg/postgresql:17.4 diff --git a/infrastructure/addons/kustomization-cnpg.yaml b/infrastructure/addons/kustomization-cnpg.yaml index 8ccb25f..4eff6ee 100644 --- a/infrastructure/addons/kustomization-cnpg.yaml +++ b/infrastructure/addons/kustomization-cnpg.yaml @@ -14,4 +14,10 @@ spec: timeout: 10m suspend: false dependsOn: - - name: addon-cnpg-operator \ No newline at end of file + - name: addon-cnpg-operator + - name: addon-external-secrets + healthChecks: + - apiVersion: v1 + kind: Secret + name: b2-credentials + namespace: cnpg-cluster \ No newline at end of file