Refactor backend to support automatically deployed Prometheus servers
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
As part of our work to support automatically deployed Prometheus servers into Kubernetes (https://gitlab.com/gitlab-org/gitlab-ce/issues/28916), we have to accomplish a few things on the backend:
- We should move the PrometheusIntegration metrics logic into PrometheusAdapter that could be provided by PrometheusService and Cluster Prometheus Application, adapter would accept the Prometheus endpoint to use in order to scrape metrics.
- For Prometheus servers deployed this way, we should utilize the Kubernetes proxy API to reach them without needing to make them external facing. A PoC has been completed here: https://gitlab.com/gitlab-org/gitlab-ce/issues/30480
- Introduce support for multiple clusters, and therefore multiple Prometheus servers, in a single project. There will still be a single Prometheus server per environment.
Edited by 🤖 GitLab Bot 🤖