From ce0440a33c90226037589f9d19f2d6116b0151cd Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Fri, 13 Jan 2023 09:41:10 -0600 Subject: [PATCH] ntfy: Allow notification attachments *ntfy* allows notifications to include arbitrary file attachments. For images, it will even show them in the notification. In order to support this, the server must be configured with a writable filesystem location to cache the files. --- ntfy/ntfy.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ntfy/ntfy.yaml b/ntfy/ntfy.yaml index 9c484fe..0503e03 100644 --- a/ntfy/ntfy.yaml +++ b/ntfy/ntfy.yaml @@ -19,6 +19,8 @@ data: base-url: https://ntfy.pyrocufflink.net behind-proxy: true listen-http: '[::]:2586' + attachment-cache-dir: /var/cache/ntfy/attachments + attachment-file-size-limit: 100M --- apiVersion: v1 @@ -89,10 +91,24 @@ spec: - name: config mountPath: /etc/ntfy readOnly: true + - name: cache + mountPath: /var/cache/ntfy/attachments + subPath: attachments + securityContext: + fsGroup: 1000 volumes: - name: config configMap: name: ntfy + - name: cache + ephemeral: + volumeClaimTemplate: + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi --- apiVersion: networking.k8s.io/v1 @@ -105,6 +121,8 @@ metadata: app.kubernetes.io/component: ntfy app.kubernetes.io/instance: ntfy app.kubernetes.io/part-of: ntfy + annotations: + nginx.ingress.kubernetes.io/proxy-body-size: '0' spec: ingressClassName: nginx rules: