Remove app-level CNPG resources from platform (Phase 2b cleanup) #16
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
ldraney/pal-e-platform#16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Plan
plan-2026-02-26-tf-modularize-postgres-- Phase 2b (cleanup platform)Repo
forgejo_admin/pal-e-platformUser Story
As a platform operator
I want app-level CNPG resources removed from the platform repo
So that the platform only owns the operator and shared infra, and app-level concerns live in pal-e-services
Context
The platform repo currently deploys both the CNPG operator (shared infra) and the pal-e-docs-specific Postgres cluster, backup schedule, and credentials (app-level). This violates the platform/service boundary. App-level CNPG resources (cluster, scheduled backup, app credentials) should be managed by pal-e-services, not pal-e-platform. The operator, shared namespace, shared S3 bucket, and shared IAM stay in platform.
File Targets
Files the agent should modify:
terraform/main.tf-- remove 4 resource blocks (cnpg_cluster, cnpg_scheduled_backup, cnpg_superuser, paledocs_db_credentials)terraform/variables.tf-- remove 3 variables (paledocs_db_username, paledocs_db_password, cnpg_superuser_password)terraform/outputs.tf-- remove 2 outputs (cnpg_cluster_name, postgres_internal_dsn), keep cnpg_namespaceterraform/k3s.tfvars.example-- remove 2 lines (paledocs_db_password, cnpg_superuser_password)Files the agent should NOT touch:
terraform/providers.tf-- no changes neededterraform/versions.tf-- no changes neededsalt/-- host-level, unrelatedAcceptance Criteria
kubernetes_manifest.cnpg_clusterresource block is removed from main.tfkubernetes_manifest.cnpg_scheduled_backupresource block is removed from main.tfkubernetes_secret_v1.cnpg_superuserresource block is removed from main.tfkubernetes_secret_v1.paledocs_db_credentialsresource block is removed from main.tfpaledocs_db_username,paledocs_db_password,cnpg_superuser_passwordremoved from variables.tfcnpg_cluster_name,postgres_internal_dsnremoved from outputs.tfcnpg_namespaceis preserved in outputs.tfpaledocs_db_passwordandcnpg_superuser_passwordremoved from k3s.tfvars.exampletofu fmtpassestofu validatepassesTest Expectations
tofu fmt -checkreturns 0tofu validatereturns successtofu fmt -check && tofu validate(in terraform/ directory)Constraints
tofunotterraform)tofu planortofu state rm-- those happen after merge on main workdirforgejo(notorigin)tofu fmtandtofu validatebefore pushingChecklist
Related
plan-2026-02-26-tf-modularize-postgres-- Terraform modularization of Postgres