Files
homelab-k3s/apps/tududi/deployment.yaml
T
jasonwitty 7b084dbddd
Validate and Deploy to K3s / validate (push) Successful in 19s
Validate and Deploy to K3s / deploy (push) Successful in 23s
Add dashwise and tududi
Two self-hosted apps behind traefik, both keeping their state on the
GlusterFS volume that is mounted on every node:

- dashwise (home.wittyoneoff.com) is an all-in-one image running its web
  server, a bundled PocketBase and valkey side by side. Only port 3000 is
  published: the frontend resolves its backend as window.location.origin
  and every PocketBase call is made server-side, so 8090 stays inside the
  pod. It is on the service so the PocketBase admin UI can be reached with
  kubectl port-forward.

- tududi (tududi.wittyoneoff.com) stores a SQLite database and user
  uploads. Both are VOLUMEs in the image, so both are backed by the claim
  -- as one volume mounted twice with subPath, because naming the same
  claim as two volume entries wedges kubelet, which is what happened with
  limesurvey.

Both images are pinned to tags that publish an arm64 manifest. dashwise
:latest and :stable are amd64 only and would not start on these nodes.

Namespaces and secrets are applied out of band, as with the other apps.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-12 12:46:58 -07:00

81 lines
2.3 KiB
YAML

# tududi keeps everything in a SQLite file under /app/db and user uploads
# under /app/uploads. Both are declared VOLUMEs in the image, so both have to
# be backed by the PVC or they are lost on restart.
apiVersion: apps/v1
kind: Deployment
metadata:
name: tududi
namespace: tududi
labels:
app.kubernetes.io/name: tududi
spec:
replicas: 1
revisionHistoryLimit: 3
strategy:
# single-writer SQLite on a ReadWriteOnce volume
type: Recreate
selector:
matchLabels:
app.kubernetes.io/name: tududi
template:
metadata:
labels:
app.kubernetes.io/name: tududi
spec:
containers:
- name: tududi
image: chrisvel/tududi:1.3.1
imagePullPolicy: IfNotPresent
env:
# tududi sits behind traefik and the EC2 proxy, so it has to trust
# X-Forwarded-* to build correct URLs and mark cookies secure
- name: TUDUDI_TRUST_PROXY
value: "true"
- name: TUDUDI_USER_EMAIL
valueFrom:
secretKeyRef:
name: tududi
key: user-email
- name: TUDUDI_USER_PASSWORD
valueFrom:
secretKeyRef:
name: tududi
key: user-password
- name: TUDUDI_SESSION_SECRET
valueFrom:
secretKeyRef:
name: tududi
key: session-secret
- name: TZ
value: America/Los_Angeles
ports:
- name: http
containerPort: 3002
protocol: TCP
startupProbe:
tcpSocket:
port: http
failureThreshold: 60
periodSeconds: 5
readinessProbe:
tcpSocket:
port: http
periodSeconds: 10
failureThreshold: 3
livenessProbe:
tcpSocket:
port: http
periodSeconds: 20
failureThreshold: 3
volumeMounts:
- name: data
mountPath: /app/db
subPath: db
- name: data
mountPath: /app/uploads
subPath: uploads
volumes:
- name: data
persistentVolumeClaim:
claimName: tududi