mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 06:04:05 -08:00
4663f814d6
When using Kubernetes service discovery on a Prometheus instance that's not running inside Kubernetes, the creation of the service discovery fails with a "no such file or directory" error as the special `/var/run/secrets/kubernetes.io/serviceaccount/namespace` file is not there. This commit moves the code that reads this file into the if-branch where no `APIServer.URL` is given (that one basically makes Prometheus assume it is running inside of a Kubernetes cluster). Signed-off-by: Georg Gadinger <nilsding@nilsding.org> |
||
---|---|---|
.. | ||
client_metrics.go | ||
endpoints.go | ||
endpoints_test.go | ||
endpointslice.go | ||
endpointslice_test.go | ||
ingress.go | ||
ingress_adaptor.go | ||
ingress_test.go | ||
kubernetes.go | ||
kubernetes_test.go | ||
node.go | ||
node_test.go | ||
pod.go | ||
pod_test.go | ||
service.go | ||
service_test.go |