mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-13 13:11:37 +01:00
Don't render extraLabels in ServiceMonitor if they are not given
This produced invalid YAML before.
This commit is contained in:
parent
3182e2a66b
commit
7cde25bac4
@ -8,7 +8,9 @@ metadata:
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vminsert.labels" . | nindent 4 }}
|
||||
{{- if .Values.vminsert.serviceMonitor.extraLabels }}
|
||||
{{ toYaml .Values.vminsert.serviceMonitor.extraLabels | indent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "victoria-metrics.vminsert.fullname" . }}
|
||||
spec:
|
||||
namespaceSelector:
|
||||
|
@ -8,7 +8,9 @@ metadata:
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vmselect.labels" . | nindent 4 }}
|
||||
{{- if .Values.vmselect.serviceMonitor.extraLabels }}
|
||||
{{ toYaml .Values.vmselect.serviceMonitor.extraLabels | indent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "victoria-metrics.vmselect.fullname" . }}
|
||||
spec:
|
||||
namespaceSelector:
|
||||
|
@ -8,7 +8,9 @@ metadata:
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "victoria-metrics.vmstorage.labels" . | nindent 4 }}
|
||||
{{- if .Values.vmstorage.serviceMonitor.extraLabels }}
|
||||
{{ toYaml .Values.vmstorage.serviceMonitor.extraLabels | indent 4 }}
|
||||
{{- end }}
|
||||
name: {{ template "victoria-metrics.vmstorage.fullname" . }}
|
||||
spec:
|
||||
namespaceSelector:
|
||||
|
Loading…
Reference in New Issue
Block a user