helm-charts/charts/keydb/templates/sm.yaml
devthejo 9b67090f9d
Some checks failed
Mirror Sync / codeberg (push) Successful in 21s
🎉 Release Commit / create release using commit-and-tag-version (push) Has been cancelled
feat: add keydb chart
2024-07-12 23:07:19 +02:00

31 lines
978 B
YAML

{{- if and .Values.exporter.enabled .Values.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "keydb.fullname" . }}
labels:
{{- include "keydb.labels" . | nindent 4 }}
{{- if .Values.serviceMonitor.labels }}
{{- toYaml .Values.serviceMonitor.labels | nindent 4 }}
{{- end }}
{{- if .Values.serviceMonitor.annotations }}
annotations:
{{- toYaml .Values.serviceMonitor.annotations | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
{{- include "keydb.labels" . | nindent 6 }}
namespaceSelector:
matchNames:
- {{.Release.Namespace }}
endpoints:
- port: redis-exporter
path: {{ .Values.exporter.scrapePath }}
{{- if .Values.serviceMonitor.interval }}
interval: {{ .Values.serviceMonitor.interval }}
{{- end }}
{{- if .Values.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }}
{{- end }}
{{- end }}