fix: replace deprecated CNPG enablePodMonitor with TLS-configured PodMonitor #103
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#103
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?
Lineage
todo-cnpg-metrics-exporter(no plan ancestry)Repo
forgejo_admin/pal-e-platformUser Story
As a platform operator
I want CNPG postgres metrics scraped reliably by Prometheus
So that database observability is not silently broken by a deprecated auto-generated PodMonitor
Context
The CNPG operator's
enablePodMonitor: trueauto-generates a PodMonitor that is missing TLS configuration, causing Prometheus to drop the CNPG metrics target on port 9187. The port IS listening and serving metrics, but the scrape target stays down. Additionally,enablePodMonitoris deprecated in CNPG 1.28 and will be removed in a future release. The fix is to setenablePodMonitor = falseand create a manualPodMonitorresource with the correct selector labels. The CA cert exists in thewoodpecker-db-casecret in the woodpecker namespace.File Targets
Files the agent should modify:
terraform/main.tf-- changeenablePodMonitor = truetofalse, add newkubernetes_manifestresource for the manual PodMonitorFiles the agent should NOT touch:
Acceptance Criteria
tofu plan, then the CNPG cluster shows monitoring.enablePodMonitor changing to falsetofu plan, then a new PodMonitor resourcewoodpecker-dbis createdkubectl get podmonitor -n woodpeckerafter apply, thenwoodpecker-dbappearsTest Expectations
tofu fmt -check -recursivepassestofu validatepasses (requires state, CI-only)cd terraform && tofu fmt -check -recursiveConstraints
woodpecker_postgresandwoodpecker_postgres_scheduled_backupChecklist
Related
todo-cnpg-metrics-exporterpal-e-platform-- project this affects