Fix CNPG postgres metrics exporter (PodMonitor deprecation) #154
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#154
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?
Type
Feature
Lineage
plan-pal-e-platform-> Phase 16 -> 16e investigationRepo
forgejo_admin/pal-e-platformUser Story
As a platform operator
I want CNPG postgres metrics scraped by Prometheus
So that the TargetDown alert clears and postgres observability is restored
Context
CNPG Cluster
pal-e-postgreshasenablePodMonitor: truebut the auto-generated PodMonitor is being dropped by Prometheus (807 dropped targets). Port 9187 IS listening and serving valid Prometheus metrics over HTTP.enablePodMonitoris deprecated in CNPG 1.28 and will be removed.Instance image:
ghcr.io/cloudnative-pg/postgresql:17.4-1. Operator version: 1.28.1. Impact: Permanent TargetDown alert forpostgres/pal-e-postgres.Fix: Replace with manual
PodMonitorkubernetes_manifest resource with proper selector labels. The metrics endpoint serves HTTP (not HTTPS), so no TLS config needed in the PodMonitor.File Targets
Files to modify:
terraform/main.tf-- add manual PodMonitor resource, removeenablePodMonitor: truefrom CNPG cluster configAcceptance Criteria
enablePodMonitor: trueremoved from CNPG cluster configTest Expectations
tofu planshows PodMonitor creation and enablePodMonitor removaltofu validatepassestofu plan -lock=falseConstraints
Checklist
Related
pal-e-platform-- parent projectphase-platform-16-alert-tuning-- source investigation