prometheus-fail2ban-exporte.../templates/serviceMonitor.yaml
Markus Pesch 469535d2a8
All checks were successful
continuous-integration/drone/push Build is passing
fix(serviceMonitor): support HTTP scheme and tls configuration
2023-10-02 12:43:39 +02:00

29 lines
1.0 KiB
YAML

{{- 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 }}
scheme: {{ .Values.serviceMonitor.scheme }}
targetPort: {{ .Values.service.port }}
tlsConfig:
insecureSkipVerify: {{ .Values.serviceMonitor.tlsConfig.insecureSkipVerify }}
jobLabel: {{ include "prometheus-fail2ban-exporter.fullname" . }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
{{- include "prometheus-fail2ban-exporter.labels" . | nindent 6 }}
{{- end }}