From 58ac010cec8d69f3298b4026e099a718113b8872 Mon Sep 17 00:00:00 2001
From: Sheogorath <sheogorath@shivering-isles.com>
Date: Sun, 8 Oct 2023 03:21:56 +0200
Subject: [PATCH] fix(nut-exporter): Fix broken template + tests

---
 charts/nut-exporter/templates/podmonitor.yaml                 | 1 -
 .../nut-exporter/tests/__snapshot__/snapshot_test.yaml.snap   | 4 ++++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/charts/nut-exporter/templates/podmonitor.yaml b/charts/nut-exporter/templates/podmonitor.yaml
index 537d71d98..a20f34470 100644
--- a/charts/nut-exporter/templates/podmonitor.yaml
+++ b/charts/nut-exporter/templates/podmonitor.yaml
@@ -26,7 +26,6 @@ spec:
       params:
         {{ toYaml . | nindent 8}}
       {{- end }}
-      {{- with .Values.podMonitor.metricLabels }}
   jobLabel: nut-exporter
   namespaceSelector:
     matchNames:
diff --git a/charts/nut-exporter/tests/__snapshot__/snapshot_test.yaml.snap b/charts/nut-exporter/tests/__snapshot__/snapshot_test.yaml.snap
index 61f10d354..117eaddc6 100644
--- a/charts/nut-exporter/tests/__snapshot__/snapshot_test.yaml.snap
+++ b/charts/nut-exporter/tests/__snapshot__/snapshot_test.yaml.snap
@@ -105,6 +105,10 @@ should match basic snapshot:
         - interval: 15s
           path: /ups_metrics
           port: http
+          relabelings:
+            - source_labels:
+                - __param_ups
+              target_label: ups
           scheme: http
       selector:
         matchLabels:
-- 
GitLab