k3s/namespaces/monitoring/diun/patches/deployment.yaml

55 lines
1.6 KiB
YAML
Raw Normal View History

2025-02-05 16:26:41 -05:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: app
spec:
template:
spec:
tolerations:
- key: "public"
operator: "Equal"
value: "true"
effect: "NoSchedule"
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
preference:
matchExpressions:
- key: public
operator: In
values:
- "true"
serviceAccountName: diun
containers:
- name: diun
image: crazymax/diun:4.29.0
imagePullPolicy: IfNotPresent
2025-02-05 16:26:41 -05:00
args: ["serve"]
envFrom:
- configMapRef:
name: diun-config
env:
- name: DIUN_NOTIF_NTFY_TOKEN
valueFrom:
secretKeyRef:
name: diun-secrets
key: DIUN_NTFY_TOKEN
- name: DIUN_NOTIF_NTFY_TOPIC
valueFrom:
secretKeyRef:
name: diun-secrets
key: DIUN_NTFY_TOPIC
volumeMounts:
- mountPath: "/data"
name: diun-data
subPath: data
restartPolicy: Always
volumes:
# Set up a data directory for diun
# For production usage, you should consider using PV/PVC instead(or simply using storage like NAS)
# For more details, please see https://kubernetes.io/docs/concepts/storage/volumes/
- name: diun-data
persistentVolumeClaim:
claimName: diun-pvc