Files
jellyfin-helm/charts/jellyfin/templates/serviceMonitor.yaml
T
Larsandgithub-actions[bot] 7e21541fb2 chore(jellyfin)!: ♻️ Migrate the helm chart to newer standard level (#40)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-07 08:15:51 -07:00

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 }}