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:
co-authored by
Stavros Kois
parent
3afe98bcea
commit
2f48a0bd73
@@ -21,7 +21,7 @@ sources:
|
|||||||
- https://github.com/truecharts/charts/tree/master/charts/stable/uptime-kuma
|
- https://github.com/truecharts/charts/tree/master/charts/stable/uptime-kuma
|
||||||
- https://github.com/louislam/uptime-kuma
|
- https://github.com/louislam/uptime-kuma
|
||||||
type: application
|
type: application
|
||||||
version: 5.0.11
|
version: 5.0.12
|
||||||
annotations:
|
annotations:
|
||||||
truecharts.org/catagories: |
|
truecharts.org/catagories: |
|
||||||
- monitoring
|
- monitoring
|
||||||
|
|||||||
@@ -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 -}}
|
||||||
+3
@@ -1,5 +1,7 @@
|
|||||||
|
{{- define "uptime.servicemonitor" -}}
|
||||||
{{- if hasKey .Values "metrics" }}
|
{{- if hasKey .Values "metrics" }}
|
||||||
{{- if .Values.metrics.enabled }}
|
{{- if .Values.metrics.enabled }}
|
||||||
|
---
|
||||||
apiVersion: monitoring.coreos.com/v1
|
apiVersion: monitoring.coreos.com/v1
|
||||||
kind: ServiceMonitor
|
kind: ServiceMonitor
|
||||||
metadata:
|
metadata:
|
||||||
@@ -24,3 +26,4 @@ spec:
|
|||||||
path: /metrics
|
path: /metrics
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- 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
|
port: 3001
|
||||||
targetPort: 3001
|
targetPort: 3001
|
||||||
|
|
||||||
|
# Metrics Services
|
||||||
|
metrics:
|
||||||
|
enabled: true
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
metrics:
|
||||||
|
enabled: true
|
||||||
|
protocol: HTTP
|
||||||
|
port: 3002
|
||||||
|
targetPort: 3002
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
config:
|
config:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|||||||
Reference in New Issue
Block a user