Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explore Adding Metrics Endpoint and Service Monitor #51

Closed
rwh85 opened this issue Jul 12, 2024 · 1 comment
Closed

Explore Adding Metrics Endpoint and Service Monitor #51

rwh85 opened this issue Jul 12, 2024 · 1 comment
Assignees
Labels
enhancement ✨ New feature or request

Comments

@rwh85
Copy link
Contributor

rwh85 commented Jul 12, 2024

Is your feature request related to a problem? Please describe.

Package doesn't expose a metrics endpoint. This feature will aim to add a metrics endpoint using postgres-exporter and then configure a servicemonitor to integrate with the UDS Core Prometheus Operator

Describe the solution you'd like

Provide an option in the helm chart to configure monitoring.

Given it's enabled, the postgres operator will be configured via the OperatorConfiguration CR or in the helm chart. Then using the Package CR a service monitor will be created to connect Prometheus Operator and postgres exporter.

Describe alternatives you've considered

I've look and the zalando images and charts don't enable this functionality. Also there are sever issues the most useful of which is zalando/postgres-operator#264 which has been open for year.

@rwh85 rwh85 added the enhancement ✨ New feature or request label Jul 12, 2024
@rwh85 rwh85 self-assigned this Jul 12, 2024
Racer159 added a commit that referenced this issue Jul 30, 2024
## 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

- [ ] New feature (non-breaking change which adds functionality)

## Checklist before merging

- [ ] Test, docs, adr added or updated as needed
- [ ] [Contributor Guide
Steps](https://github.com/defenseunicorns/uds-package-postgres-operator/blob/main/CONTRIBUTING.md#developer-workflow)
followed

---------

Co-authored-by: Wayne Starr <[email protected]>
@Racer159
Copy link
Contributor

Completed in #53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants