From 572b464ac139f9ea3fee190335944abb8d397964 Mon Sep 17 00:00:00 2001 From: Pharb Date: Mon, 16 Sep 2019 10:50:38 +0200 Subject: [PATCH] [stable/node-problem-detector] Add relabelings to include node label (#17124) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick Harböck --- stable/node-problem-detector/Chart.yaml | 2 +- .../node-problem-detector/templates/servicemonitor.yaml | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/stable/node-problem-detector/Chart.yaml b/stable/node-problem-detector/Chart.yaml index 4eeabcbeea..6f2a0a3c17 100644 --- a/stable/node-problem-detector/Chart.yaml +++ b/stable/node-problem-detector/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: node-problem-detector -version: "1.5.2" +version: "1.6.0" appVersion: v0.7.0 home: https://github.com/kubernetes/node-problem-detector description: Installs the node-problem-detector daemonset for monitoring extra attributes on nodes diff --git a/stable/node-problem-detector/templates/servicemonitor.yaml b/stable/node-problem-detector/templates/servicemonitor.yaml index ddc0a3b1b1..6487c75a40 100644 --- a/stable/node-problem-detector/templates/servicemonitor.yaml +++ b/stable/node-problem-detector/templates/servicemonitor.yaml @@ -23,4 +23,13 @@ spec: - port: exporter path: /metrics interval: 60s + relabelings: + - action: replace + targetLabel: node + sourceLabels: + - __meta_kubernetes_pod_node_name + - action: replace + targetLabel: host_ip + sourceLabels: + - __meta_kubernetes_pod_host_ip {{- end }}