Proof: python3 test/ntfy_manifest_test.py; kubectl kustomize deploy/k8s/overlays/hetzner-single-node. Assumptions: ntfy starts as an internal ClusterIP platform utility at http://ntfy.utility.svc.cluster.local; public or Tailscale exposure requires a later authenticated ingress decision. Still fake: No public ntfy URL, auth policy, iOS subscription, webhook ingress, or durable ntfy cache volume is configured yet.
86 lines
1.8 KiB
YAML
86 lines
1.8 KiB
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: ntfy-config
|
|
namespace: utility
|
|
data:
|
|
server.yml: |
|
|
base-url: http://ntfy.utility.svc.cluster.local
|
|
cache-file: /var/cache/ntfy/cache.db
|
|
attachment-cache-dir: /var/cache/ntfy/attachments
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: ntfy
|
|
namespace: utility
|
|
labels:
|
|
app: ntfy
|
|
app.kubernetes.io/part-of: unrip3
|
|
spec:
|
|
type: ClusterIP
|
|
selector:
|
|
app: ntfy
|
|
ports:
|
|
- name: http
|
|
port: 80
|
|
targetPort: http
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: ntfy
|
|
namespace: utility
|
|
labels:
|
|
app: ntfy
|
|
app.kubernetes.io/part-of: unrip3
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: ntfy
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: ntfy
|
|
app.kubernetes.io/part-of: unrip3
|
|
spec:
|
|
containers:
|
|
- name: ntfy
|
|
image: binwiederhier/ntfy:v2.21.0
|
|
imagePullPolicy: IfNotPresent
|
|
args: ["serve"]
|
|
ports:
|
|
- name: http
|
|
containerPort: 80
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /v1/health
|
|
port: http
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /v1/health
|
|
port: http
|
|
initialDelaySeconds: 20
|
|
periodSeconds: 30
|
|
resources:
|
|
requests:
|
|
cpu: 25m
|
|
memory: 64Mi
|
|
limits:
|
|
cpu: 250m
|
|
memory: 128Mi
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /etc/ntfy
|
|
readOnly: true
|
|
- name: cache
|
|
mountPath: /var/cache/ntfy
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: ntfy-config
|
|
- name: cache
|
|
emptyDir: {}
|