Add metrics_path label to kubelet servicemonitor endpoints (#277)

* Add metrics_path label to kubelet servicemonitor endpoints

* Set kubelet metric_path label in jsonnet

* Add generated kubelet servicemonitor
This commit is contained in:
Jake Utley authored and Frederic Branczyk committed 2019-10-24 09:16:57 +02:00
1 parent a7884a6c18
commit 4e5b454ba8
5 files changed
+82 -4

No files matched your search

@@ -281,6 +281,12 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
insecureSkipVerify: true,
},
bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token',
relabelings: [
{
sourceLabels: ['__metrics_path__'],
targetLabel: 'metrics_path'
},
],
},
{
port: 'https-metrics',
@@ -292,6 +298,12 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
insecureSkipVerify: true,
},
bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token',
relabelings: [
{
sourceLabels: ['__metrics_path__'],
targetLabel: 'metrics_path'
},
],
metricRelabelings: [
// Drop a bunch of metrics which are disabled but still sent, see
// https://github.com/google/cadvisor/issues/1925.