Phase 4o: Add PVC for photo uploads — survive pod restarts #72
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/basketball-api#72
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Lineage
plan-2026-03-08-tryout-prep→ Phase 4 → Phase 4oRepo
forgejo_admin/basketball-apiUser Story
As an admin
I want player photos to persist across pod restarts
So that coaches can see player photos during tryouts even after deployments
Context
The app stores uploaded photos at
/data/uploads/photos(configured inconfig.py:18). The main app mounts this as a static files directory at/uploads/photos. Currently this is ephemeral container storage — when the pod restarts (deploy, crash, node reboot), all photos are lost. 23 of 45 players have photos that need to survive.The deployment already uses
strategy: Recreate(not RollingUpdate), so a single ReadWriteOnce PVC is fine.File Targets
Files to modify:
k8s/deployment.yaml— add PVC volume + volumeMount at/data/uploads/photosFiles to create:
k8s/pvc.yaml— PersistentVolumeClaim (1Gi, ReadWriteOnce, default storage class)Files to update:
k8s/kustomization.yaml— addpvc.yamlto resources listFiles NOT to touch:
src/— no code changes needed, the app already uses the correct pathk8s/postgres.yaml— separate concernAcceptance Criteria
/data/uploads/photosPOST /upload/photo) still works/uploads/photos/...) still worksTest Expectations
kubectl get pvc -n basketball-apishows Bound PVCkubectl rollout restart), verify photo still servedConstraints
local-pathstorage class (k3s default)strategy: Recreatemeans no multi-attach concernsChecklist
Related
project-westside-basketball