What: renames the recovered CNPG Cluster in ha-restore-test from ha-pg-restore to ha-pg-restore-2. The check Job becomes ha-pg-check-2, and its PGHOST, superuser Secret and the two CiliumNetworkPolicy selectors follow the new name.
Why:#1063 is live, but the operator will not roll ha-pg-restore-1. It waits for "the primary to be restarted without triggering a switchover", and the instance manager answers 500 because PG never started. Atlas has only view access, so the pod cannot be deleted by hand. With the new name, Flux prunes the old Cluster, which removes its pod and its ceph-block-ephemeral PVC. It then creates a fresh Cluster that has the barman-cloud sidecar (isWALArchiver: false) from the first pod. Job templates are immutable, so the Job is renamed too.
Scope: only namespace ha-restore-test. Nothing in home-assistant or ha-pg changes. There is still no WAL archiving and no Backup.
Verified: reviewed the diff; every reference to ha-pg-restore and ha-pg-check was updated. Not yet run on the cluster. After the merge, Atlas checks that pod ha-pg-restore-2-1 has postgres and plugin-barman-cloud ready and reads the ha-pg-check-2 log.
Revert: revert this commit. The whole namespace is removed by the teardown PR anyway.
**What:** renames the recovered CNPG Cluster in `ha-restore-test` from `ha-pg-restore` to `ha-pg-restore-2`. The check Job becomes `ha-pg-check-2`, and its PGHOST, superuser Secret and the two CiliumNetworkPolicy selectors follow the new name.
**Why:** #1063 is live, but the operator will not roll `ha-pg-restore-1`. It waits for "the primary to be restarted without triggering a switchover", and the instance manager answers 500 because PG never started. Atlas has only `view` access, so the pod cannot be deleted by hand. With the new name, Flux prunes the old Cluster, which removes its pod and its ceph-block-ephemeral PVC. It then creates a fresh Cluster that has the barman-cloud sidecar (`isWALArchiver: false`) from the first pod. Job templates are immutable, so the Job is renamed too.
**Scope:** only namespace `ha-restore-test`. Nothing in `home-assistant` or `ha-pg` changes. There is still no WAL archiving and no Backup.
**Verified:** reviewed the diff; every reference to `ha-pg-restore` and `ha-pg-check` was updated. Not yet run on the cluster. After the merge, Atlas checks that pod `ha-pg-restore-2-1` has `postgres` and `plugin-barman-cloud` ready and reads the `ha-pg-check-2` log.
**Revert:** revert this commit. The whole namespace is removed by the teardown PR anyway.
REN-339
🤖 Generated with [Claude Code](https://claude.com/claude-code)
The operator will not roll ha-pg-restore-1 after #1063; it waits on an
in-place restart the stopped instance manager cannot answer. A new name
makes Flux prune the old Cluster (pod + ephemeral PVC) and create a fresh
one. The check Job is renamed too (Job templates are immutable).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Approved at b86ee49c98. Checked: all cnpg.io/cluster selectors, PGHOST and superuser Secret follow ha-pg-restore-2; no other ref to the old Cluster/Job name; plugin isWALArchiver:false and serverName ha-pg-restore-test unchanged; Flux Kustomization ha-restore-test prune:true, Ready. Live: ha-pg-restore-1 postgres not ready, only ha-restore-test objects change.
Approved at b86ee49c98a15322fcbac0567f426a7ec69dba62. Checked: all cnpg.io/cluster selectors, PGHOST and superuser Secret follow ha-pg-restore-2; no other ref to the old Cluster/Job name; plugin isWALArchiver:false and serverName ha-pg-restore-test unchanged; Flux Kustomization ha-restore-test prune:true, Ready. Live: ha-pg-restore-1 postgres not ready, only ha-restore-test objects change.
Ghost
merged commit 347b7e0806 into master2026-09-28 17:26:25 +00:00
🤖Automated review — model CLI default (complexity: unknown), commit b86ee49c98a15322fcbac0567f426a7ec69dba62.
Advisory review by the review-bot pipeline. It never approves; a human merges. Push new commits to get a fresh review.
Summary
Renames the CNPG Cluster in the throwaway ha-restore-test namespace from ha-pg-restore to ha-pg-restore-2 (and the check Job from ha-pg-check to ha-pg-check-2), so Flux prunes and recreates the Cluster with the barman-cloud plugin sidecar rather than waiting on an operator roll that can't complete. This is a pure rename; every dependent reference (PGHOST, superuser secret, both CiliumNetworkPolicy cnpg.io/cluster selectors, the Job name) is updated consistently, and I confirmed via repo-wide grep that no other file references the old names. No blocking issues.
🟡 Suggestions
kubernetes/apps/ha-restore-test/pg-check-job.yaml:14 — the pod template still carries app.kubernetes.io/name: ha-pg-check (not -2) while the Job resource itself is now ha-pg-check-2. This is self-consistent (the two CiliumNetworkPolicy selectors in network-policy.yaml:44 and network-policy.yaml:67 still match on the unsuffixed label), so nothing is broken, but it's worth a beat of thought: if a future PR bumps this to ha-pg-check-3 and someone renames the label to match the resource name for consistency, the network policies must be updated too since they select on the label, not the Job name. Not a blocker given the whole namespace is short-lived per the PR body.
Tests
No automated tests apply here — this is a set of Kubernetes manifests reconciled by Flux/CNPG in a scratch namespace, and the PR body states the verification is manual (checking pod ha-pg-restore-2-1 and the ha-pg-check-2 job log post-merge). That's consistent with how the rest of this directory is validated. The rename itself is mechanical and low-risk; I verified correctness statically by grepping the full repo for leftover ha-pg-restore/ha-pg-check references and found none outside the three changed files.
Recommendation
Looks reasonable — no blocking issues; comments above are optional.
🤖 **Automated review** — model `CLI default` (complexity: unknown), commit `b86ee49c98a15322fcbac0567f426a7ec69dba62`.
> Advisory review by the `review-bot` pipeline. It never approves; a human merges. Push new commits to get a fresh review.
---
## Summary
Renames the CNPG `Cluster` in the throwaway `ha-restore-test` namespace from `ha-pg-restore` to `ha-pg-restore-2` (and the check `Job` from `ha-pg-check` to `ha-pg-check-2`), so Flux prunes and recreates the Cluster with the barman-cloud plugin sidecar rather than waiting on an operator roll that can't complete. This is a pure rename; every dependent reference (`PGHOST`, superuser secret, both CiliumNetworkPolicy `cnpg.io/cluster` selectors, the Job name) is updated consistently, and I confirmed via repo-wide grep that no other file references the old names. No blocking issues.
## 🟡 Suggestions
- `kubernetes/apps/ha-restore-test/pg-check-job.yaml:14` — the pod template still carries `app.kubernetes.io/name: ha-pg-check` (not `-2`) while the Job resource itself is now `ha-pg-check-2`. This is self-consistent (the two `CiliumNetworkPolicy` selectors in `network-policy.yaml:44` and `network-policy.yaml:67` still match on the unsuffixed label), so nothing is broken, but it's worth a beat of thought: if a future PR bumps this to `ha-pg-check-3` and someone renames the label to match the resource name for consistency, the network policies must be updated too since they select on the label, not the Job name. Not a blocker given the whole namespace is short-lived per the PR body.
## Tests
No automated tests apply here — this is a set of Kubernetes manifests reconciled by Flux/CNPG in a scratch namespace, and the PR body states the verification is manual (checking pod `ha-pg-restore-2-1` and the `ha-pg-check-2` job log post-merge). That's consistent with how the rest of this directory is validated. The rename itself is mechanical and low-risk; I verified correctness statically by grepping the full repo for leftover `ha-pg-restore`/`ha-pg-check` references and found none outside the three changed files.
## Recommendation
Looks reasonable — no blocking issues; comments above are optional.
<!-- pr-review:sha=b86ee49c98a15322fcbac0567f426a7ec69dba62 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What: renames the recovered CNPG Cluster in
ha-restore-testfromha-pg-restoretoha-pg-restore-2. The check Job becomesha-pg-check-2, and its PGHOST, superuser Secret and the two CiliumNetworkPolicy selectors follow the new name.Why: #1063 is live, but the operator will not roll
ha-pg-restore-1. It waits for "the primary to be restarted without triggering a switchover", and the instance manager answers 500 because PG never started. Atlas has onlyviewaccess, so the pod cannot be deleted by hand. With the new name, Flux prunes the old Cluster, which removes its pod and its ceph-block-ephemeral PVC. It then creates a fresh Cluster that has the barman-cloud sidecar (isWALArchiver: false) from the first pod. Job templates are immutable, so the Job is renamed too.Scope: only namespace
ha-restore-test. Nothing inhome-assistantorha-pgchanges. There is still no WAL archiving and no Backup.Verified: reviewed the diff; every reference to
ha-pg-restoreandha-pg-checkwas updated. Not yet run on the cluster. After the merge, Atlas checks that podha-pg-restore-2-1haspostgresandplugin-barman-cloudready and reads theha-pg-check-2log.Revert: revert this commit. The whole namespace is removed by the teardown PR anyway.
REN-339
🤖 Generated with Claude Code
Approved at
b86ee49c98. Checked: all cnpg.io/cluster selectors, PGHOST and superuser Secret follow ha-pg-restore-2; no other ref to the old Cluster/Job name; plugin isWALArchiver:false and serverName ha-pg-restore-test unchanged; Flux Kustomization ha-restore-test prune:true, Ready. Live: ha-pg-restore-1 postgres not ready, only ha-restore-test objects change.🤖 Automated review — model
CLI default(complexity: unknown), commitb86ee49c98a15322fcbac0567f426a7ec69dba62.Summary
Renames the CNPG
Clusterin the throwawayha-restore-testnamespace fromha-pg-restoretoha-pg-restore-2(and the checkJobfromha-pg-checktoha-pg-check-2), so Flux prunes and recreates the Cluster with the barman-cloud plugin sidecar rather than waiting on an operator roll that can't complete. This is a pure rename; every dependent reference (PGHOST, superuser secret, both CiliumNetworkPolicycnpg.io/clusterselectors, the Job name) is updated consistently, and I confirmed via repo-wide grep that no other file references the old names. No blocking issues.🟡 Suggestions
kubernetes/apps/ha-restore-test/pg-check-job.yaml:14— the pod template still carriesapp.kubernetes.io/name: ha-pg-check(not-2) while the Job resource itself is nowha-pg-check-2. This is self-consistent (the twoCiliumNetworkPolicyselectors innetwork-policy.yaml:44andnetwork-policy.yaml:67still match on the unsuffixed label), so nothing is broken, but it's worth a beat of thought: if a future PR bumps this toha-pg-check-3and someone renames the label to match the resource name for consistency, the network policies must be updated too since they select on the label, not the Job name. Not a blocker given the whole namespace is short-lived per the PR body.Tests
No automated tests apply here — this is a set of Kubernetes manifests reconciled by Flux/CNPG in a scratch namespace, and the PR body states the verification is manual (checking pod
ha-pg-restore-2-1and theha-pg-check-2job log post-merge). That's consistent with how the rest of this directory is validated. The rename itself is mechanical and low-risk; I verified correctness statically by grepping the full repo for leftoverha-pg-restore/ha-pg-checkreferences and found none outside the three changed files.Recommendation
Looks reasonable — no blocking issues; comments above are optional.