Gitea-HelmChart/templates/gitea/servicemonitor.yaml
Starefossen 7ed82c7a63 Add ServiceMonitor Prometheus selector label (#116)
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/116
Reviewed-by: luhahn <luhahn@noreply.gitea.io>
Reviewed-by: lafriks <lafriks@noreply.gitea.io>
Co-authored-by: Starefossen <starefossen@noreply.gitea.io>
Co-committed-by: Starefossen <starefossen@noreply.gitea.io>
2021-03-01 20:18:09 +08:00

17 lines
506 B
YAML

{{- if .Values.gitea.metrics.serviceMonitor.enabled -}}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "gitea.fullname" . }}
labels:
{{- include "gitea.labels" . | nindent 4 }}
{{- if .Values.metrics.serviceMonitor.prometheusSelector }}
prometheus: {{ .Values.metrics.serviceMonitor.prometheusSelector }}
{{- end }}
spec:
selector:
matchLabels:
{{- include "gitea.selectorLabels" . | nindent 6 }}
endpoints:
- port: http
{{- end -}}