feat: support serviceMonitor
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Markus Pesch 2023-10-02 12:23:19 +02:00
parent 986356499f
commit 2f70402c3a
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,26 @@
{{- if .Values.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
{{- with .Values.serviceMonitor.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "prometheus-fail2ban-exporter.labels" . | nindent 4 }}
name: {{ include "prometheus-fail2ban-exporter.fullname" . }}
spec:
endpoints:
- honorLabels: {{ .Values.serviceMonitor.honorLabels }}
interval: {{ .Values.serviceMonitor.interval }}
path: {{ .Values.serviceMonitor.path }}
scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }}
targetPort: {{ .Values.service.port }}
jobLabel: {{ include "prometheus-fail2ban-exporter.fullname" . }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
{{- include "prometheus-fail2ban-exporter.labels" . | nindent 6 }}
{{- end }}

View File

@ -95,6 +95,15 @@ service:
type: ClusterIP
port: 9191
serviceMonitor:
enabled: false
annotations: {}
honorLabels: false
interval: 60s
labels: {}
path: /metrics
scrapeTimeout: 30s
tolerations: []
volumeMounts: