helm-charts/speedtest-exporter/templates/servicemonitor.yaml

26 lines
740 B
YAML

{{- if and .Values.prometheus.servicemonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "speedtest-exporter.fullname" . }}
labels:
{{- include "speedtest-exporter.labels" . | nindent 4 }}
{{- with .Values.prometheus.servicemonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
{{- include "speedtest-exporter.selectorLabels" . | nindent 6 }}
endpoints:
- port: http
path: "/metrics"
{{- with .Values.prometheus.servicemonitor }}
{{- with .interval }}
interval: {{ . }}
{{- end }}
{{- with .scrapeTimeout }}
scrapeTimeout: {{ . }}
{{- end }}
{{- end }}
{{- end }}