From 51f6d8258fe54f7f2e99e61ae8f077332c707b4b Mon Sep 17 00:00:00 2001
From: Guillermo Facundo Colunga <guillermo.facundo.colunga@cern.ch>
Date: Tue, 21 Jan 2025 15:52:36 +0100
Subject: [PATCH] [MONIT-4105] templates/coredns: allow user provided
 relabelings

---
 templates/coredns/servicemonitor.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/templates/coredns/servicemonitor.yaml b/templates/coredns/servicemonitor.yaml
index b67f3b8..2250f65 100644
--- a/templates/coredns/servicemonitor.yaml
+++ b/templates/coredns/servicemonitor.yaml
@@ -13,6 +13,9 @@ spec:
       sourceLabels:
       - __meta_kubernetes_pod_node_name
       targetLabel: instance
+    {{- if and .Values.metrics.coredns .Values.metrics.coredns.serviceMonitor.relabelings }}
+    {{- .Values.metrics.coredns.serviceMonitor.relabelings | toYaml | nindent 4}}
+    {{- end }}
   jobLabel: jobLabel
   namespaceSelector:
     matchNames:
-- 
GitLab