mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00: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
3 changed files with 6 additions and 0 deletions
|
@ -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 a new issue