From f0203f696b399e8d5ba8d345c118e4a8ed5e100a Mon Sep 17 00:00:00 2001 From: MaverickD650 <92877124+MaverickD650@users.noreply.github.com> Date: Thu, 19 Jan 2023 21:08:29 +0000 Subject: [PATCH] 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> --- charts/stable/uptime-kuma/templates/common.yaml | 8 -------- charts/stable/uptime-kuma/values.yaml | 15 +++------------ 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/charts/stable/uptime-kuma/templates/common.yaml b/charts/stable/uptime-kuma/templates/common.yaml index 9699ed7d301..0dd42f50429 100644 --- a/charts/stable/uptime-kuma/templates/common.yaml +++ b/charts/stable/uptime-kuma/templates/common.yaml @@ -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" . -}} diff --git a/charts/stable/uptime-kuma/values.yaml b/charts/stable/uptime-kuma/values.yaml index 252ca751a11..4226525d1bb 100644 --- a/charts/stable/uptime-kuma/values.yaml +++ b/charts/stable/uptime-kuma/values.yaml @@ -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: