defenseunicorns / uds-package-postgres-operator

🏭 UDS Postgres Operator Zarf Package
Apache License 2.0
5 stars 1 forks source link

feat(metrics): building blocks for postgres exporter #53

Closed rwh85 closed 1 month ago

rwh85 commented 1 month ago

Description

This PR enhances the package by introducing a metrics endpoint to the PostgreSQL cluster pods. The implementation involves adding a sidecar to the pods, which exposes a port for Prometheus to scrape using a configured PodMonitor.

The changes avoid using the package CR to expose the metrics endpoint due to its complexity, particularly the need to exempt from uds/skip-mutate: "true" and to configure the PeerAuthentication CR to carve out a permissive mTLS port for the PodMonitor.

Monitoring can be enabled, but defaults to false.

Related Issue

Relates to #51

Type of change

Checklist before merging

rwh85 commented 1 month ago

@Racer159 @zachariahmiller - Thanks for the support on this. I think I've got us to a better place with all initial issues resolved. Noting that the sidecar config is now in the more specific values files as it seems helm isn't able to merge the values in that array so I'm only getting the content of the values file with most precedence. Please let me know if there is anything else you'd like to see here.