diff --git a/charts/kminion/templates/servicemonitor.yaml b/charts/kminion/templates/servicemonitor.yaml index cfc4b22..6622629 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 }}