chore(paperless): pre-stage prune:disabled on the pprl-pg CNPG objects (stage 1) #399

Merged
k.renner merged 1 commits from paperless-prune-protect into master 2026-07-25 05:20:38 +00:00
Member

Stage 1 of folding seed-paperless into the existing dedicated paperless KS — same proven two-step, and simpler than woodpecker (single ownership transfer, no app-object dance / no CI restart).

Adds kustomize.toolkit.fluxcd.io/prune: disabled in place to the 5 CNPG objects under seed/paperless/:

  • Cluster/pprl-pg (HA, 2 instances — pruning deletes its data PVCs)
  • ObjectStore/pprl-pg-store, ScheduledBackup/pprl-pg-daily
  • ExternalSecret/barman-cloud-creds, ExternalSecret/hetzner-s3-creds

The 4 data/media/consume/redis PVCs already carry it. Metadata-only → no CNPG restart; landing it via seed-paperless guarantees it's live before the move.

Verified: kubectl kustomize seed/paperless → 9 objects, all 9 prune-protected; pprl-pg healthy (2/2 ready, RESTARTS=0), barman backups current (~2.7h ago) as a backstop.

Stage 2 (follow-up): git mv seed/paperless/* → apps/paperless/, add the cnpg-barman dep + CNPG healthCheckExprs to the paperless KS and drop its dependsOn: seed-paperless, delete seed-paperless, and drop seed-paperless from the e2e checks.

**Stage 1** of folding `seed-paperless` into the existing dedicated `paperless` KS — same proven two-step, and simpler than woodpecker (single ownership transfer, no app-object dance / no CI restart). Adds `kustomize.toolkit.fluxcd.io/prune: disabled` in place to the 5 CNPG objects under `seed/paperless/`: - `Cluster/pprl-pg` (HA, 2 instances — pruning deletes its data PVCs) - `ObjectStore/pprl-pg-store`, `ScheduledBackup/pprl-pg-daily` - `ExternalSecret/barman-cloud-creds`, `ExternalSecret/hetzner-s3-creds` The 4 data/media/consume/redis PVCs already carry it. **Metadata-only → no CNPG restart**; landing it via `seed-paperless` guarantees it's live before the move. **Verified:** `kubectl kustomize seed/paperless` → 9 objects, all 9 prune-protected; `pprl-pg` healthy (2/2 ready, `RESTARTS=0`), barman backups current (~2.7h ago) as a backstop. **Stage 2** (follow-up): `git mv seed/paperless/* → apps/paperless/`, add the `cnpg-barman` dep + CNPG `healthCheckExprs` to the `paperless` KS and drop its `dependsOn: seed-paperless`, delete `seed-paperless`, and drop `seed-paperless` from the e2e checks.
claude-bot added 1 commit 2026-07-25 05:16:42 +00:00
Stage 1 of folding seed-paperless into the existing dedicated paperless KS.
Adds kustomize.toolkit.fluxcd.io/prune: disabled, in place, to the five CNPG DB
objects under seed/paperless/ so the ownership handoff can never prune them:

- Cluster/pprl-pg (HA, 2 instances — pruning deletes its data PVCs)
- ObjectStore/pprl-pg-store, ScheduledBackup/pprl-pg-daily
- ExternalSecret/barman-cloud-creds, ExternalSecret/hetzner-s3-creds

The 4 data/media/consume/redis PVCs already carry the annotation. Landing it via
the existing seed-paperless KS guarantees it's live before the move. Metadata-
only; no spec change, so CNPG and the running pprl-pg instances are untouched.

Unlike woodpecker this is a single ownership transfer (seed-paperless ->
paperless KS, both already dedicated), so no app-object commonAnnotations / CI
restart is involved. pprl-pg has healthy barman backups (last ~2.7h) as a
backstop.

Co-Authored-By: Claude Bot <claude-bot@renner.uno>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
review-bot left a comment
Member

🤖 Automated review — model claude-haiku-4-5-20251001 (complexity: trivial), commit 555c783774a0622ceae38d4b05d488b2964ff7cb.

Advisory review by the review-bot pipeline. It never approves; a human merges. Push new commits to get a fresh review.


Summary

This PR adds kustomize.toolkit.fluxcd.io/prune: disabled annotations to 5 CNPG objects (Cluster, ObjectStore, ScheduledBackup, 2× ExternalSecret) under seed/paperless/, protecting them from accidental pruning during the ownership handoff from seed-paperless to the paperless Kustomization. The changes are metadata-only, follow existing patterns (matching the 4 PVCs that already carry the annotation), and have been verified by the author. No blocking issues.

🟢 Nits

  • The cluster.yaml comment is longer and more detailed than the others (mentioning "CRITICAL data-guard" and permanence), which is appropriate given the cluster's criticality—no change needed, but the varying comment length is worth noting as intentional rather than inconsistent.

Tests

This is a Kubernetes configuration change without application logic; manual verification suffices. The author has verified:

  • All 9 objects are prune-protected after the change (kubectl kustomize seed/paperless)
  • The pprl-pg cluster is healthy (2/2 ready, RESTARTS=0)
  • Barman backups are current (~2.7h ago)

No automated tests are needed for this metadata addition.

Recommendation

Looks reasonable — no blocking issues; the nit above is optional.

🤖 **Automated review** — model `claude-haiku-4-5-20251001` (complexity: trivial), commit `555c783774a0622ceae38d4b05d488b2964ff7cb`. > Advisory review by the `review-bot` pipeline. It never approves; a human merges. Push new commits to get a fresh review. --- ## Summary This PR adds `kustomize.toolkit.fluxcd.io/prune: disabled` annotations to 5 CNPG objects (Cluster, ObjectStore, ScheduledBackup, 2× ExternalSecret) under `seed/paperless/`, protecting them from accidental pruning during the ownership handoff from `seed-paperless` to the `paperless` Kustomization. The changes are metadata-only, follow existing patterns (matching the 4 PVCs that already carry the annotation), and have been verified by the author. No blocking issues. ## 🟢 Nits - The `cluster.yaml` comment is longer and more detailed than the others (mentioning "CRITICAL data-guard" and permanence), which is appropriate given the cluster's criticality—no change needed, but the varying comment length is worth noting as intentional rather than inconsistent. ## Tests This is a Kubernetes configuration change without application logic; manual verification suffices. The author has verified: - All 9 objects are prune-protected after the change (`kubectl kustomize seed/paperless`) - The `pprl-pg` cluster is healthy (2/2 ready, RESTARTS=0) - Barman backups are current (~2.7h ago) No automated tests are needed for this metadata addition. ## Recommendation Looks reasonable — no blocking issues; the nit above is optional. <!-- pr-review:sha=555c783774a0622ceae38d4b05d488b2964ff7cb -->
k.renner merged commit c0635775e5 into master 2026-07-25 05:20:38 +00:00
Sign in to join this conversation.