Skip to content
Snippets Groups Projects

Deploy prometheus through kubernetes and autoconnect to cluster

Merged Paweł Chojnacki requested to merge pawel/connect_to_prometheus_through_proxy-30480 into master
Compare and Show latest version
6 files
+ 76
8
Compare changes
  • Side-by-side
  • Inline
Files
6
@@ -40,15 +40,20 @@ def install_command
end
def proxy_client
return unless cluster.kubeclient
return unless kube_client
kube_client = cluster.kubeclient
proxy_url = kube_client.proxy_url('service', service_name, service_port, Gitlab::Kubernetes::Helm::NAMESPACE)
# ensures headers containing auth data are appended to original k8s client options
options = kube_client.rest_client.options.merge(headers: kube_client.headers)
RestClient::Resource.new(proxy_url, options)
end
private
def kube_client
cluster&.kubeclient
end
end
end
end
Loading