From 061333b1d6d23ca86c2d022d45ca673c7d3e6328 Mon Sep 17 00:00:00 2001 From: Tommy Date: Sat, 13 Apr 2024 22:38:49 +0200 Subject: [PATCH] feat: add podmonitors to synapse and ntfy --- charts/matrix-synapse/Chart.yaml | 11 +++++++++-- charts/matrix-synapse/templates/podmonitor.yaml | 17 +++++++++++++++++ charts/matrix-synapse/values.yaml | 11 +++++------ charts/ntfy-sh/Chart.yaml | 2 +- charts/ntfy-sh/templates/podmonitor.yaml | 15 +++++++++++++++ charts/ntfy-sh/values.yaml | 6 +++++- 6 files changed, 52 insertions(+), 10 deletions(-) create mode 100644 charts/matrix-synapse/templates/podmonitor.yaml create mode 100644 charts/ntfy-sh/templates/podmonitor.yaml diff --git a/charts/matrix-synapse/Chart.yaml b/charts/matrix-synapse/Chart.yaml index fc71359..9b9073b 100644 --- a/charts/matrix-synapse/Chart.yaml +++ b/charts/matrix-synapse/Chart.yaml @@ -2,10 +2,17 @@ apiVersion: v2 name: matrix-synapse description: Matrix homeserver icon: https://matrix.org/images/matrix-logo.svg -appVersion: 1.99.0 +appVersion: v1.104.0 type: application -version: 4.1.0 +version: 4.2.0 maintainers: - name: Tommy Skaug email: tommy@skaug.me +keywords: +- matrix +- synapse +- homeserver +sources: +- https://github.com/element-hq/synapse +- https://element-hq.github.io/synapse/latest/ diff --git a/charts/matrix-synapse/templates/podmonitor.yaml b/charts/matrix-synapse/templates/podmonitor.yaml new file mode 100644 index 0000000..9f17c6c --- /dev/null +++ b/charts/matrix-synapse/templates/podmonitor.yaml @@ -0,0 +1,17 @@ +{{- if .Values.prometheus.podmonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: {{ include "matrix-synapse.fullname" . }} + labels: + {{- include "matrix-synapse.labels" . | nindent 4 }} + app.kubernetes.io/component: synapse +spec: + selector: + matchLabels: + {{- include "matrix-synapse.selectorLabels" . | nindent 6 }} + app.kubernetes.io/component: synapse + podMetricsEndpoints: + - port: metrics + path: "/_synapse/metrics" +{{- end }} \ No newline at end of file diff --git a/charts/matrix-synapse/values.yaml b/charts/matrix-synapse/values.yaml index 874372f..95cc944 100644 --- a/charts/matrix-synapse/values.yaml +++ b/charts/matrix-synapse/values.yaml @@ -7,13 +7,12 @@ initContainers: - secretRef: name: synapse-secret -## Docker image configuration, used for Synapse and workers. -## +prometheus: + podmonitor: + enabled: true + image: - repository: matrixdotorg/synapse - ## Tag to override with, will default to the application version. - ## - # tag: '' + repository: ghcr.io/element-hq/synapse pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace. diff --git a/charts/ntfy-sh/Chart.yaml b/charts/ntfy-sh/Chart.yaml index d326379..9918485 100644 --- a/charts/ntfy-sh/Chart.yaml +++ b/charts/ntfy-sh/Chart.yaml @@ -4,7 +4,7 @@ description: | ntfy lets you send push notifications to your phone or desktop via scripts from any computer appVersion: v2.10.0 type: application -version: 0.2.0 +version: 0.2.1 maintainers: - name: Tommy Skaug email: tommy@skaug.me diff --git a/charts/ntfy-sh/templates/podmonitor.yaml b/charts/ntfy-sh/templates/podmonitor.yaml new file mode 100644 index 0000000..f82cc5d --- /dev/null +++ b/charts/ntfy-sh/templates/podmonitor.yaml @@ -0,0 +1,15 @@ +{{- if .Values.prometheus.podmonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: {{ include "ntfy.fullname" . }} + labels: + {{- include "ntfy.labels" . | nindent 4 }} +spec: + selector: + matchLabels: + {{- include "ntfy.selectorLabels" . | nindent 6 }} + podMetricsEndpoints: + - port: metrics + path: "/metrics" +{{- end }} \ No newline at end of file diff --git a/charts/ntfy-sh/values.yaml b/charts/ntfy-sh/values.yaml index 9ea091f..3e8073a 100644 --- a/charts/ntfy-sh/values.yaml +++ b/charts/ntfy-sh/values.yaml @@ -6,4 +6,8 @@ persistence: image: repository: binwiederhier/ntfy - tag: v2.10.0 \ No newline at end of file + tag: v2.10.0 + +prometheus: + podmonitor: + enabled: true