fix(ha-restore-test): recreate recovered cluster as ha-pg-restore-2 (REN-339) #1065

Merged
Ghost merged 1 commits from atlas/ren-339-restore-roll into master 2026-09-28 17:26:25 +00:00
3 changed files with 11 additions and 6 deletions
+6 -1
View File
@@ -9,13 +9,18 @@
# never writes a base backup. serverName differs from ha-pg as a second
# guard; see objectstore.yaml.
#
# Named ha-pg-restore-2: the first instance pod predates the plugin and the
# operator will not roll it (it waits on an in-place restart the dead instance
# manager cannot answer). A new name makes Flux prune the old Cluster and
# create this one with the sidecar from the start.
#
# One instance, no walStorage, ceph-block-ephemeral (reclaim Delete) so
# nothing outlives the namespace. 32Gi matches ha-pg's PGDATA: the restored
# data plus the WAL replayed since the last base backup.
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: ha-pg-restore
name: ha-pg-restore-2
namespace: ha-restore-test
spec:
instances: 1
@@ -29,7 +29,7 @@ metadata:
spec:
endpointSelector:
matchLabels:
cnpg.io/cluster: ha-pg-restore
cnpg.io/cluster: ha-pg-restore-2
ingress:
- fromEndpoints:
- matchLabels:
@@ -68,7 +68,7 @@ spec:
egress:
- toEndpoints:
- matchLabels:
cnpg.io/cluster: ha-pg-restore
cnpg.io/cluster: ha-pg-restore-2
toPorts:
- ports:
- port: "5432"
@@ -3,7 +3,7 @@
apiVersion: batch/v1
kind: Job
metadata:
name: ha-pg-check
name: ha-pg-check-2
namespace: ha-restore-test
spec:
backoffLimit: 2
@@ -24,7 +24,7 @@ spec:
image: ghcr.io/cloudnative-pg/postgresql:16
env:
- name: PGHOST
value: ha-pg-restore-rw
value: ha-pg-restore-2-rw
- name: PGDATABASE
value: homeassistant
- name: PGUSER
@@ -32,7 +32,7 @@ spec:
- name: PGPASSWORD
valueFrom:
secretKeyRef:
name: ha-pg-restore-superuser
name: ha-pg-restore-2-superuser
key: password
command:
- bash