Enhance Prometheus integration for managed deployments on Kubernetes
We are now able to deploy Prometheus servers to connected Kubernetes clusters with a single button (#41053 (closed)). With GitLab's multi-cluster support, this can mean either a single or multiple Prometheus servers for a given project.
We now need to take this further to make the experience seamless:
- Automatically enable Prometheus integration, configured for each deployed Prometheus instance
- Logic to determine which Prometheus server to utilize for a given environment, if multiple clusters are connected.
- Utilize the Kubernetes API to securely query the Prometheus servers without requiring them to be externally reachable outside the cluster
The general user flow will be:
- User connects a Kubernetes cluster(s)
- Deploys Helm Tiller, then Prometheus
- At this point, Prometheus integration is now automatically enabled. Manually configuring the Prometheus URL is now disabled, instead showing that this is being automatically managed.
- Monitoring UI elements now appear, and will function as expected for environments which have had a Prometheus server deployed.
- In the event that the cluster for an environment does not have Prometheus deployed, they will see the empty state.
One note, the currently deployed Ingress does not have metrics enabled or proper annotations for Prometheus monitoring. This is being resolved in #39985 (closed).
Note: The general design and user experience for installing applications in the Cluster page is found in #38464 (closed)