diff --git a/clusters/cl01tl/applications/homepage/values.yaml b/clusters/cl01tl/applications/homepage/values.yaml index 827c7c4b7..79ec93c5d 100644 --- a/clusters/cl01tl/applications/homepage/values.yaml +++ b/clusters/cl01tl/applications/homepage/values.yaml @@ -386,6 +386,12 @@ homepage: href: https://stalwart.alexlebens.net siteMonitor: http://stalwart.stalwart:80 statusStyle: dot + - Notifications: + icon: sh-ntfy.webp + description: ntfy + href: https://ntfy.alexlebens.net + siteMonitor: http://ntfy.ntfy:80 + statusStyle: dot - Reverse Proxy: icon: sh-traefik.webp description: Traefik diff --git a/clusters/cl01tl/monitoring/grafana-operator/templates/grafana-dashboard.yaml b/clusters/cl01tl/monitoring/grafana-operator/templates/grafana-dashboard.yaml index 14a18d16d..3f029d484 100644 --- a/clusters/cl01tl/monitoring/grafana-operator/templates/grafana-dashboard.yaml +++ b/clusters/cl01tl/monitoring/grafana-operator/templates/grafana-dashboard.yaml @@ -12,7 +12,6 @@ spec: matchLabels: app: grafana-main contentCacheDuration: 1h - contentCacheDuration: 1h folderUID: grafana-folder-system resyncPeriod: 1h url: http://gitea-http.gitea:3000/alexlebens/grafana-dashboards/raw/branch/main/dashboards/system/ceph.json @@ -394,11 +393,29 @@ spec: matchLabels: app: grafana-main contentCacheDuration: 1h - contentCacheDuration: 1h folderUID: grafana-folder-platform resyncPeriod: 1h url: http://gitea-http.gitea:3000/alexlebens/grafana-dashboards/raw/branch/main/dashboards/platform/gitea.json +--- +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: grafana-dashboard-ntfy + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: grafana-dashboard-ntfy + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/part-of: {{ .Release.Name }} +spec: + instanceSelector: + matchLabels: + app: grafana-main + contentCacheDuration: 1h + folderUID: grafana-folder-platform + resyncPeriod: 1h + url: http://gitea-http.gitea:3000/alexlebens/grafana-dashboards/raw/branch/main/dashboards/platform/ntfy.json + --- apiVersion: grafana.integreatly.org/v1beta1 kind: GrafanaDashboard @@ -434,7 +451,7 @@ spec: app: grafana-main contentCacheDuration: 1h folderUID: grafana-folder-platform - resyncPeriod: 30m + resyncPeriod: 1h url: http://gitea-http.gitea:3000/alexlebens/grafana-dashboards/raw/branch/main/dashboards/platform/vault.json --- diff --git a/clusters/cl01tl/platform/ntfy/Chart.yaml b/clusters/cl01tl/platform/ntfy/Chart.yaml new file mode 100644 index 000000000..c82ad15a1 --- /dev/null +++ b/clusters/cl01tl/platform/ntfy/Chart.yaml @@ -0,0 +1,22 @@ +apiVersion: v2 +name: ntfy +version: 1.0.0 +description: Ntfy +keywords: + - ntfy + - notifications + - messaging +home: https://wiki.alexlebens.dev/s/5bfc09dd-688b-48f0-8d33-b9bf452df98a +sources: + - https://github.com/binwiederhier/ntfy + - https://hub.docker.com/r/binwiederhier/ntfy + - https://github.com/bjw-s-labs/helm-charts/tree/main/charts/other/app-template +maintainers: + - name: alexlebens +dependencies: + - name: app-template + alias: ntfy + repository: https://bjw-s-labs.github.io/helm-charts/ + version: 4.0.1 +icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/ntfy.png +appVersion: 2.11.0 diff --git a/clusters/cl01tl/platform/ntfy/templates/http-route.yaml b/clusters/cl01tl/platform/ntfy/templates/http-route.yaml new file mode 100644 index 000000000..ac8220f84 --- /dev/null +++ b/clusters/cl01tl/platform/ntfy/templates/http-route.yaml @@ -0,0 +1,28 @@ +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: http-route-ntfy + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: http-route-ntfy + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/part-of: {{ .Release.Name }} +spec: + parentRefs: + - group: gateway.networking.k8s.io + kind: Gateway + name: traefik-gateway + namespace: traefik + hostnames: + - ntfy.alexlebens.net + rules: + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - group: '' + kind: Service + name: ntfy + port: 80 + weight: 100 diff --git a/clusters/cl01tl/platform/ntfy/templates/service-monitor.yaml b/clusters/cl01tl/platform/ntfy/templates/service-monitor.yaml new file mode 100644 index 000000000..3f73b06be --- /dev/null +++ b/clusters/cl01tl/platform/ntfy/templates/service-monitor.yaml @@ -0,0 +1,19 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: ntfy + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: ntfy + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/part-of: {{ .Release.Name }} +spec: + selector: + matchLabels: + app.kubernetes.io/name: ntfy + app.kubernetes.io/instance: {{ .Release.Name }} + endpoints: + - port: metrics + interval: 3m + scrapeTimeout: 1m + path: /metrics diff --git a/clusters/cl01tl/platform/ntfy/values.yaml b/clusters/cl01tl/platform/ntfy/values.yaml new file mode 100644 index 000000000..a92a732cc --- /dev/null +++ b/clusters/cl01tl/platform/ntfy/values.yaml @@ -0,0 +1,106 @@ +ntfy: + controllers: + main: + type: deployment + replicas: 1 + strategy: Recreate + revisionHistoryLimit: 3 + containers: + main: + image: + repository: binwiederhier/ntfy + tag: v2.11.0 + pullPolicy: IfNotPresent + args: ["serve", "--cache-file", "/var/cache/ntfy/cache.db"] + env: + - name: TZ + value: US/Central + - name: NTFY_BASE_URL + value: https://ntfy.alexlebens.net + - name: NTFY_LISTEN_HTTP + value: :80 + - name: NTFY_CACHE_FILE + value: /var/lib/ntfy/cache.db + - name: NTFY_CACHE_DURATION + value: 36h + - name: NTFY_CACHE_STARTUP_QUERIES + value: | + pragma journal_mode = WAL; + pragma synchronous = normal; + pragma temp_store = memory; + pragma busy_timeout = 15000; + vacuum; + - name: NTFY_BEHIND_PROXY + value: true + - name: NTFY_ATTACHMENT_CACHE_DIR + value: /var/lib/ntfy/attachments + - name: NTFY_ATTACHMENT_TOTAL_SIZE_LIMIT + value: 4G + - name: NTFY_ATTACHMENT_FILE_SIZE_LIMIT + value: 15M + - name: NTFY_ATTACHMENT_EXPIRY_DURATION + value: 36h + - name: NTFY_ENABLE_SIGNUP + value: true + - name: NTFY_ENABLE_LOGIN + value: true + - name: NTFY_ENABLE_RESERVATIONS + value: false + - name: NTFY_UPSTREAM_BASE_URL + value: https://ntfy.sh + # - name: NTFY_UPSTREAM_ACCESS_TOKEN + # value: "" + # - name: NTFY_WEB_PUSH_PUBLIC_KEY + # value: "" + # - name: NTFY_WEB_PUSH_PRIVATE_KEY + # value: "" + # - name: NTFY_WEB_PUSH_FILE + # value: /var/lib/ntfy/webpush.db + # - name: NTFY_WEB_PUSH_EMAIL_ADDRESS + # value: "" + - name: NTFY_METRICS_LISTEN_HTTP + value: 9090 + - name: NTFY_LOG_LEVEL + value: info + probes: + liveness: + enabled: true + custom: true + spec: + exec: + command: + - /usr/bin/env + - bash + - -c + - wget -q --tries=1 http://localhost:80/v1/health -O - | grep -Eo '\"healthy\"\\s*:\\s*true' || exit 1 + failureThreshold: 5 + initialDelaySeconds: 60 + periodSeconds: 60 + successThreshold: 1 + timeoutSeconds: 10 + resources: + requests: + cpu: 10m + memory: 128Mi + service: + main: + controller: main + ports: + http: + port: 80 + targetPort: 80 + protocol: HTTP + metrics: + port: 9090 + targetPort: 9090 + protocol: HTTP + persistence: + cache: + storageClass: ceph-block + accessMode: ReadWriteOnce + size: 5Gi + advancedMounts: + main: + main: + - path: /var/cache/ntfy + readOnly: false diff --git a/clusters/cl01tl/services/blocky/values.yaml b/clusters/cl01tl/services/blocky/values.yaml index 7c5e3f118..7e06278c3 100644 --- a/clusters/cl01tl/services/blocky/values.yaml +++ b/clusters/cl01tl/services/blocky/values.yaml @@ -131,6 +131,7 @@ blocky: mail IN CNAME traefik-cl01tl minio-directus IN CNAME traefik-cl01tl minio-outline IN CNAME traefik-cl01tl + ntfy IN CNAME traefik-cl01tl ollama IN CNAME traefik-cl01tl overseerr IN CNAME traefik-cl01tl pgadmin IN CNAME traefik-cl01tl diff --git a/hosts/ps08rp/blocky/config.yml b/hosts/ps08rp/blocky/config.yml index 1b518621b..ca2f6d02f 100644 --- a/hosts/ps08rp/blocky/config.yml +++ b/hosts/ps08rp/blocky/config.yml @@ -106,6 +106,7 @@ customDNS: mail IN CNAME traefik-cl01tl minio-directus IN CNAME traefik-cl01tl minio-outline IN CNAME traefik-cl01tl + ntfy IN CNAME traefik-cl01tl ollama IN CNAME traefik-cl01tl overseerr IN CNAME traefik-cl01tl pgadmin IN CNAME traefik-cl01tl diff --git a/hosts/ps09rp/blocky/config.yml b/hosts/ps09rp/blocky/config.yml index 1b518621b..ca2f6d02f 100644 --- a/hosts/ps09rp/blocky/config.yml +++ b/hosts/ps09rp/blocky/config.yml @@ -106,6 +106,7 @@ customDNS: mail IN CNAME traefik-cl01tl minio-directus IN CNAME traefik-cl01tl minio-outline IN CNAME traefik-cl01tl + ntfy IN CNAME traefik-cl01tl ollama IN CNAME traefik-cl01tl overseerr IN CNAME traefik-cl01tl pgadmin IN CNAME traefik-cl01tl