Investigate ability to use port forwarding for connectivity between GitLab and Prometheus server in Kubernetes
Description
Presently depending on the location of the GitLab server and Prometheus server, connectivity can be a challenge. For example customers who choose to self-host GitLab but run their apps in a cloud provider would need to manage firewall rules. This is generally not a very large problem as they likely know their own IP addresses, but is a larger problem for GitLab.com where they change.
We should try to provide a cleaner solution to make this easier for our customers.
Proposal
Kubernetes has built in support for port forwarding. We should investigate if we can leverage some of this tool chain to automatically route requests from the GitLab server through to the Prometheus pod.
Links / references
https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/
Documentation blurb
Prior to GitLab 9.3, direct connectivity between GitLab and the Prometheus server was required. This posed a challenge when GitLab and Prometheus were in different network environments, for example when the Prometheus server was running inside of a Kubernetes cluster.
With this release, we are proud to announce that GitLab can now access the Prometheus server through the Kubernetes API server. This means that GitLab can easily access the Prometheus server, without any network changes within Kubernetes.