From 11eefe9cdb4be78ed846739130ccbae577b98775 Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Mon, 11 Nov 2024 20:03:27 +0100 Subject: [PATCH] fix(selector): Update labels --- manifests/node-exporter/service.yaml | 13 ++++++++----- manifests/node-exporter/servicemonitor.yaml | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/manifests/node-exporter/service.yaml b/manifests/node-exporter/service.yaml index b03b338..2a8f211 100644 --- a/manifests/node-exporter/service.yaml +++ b/manifests/node-exporter/service.yaml @@ -4,14 +4,17 @@ metadata: name: node-exporter namespace: monitoring annotations: - prometheus.io/scrape: 'true' - prometheus.io/port: '9100' + prometheus.io/scrape: 'true' + prometheus.io/port: '9100' + labels: + app.kubernetes.io/component: exporter + app.kubernetes.io/name: node-exporter spec: - selector: - app.kubernetes.io/component: exporter - app.kubernetes.io/name: node-exporter ports: - name: node-exporter protocol: TCP port: 9100 targetPort: 9100 + selector: + app.kubernetes.io/component: exporter + app.kubernetes.io/name: node-exporter diff --git a/manifests/node-exporter/servicemonitor.yaml b/manifests/node-exporter/servicemonitor.yaml index d71465d..4818379 100644 --- a/manifests/node-exporter/servicemonitor.yaml +++ b/manifests/node-exporter/servicemonitor.yaml @@ -6,6 +6,7 @@ metadata: spec: selector: matchLabels: + app.kubernetes.io/component: exporter app.kubernetes.io/name: node-exporter endpoints: - port: node-exporter