fix: pin all 32 CNPG-injected parameters to stop drift #15
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-platform!15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "13-fix-cnpg-all-parameters"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
kubernetes_manifestto detect drift on everytofu planChanges
Test Plan
tofu fmtpassestofu planshould show no diff on the CNPG Cluster resource after applykubectl get cluster pal-e-postgres -o jsonpath='{.spec.postgresql.parameters}'Review Checklist
Related Notes
plan-2026-02-26-tf-modularize-postgres-- Phase 2: Deploy CloudNativePG to k3sClosing — wrong approach.
Pinning all 32 CNPG-injected defaults makes us own the operator's internal config. If CNPG updates defaults on upgrade, our manifest overrides them silently. This is brittle.
Root cause:
kubernetes_manifestdoes strict drift detection and CNPG's admission webhook mutates the spec by injecting operational defaults (WAL, logging, TLS, etc.). This is a known provider limitation, not a parameters problem.Better path: Switch from
kubernetes_manifesttokubectl_manifest(gavinbunney/kubectl provider) for CRD resources. It tolerates webhook mutations and we only declare the ~12 tuning params we actually care about.Also exposed a process gap: no
tofu planwas run by the dev agent or validated by QA for any of PRs #12, #14, or #15. Addressing that separately.Closing. Superseded by architecture revision — Cluster CRD, secrets, and backup resources are moving out of pal-e-platform entirely. Platform will only own the CNPG operator install. App repos will define their own Cluster CRDs, deployed via ArgoCD. See updated plan:
plan-2026-02-26-tf-modularize-postgres.forgejo_admin referenced this pull request2026-03-09 22:34:35 +00:00
Pull request closed