mirror of
https://github.com/truecharts/charts.git
synced 2026-07-18 16:15:09 -03:00
fix (Uptime Kuma): Missing metrics port (#6435)
* (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> 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:
@@ -21,7 +21,7 @@ sources:
|
||||
- https://github.com/truecharts/charts/tree/master/charts/stable/uptime-kuma
|
||||
- https://github.com/louislam/uptime-kuma
|
||||
type: application
|
||||
version: 5.0.11
|
||||
version: 5.0.12
|
||||
annotations:
|
||||
truecharts.org/catagories: |
|
||||
- monitoring
|
||||
|
||||
23
charts/stable/uptime-kuma/templates/_prometheusrules.tpl
Normal file
23
charts/stable/uptime-kuma/templates/_prometheusrules.tpl
Normal file
@@ -0,0 +1,23 @@
|
||||
{{- define "uptime.prometheusrule" -}}
|
||||
{{- if hasKey .Values "metrics" }}
|
||||
{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }}
|
||||
---
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PrometheusRule
|
||||
metadata:
|
||||
name: {{ include "tc.common.names.fullname" . }}
|
||||
labels:
|
||||
{{- include "tc.common.labels" . | nindent 4 }}
|
||||
{{- with .Values.metrics.prometheusRule.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
groups:
|
||||
- name: {{ include "tc.common.names.fullname" . }}
|
||||
rules:
|
||||
{{- with .Values.metrics.prometheusRule.rules }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -1,5 +1,7 @@
|
||||
{{- define "uptime.servicemonitor" -}}
|
||||
{{- if hasKey .Values "metrics" }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
---
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
@@ -24,3 +26,4 @@ spec:
|
||||
path: /metrics
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -1 +1,15 @@
|
||||
{{ include "tc.common.loader.all" . }}
|
||||
{{- 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" . -}}
|
||||
|
||||
{{/* Render the templates */}}
|
||||
{{ include "tc.common.loader.apply" . }}
|
||||
|
||||
@@ -20,6 +20,17 @@ service:
|
||||
port: 3001
|
||||
targetPort: 3001
|
||||
|
||||
# Metrics Services
|
||||
metrics:
|
||||
enabled: true
|
||||
type: ClusterIP
|
||||
ports:
|
||||
metrics:
|
||||
enabled: true
|
||||
protocol: HTTP
|
||||
port: 3002
|
||||
targetPort: 3002
|
||||
|
||||
persistence:
|
||||
config:
|
||||
enabled: true
|
||||
|
||||
Reference in New Issue
Block a user