Fixing prometheus monitoring (#157)

At least the latest versions of prometheus watch for a label called "release" and not "prometheus" so with that change prometheus started collecting logs.

If that old label is still needed, we / I could change it to add entries from "additionalLabels", so that we are quite flexible and don't have breaking changes.

Co-authored-by: Justin Lamp <jlamp@vater-gruppe.de>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/157
Reviewed-by: luhahn <luhahn@noreply.gitea.io>
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: modzilla <modzilla@noreply.gitea.io>
Co-committed-by: modzilla <modzilla@noreply.gitea.io>
This commit is contained in:
modzilla 2021-06-07 22:28:28 +08:00 committed by techknowlogick
parent 5ab596937a
commit 441f0748e9
2 changed files with 4 additions and 3 deletions

View File

@ -5,8 +5,8 @@ metadata:
name: {{ include "gitea.fullname" . }}
labels:
{{- include "gitea.labels" . | nindent 4 }}
{{- if .Values.gitea.metrics.serviceMonitor.prometheusSelector }}
prometheus: {{ .Values.gitea.metrics.serviceMonitor.prometheusSelector }}
{{- if .Values.gitea.metrics.serviceMonitor.additionalLabels }}
{{- toYaml .Values.gitea.metrics.serviceMonitor.additionalLabels | nindent 4 }}
{{- end }}
spec:
selector:

View File

@ -131,7 +131,8 @@ gitea:
enabled: false
serviceMonitor:
enabled: false
# prometheusSelector: default
# additionalLabels:
# prometheus-release: prom1
ldap:
enabled: false