From 5536165d58279974cf8d174965c5c1e317d0c678 Mon Sep 17 00:00:00 2001 From: sandrejevs Date: Fri, 1 Oct 2021 16:39:10 +0300 Subject: [PATCH 1/2] add serviceMonitor.targetLabels --- charts/kminion/templates/servicemonitor.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/charts/kminion/templates/servicemonitor.yaml b/charts/kminion/templates/servicemonitor.yaml index cfc4b22..214affe 100644 --- a/charts/kminion/templates/servicemonitor.yaml +++ b/charts/kminion/templates/servicemonitor.yaml @@ -17,4 +17,8 @@ spec: - port: metrics path: /metrics honorLabels: {{ .Values.serviceMonitor.honorLabels }} -{{- end }} + {{- if .Values.serviceMonitor.targetLabels}} + targetLabels: + {{toYaml .Values.serviceMonitor.targetLabels | nindent 4}} + {{- end}} + {{- end }} From 7cbbc7de65ec6b57e2f22e6c266b40727decb947 Mon Sep 17 00:00:00 2001 From: Sergey <19sergey89@inbox.lv> Date: Mon, 11 Oct 2021 10:21:27 +0300 Subject: [PATCH 2/2] fix indent --- charts/kminion/templates/servicemonitor.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/kminion/templates/servicemonitor.yaml b/charts/kminion/templates/servicemonitor.yaml index 214affe..6622629 100644 --- a/charts/kminion/templates/servicemonitor.yaml +++ b/charts/kminion/templates/servicemonitor.yaml @@ -19,6 +19,6 @@ spec: honorLabels: {{ .Values.serviceMonitor.honorLabels }} {{- if .Values.serviceMonitor.targetLabels}} targetLabels: - {{toYaml .Values.serviceMonitor.targetLabels | nindent 4}} + {{- toYaml .Values.serviceMonitor.targetLabels | nindent 4}} {{- end}} {{- end }}