k8s/ntfy.yaml
2025-04-09 00:29:58 -04:00

120 lines
2.5 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: ntfy
name: ntfy
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: ntfy
template:
metadata:
labels:
app: ntfy
spec:
containers:
- args:
- serve
env:
- name: TZ
value: America/New_York
image: binwiederhier/ntfy
livenessProbe:
exec:
command:
- wget -q --tries=1 http://localhost:80/v1/health -O - | grep -Eo '"healthy"\s*:\s*true' || exit 1
failureThreshold: 3
initialDelaySeconds: 40
periodSeconds: 60
timeoutSeconds: 10
name: ntfy
ports:
- containerPort: 80
protocol: TCP
volumes:
- name: smb-storage
PersistentVolumeClaim:
claimName: smb-pvc
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
labels:
name: ntfy-svc
spec:
ports:
- port: 80
targetPort: 80
selector:
app: ntfy
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: adminer-http
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: web
spec:
rules:
- host: ntfy.lipotropin.lan
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: adminer-svc
port:
number: 80
---
# TODO: make this use samba
apiVersion: v1
kind: PersistentVolume
metadata:
name: ntfy-config-pv
spec:
capacity:
storage: 100Gi
volumeMode: Filesystem
accessModes:
- ReadWriteMultiple
persistentVolumeReclaimPolicy: Delete
storageClassName: local-storage
local:
path: /mnt/raid # TODO: make this point to correct dir
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- lipotropin
---
# TODO: make this use samba
apiVersion: v1
kind: PersistentVolume
metadata:
name: ntfy-cache-pv
spec:
capacity:
storage: 100Gi
volumeMode: Filesystem
accessModes:
- ReadWriteMultiple
persistentVolumeReclaimPolicy: Delete
storageClassName: local-storage
local:
path: /mnt/raid # TODO: make this point to correct dir
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- lipotropin