feat(uptimekuma): create servicemonitor for uptimekuma (#4334)

* create servicemonitor for uptimekuma

Signed-off-by: Keith Cirkel <keithamus@users.noreply.github.com>

* add default values for servicemonitor to uptime-kuma

Signed-off-by: Keith Cirkel <keithamus@users.noreply.github.com>

* minor bump uptime-kuma chart

Signed-off-by: Keith Cirkel <keithamus@users.noreply.github.com>

* add metrics questions to uptime-kuma

Signed-off-by: Keith Cirkel <keithamus@users.noreply.github.com>

* Update charts/stable/uptime-kuma/Chart.yaml

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

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

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

Signed-off-by: Keith Cirkel <keithamus@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>
Co-authored-by: Kjeld Schouten-Lebbing <kjeld@schouten-lebbing.nl>
This commit is contained in:
Keith Cirkel 2022-11-08 14:28:17 +00:00 committed by GitHub
parent 990f452b6a
commit 2b9c91fa30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 1 deletions

View File

@ -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: 3.0.49
version: 3.1.0
annotations:
truecharts.org/catagories: |
- monitoring

View File

@ -114,6 +114,7 @@ questions:
default: 568
# Include{podSecurityContextAdvanced}
# Include{resources}
# Include{metrics}
# Include{advanced}
# Include{addons}
# Include{codeserver}

View File

@ -0,0 +1,26 @@
{{- if hasKey .Values "metrics" }}
{{- if .Values.metrics.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "tc.common.names.fullname" . }}
labels:
{{- include "tc.common.labels" . | nindent 4 }}
{{- with .Values.metrics.serviceMonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
{{- include "tc.common.labels.selectorLabels" . | nindent 6 }}
endpoints:
- port: metrics
{{- with .Values.metrics.serviceMonitor.interval }}
interval: {{ . }}
{{- end }}
{{- with .Values.metrics.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ . }}
{{- end }}
path: /metrics
{{- end }}
{{- end }}

View File

@ -27,3 +27,12 @@ persistence:
portal:
enabled: true
metrics:
# -- Enable and configure a Prometheus serviceMonitor for the chart under this key.
# @default -- See values.yaml
enabled: false
serviceMonitor:
interval: 1m
scrapeTimeout: 30s
labels: {}