Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
49 lines
1.6 KiB
YAML
49 lines
1.6 KiB
YAML
{{- if and .Values.metrics.serviceMonitor.enabled .Values.metrics.enabled }}
|
|
---
|
|
apiVersion: monitoring.coreos.com/v1
|
|
kind: ServiceMonitor
|
|
metadata:
|
|
name: {{ include "jellyfin.fullname" . }}
|
|
{{- if .Values.metrics.serviceMonitor.namespace }}
|
|
namespace: {{ tpl .Values.metrics.serviceMonitor.namespace . }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "jellyfin.labels" . | nindent 4 }}
|
|
{{- with .Values.metrics.serviceMonitor.labels }}
|
|
{{- tpl (toYaml . | nindent 4) $ }}
|
|
{{- end }}
|
|
spec:
|
|
endpoints:
|
|
- port: {{ .Values.service.name }}
|
|
{{- with .Values.metrics.serviceMonitor.interval }}
|
|
interval: {{ . }}
|
|
{{- end }}
|
|
{{- with .Values.metrics.serviceMonitor.scrapeTimeout }}
|
|
scrapeTimeout: {{ . }}
|
|
{{- end }}
|
|
honorLabels: true
|
|
path: {{ .Values.metrics.serviceMonitor.path }}
|
|
scheme: {{ .Values.metrics.serviceMonitor.scheme }}
|
|
{{- with .Values.metrics.serviceMonitor.tlsConfig }}
|
|
tlsConfig:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.metrics.serviceMonitor.relabelings }}
|
|
relabelings:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.metrics.serviceMonitor.metricRelabelings }}
|
|
metricRelabelings:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
jobLabel: "{{ .Release.Name }}"
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: {{ include "jellyfin.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
{{- with .Values.metrics.serviceMonitor.targetLabels }}
|
|
targetLabels:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- end }}
|