GoogleCloudPlatform / GoogleCloudPlatform/prometheus-engine
Add support for targeting services for scraping
- Dominant language
- Go
- Stars
- 232
- Forks
- 109
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 27
Description
An increasing number of providers are placing their metrics endpoints behind a service rather than digesting them directly from a deployment. [Kyverno](https://github.com/kyverno/kyverno/blob/main/charts/kyverno/templates/service.yaml#L24-L47) and [ArgoCD](https://github.com/argoproj/argo-cd/blob/master/manifests/install.yaml#L9536-L9551) are notable examples. Other implementations of Prometheus collectors have a CRD that allows you to scrape metrics by targeting a service.
https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/crds/crd-servicemonitors.yaml
The only way to target these endpoints currently is to ignore the service, parse the deployment that's generating metrics for a label you can use, and construct a `PodMonitoring` resource for each deployment that generates metrics. It sucks because it makes what should be a single simple monitoring resource into multiple monitoring resources that are generally more brittle.
Contributor guide
Assessment
This issue has not been assessed yet.