2019-08-17 23:37:14 +02:00
|
|
|
{{- if and .Values.vminsert.enabled .Values.vminsert.serviceMonitor.enabled -}}
|
|
|
|
apiVersion: monitoring.coreos.com/v1
|
|
|
|
kind: ServiceMonitor
|
|
|
|
metadata:
|
|
|
|
{{- if .Values.vminsert.serviceMonitor.annotations }}
|
|
|
|
annotations:
|
|
|
|
{{ toYaml .Values.vminsert.serviceMonitor.annotations | indent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
labels:
|
|
|
|
{{- include "victoria-metrics.vminsert.labels" . | nindent 4 }}
|
2019-09-03 16:45:35 +02:00
|
|
|
{{- if .Values.vminsert.serviceMonitor.extraLabels }}
|
2019-08-17 23:37:14 +02:00
|
|
|
{{ toYaml .Values.vminsert.serviceMonitor.extraLabels | indent 4 }}
|
2019-09-03 16:45:35 +02:00
|
|
|
{{- end }}
|
2019-08-17 23:37:14 +02:00
|
|
|
name: {{ template "victoria-metrics.vminsert.fullname" . }}
|
|
|
|
spec:
|
|
|
|
namespaceSelector:
|
|
|
|
matchNames:
|
|
|
|
- {{ .Release.Namespace }}
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
{{- include "victoria-metrics.vminsert.matchLabels" . | nindent 6 }}
|
|
|
|
endpoints:
|
|
|
|
- port: http
|
|
|
|
{{- if .Values.vminsert.serviceMonitor.interval }}
|
|
|
|
interval: {{ .Values.vminsert.serviceMonitor.interval }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.vminsert.serviceMonitor.scrapeTimeout }}
|
|
|
|
scrapeTimeout: {{ .Values.vminsert.serviceMonitor.scrapeTimeout }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|