From 000c589d06051eaaa6bb96e07dfdc11432412a46 Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Thu, 5 Jun 2025 20:44:29 -0500 Subject: [PATCH] add apprise sidecar --- .../qbittorrent/templates/config-map.yaml | 1 + .../templates/service-monitor.yaml | 21 +++++++++++ .../cl01tl/platform/qbittorrent/values.yaml | 37 +++++++++++++++++++ 3 files changed, 59 insertions(+) diff --git a/clusters/cl01tl/platform/qbittorrent/templates/config-map.yaml b/clusters/cl01tl/platform/qbittorrent/templates/config-map.yaml index 9f41dc4e2..c3d4b6d3d 100644 --- a/clusters/cl01tl/platform/qbittorrent/templates/config-map.yaml +++ b/clusters/cl01tl/platform/qbittorrent/templates/config-map.yaml @@ -143,6 +143,7 @@ data: max_orphaned_files_to_delete: 50 apprise: + api_url: http://localhost:8000/notify notify_url: !ENV QBIT_NTFY_URL webhooks: diff --git a/clusters/cl01tl/platform/qbittorrent/templates/service-monitor.yaml b/clusters/cl01tl/platform/qbittorrent/templates/service-monitor.yaml index 8178018f7..c363a14a6 100644 --- a/clusters/cl01tl/platform/qbittorrent/templates/service-monitor.yaml +++ b/clusters/cl01tl/platform/qbittorrent/templates/service-monitor.yaml @@ -17,3 +17,24 @@ spec: matchLabels: app.kubernetes.io/name: qbittorrent app.kubernetes.io/instance: {{ .Release.Name }} + +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: qbittorrent-apprise + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: qbittorrent-apprise + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/part-of: {{ .Release.Name }} +spec: + endpoints: + - port: apprise + interval: 30s + scrapeTimeout: 15s + path: /metrics + selector: + matchLabels: + app.kubernetes.io/name: qbittorrent + app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/clusters/cl01tl/platform/qbittorrent/values.yaml b/clusters/cl01tl/platform/qbittorrent/values.yaml index 22e140d8b..10ba858e5 100644 --- a/clusters/cl01tl/platform/qbittorrent/values.yaml +++ b/clusters/cl01tl/platform/qbittorrent/values.yaml @@ -129,6 +129,8 @@ qbittorrent: tag: v4.3.0 pullPolicy: IfNotPresent env: + - name: TZ + value: US/Central - name: QBT_SCHEDULE value: 0 * * * * - name: QBT_STARTUP_DELAY @@ -148,6 +150,37 @@ qbittorrent: requests: cpu: 10m memory: 64Mi + apprise-api: + image: + repository: caronc/apprise + tag: 1.2.0 + pullPolicy: IfNotPresent + env: + - name: TZ + value: US/Central + - name: PGID + value: "1000" + - name: PUID + value: "1000" + - name: IPV4_ONLY + value: true + - name: APPRISE_STORAGE_MODE + value: memory + - name: APPRISE_STATEFUL_MODE + value: disabled + - name: APPRISE_WORKER_COUNT + value: 1 + - name: APPRISE_STATELESS_URLS + valueFrom: + secretKeyRef: + name: qbittorrent-qbit-manage-config + key: ntfy-url + - name: ALLOWED_HOSTS + value: localhost + resources: + requests: + cpu: 10m + memory: 128Mi service: main: controller: main @@ -164,6 +197,10 @@ qbittorrent: port: 9022 targetPort: 9022 protocol: HTTP + apprise: + port: 8000 + targetPort: 8000 + protocol: HTTP persistence: config: type: persistentVolumeClaim