1
0
Fork 0

ntfy: Migrate to Kustomize

Using Kustomize, we can define the configuration file separately from
the Kubernetes resources, and use `configMapGenerators` to generate the
ConfigMap for it.  Additionally, this will make it possible to update
_ntfy_ using `updatebot`.
pull/27/head
Dustin 2024-09-22 11:59:33 -05:00
parent a6683c9123
commit 1c6286a977
3 changed files with 29 additions and 19 deletions

23
ntfy/kustomization.yaml Normal file
View File

@ -0,0 +1,23 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: ntfy
resources:
- ntfy.yaml
configMapGenerator:
- name: ntfy
namespace: ntfy
files:
- server.yml
options:
labels:
app.kubernetes.io/name: ntfy
app.kubernetes.io/component: ntfy
app.kubernetes.io/instance: ntfy
app.kubernetes.io/part-of: ntfy
images:
- name: docker.io/binwiederhier/ntfy
newTag: v2.11.0

View File

@ -5,25 +5,6 @@ metadata:
labels:
app.kubernetes.io/instance: ntfy
---
apiVersion: v1
kind: ConfigMap
metadata:
name: ntfy
namespace: ntfy
labels:
app.kubernetes.io/name: ntfy
app.kubernetes.io/component: ntfy
app.kubernetes.io/instance: ntfy
app.kubernetes.io/part-of: ntfy
data:
server.yml: |+
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
kind: Service

6
ntfy/server.yml Normal file
View File

@ -0,0 +1,6 @@
base-url: https://ntfy.pyrocufflink.net
behind-proxy: true
listen-http: '[::]:2586'
attachment-cache-dir: /var/cache/ntfy/attachments
attachment-file-size-limit: 100M
enable-metrics: true