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