fix(Uptime Kuma): Wrong metrics port (#6456)

* (fix) Uptime Kuma: Missing metrics port

* bump

* common annotations

* add some tidbits

* Update charts/stable/uptime-kuma/templates/_prometheusrules.tpl

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* Update charts/stable/uptime-kuma/templates/_prometheusrules.tpl

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* common

* common 2

* Update charts/stable/uptime-kuma/templates/common.yaml

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>

* fix (Uptime Kuma): Prometheus rules

* bump

* fix(uptime kuma): metrics port wrong

* bump

* remove pod annotations

* link port with the listenting port

Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
This commit is contained in:
MaverickD650 2023-01-19 21:08:29 +00:00 committed by GitHub
parent 3117d9f96e
commit f0203f696b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 20 deletions

View File

@ -1,13 +1,5 @@
{{- include "tc.common.loader.init" . }}
{{- if hasKey .Values "metrics" -}}
{{- if .Values.metrics.enabled -}}
{{- $_ := set .Values.podAnnotations "prometheus.io/scrape" "true" -}}
{{- $_ := set .Values.podAnnotations "prometheus.io/path" "/metrics" -}}
{{- $_ := set .Values.podAnnotations "prometheus.io/port" (.Values.service.metrics.ports.metrics.targetPort | quote) -}}
{{- end -}}
{{- end -}}
{{- include "uptime.servicemonitor" . -}}
{{- include "uptime.prometheusrule" . -}}

View File

@ -13,23 +13,14 @@ podSecurityContext:
security:
PUID: 0
env:
UPTIME_KUMA_PORT: "{{ .Values.service.main.ports.main.port }}"
service:
main:
ports:
main:
port: 3001
targetPort: 3001
# Metrics Services
metrics:
enabled: true
type: ClusterIP
ports:
metrics:
enabled: true
protocol: HTTP
port: 3002
targetPort: 3002
persistence:
config: