Add PVC for photo uploads to survive pod restarts #73

Merged
forgejo_admin merged 1 commit from 72-add-photo-upload-pvc into main 2026-03-13 19:53:47 +00:00

Summary

Adds a 1Gi PersistentVolumeClaim so player photos at /data/uploads/photos persist across pod restarts and redeployments. No code changes -- the app already writes to this path.

Changes

  • k8s/pvc.yaml (new) -- 1Gi ReadWriteOnce PVC named photo-uploads, uses default storage class
  • k8s/deployment.yaml -- added photo-uploads volume (from PVC) and volumeMount at /data/uploads/photos
  • k8s/kustomization.yaml -- added pvc.yaml to resources list (ordered before deployment.yaml so PVC is created first)

Test Plan

  • kubectl get pvc -n basketball-api shows photo-uploads in Bound state
  • Upload a photo via POST /upload/photo, then kubectl rollout restart deployment basketball-api -n basketball-api, verify photo is still served
  • Existing photo URLs return 200

Review Checklist

  • No code changes -- k8s manifests only
  • kubectl kustomize k8s/ builds cleanly
  • PVC uses default storage class (local-path on k3s)
  • Deployment strategy is Recreate (no multi-attach concerns with RWO)
  • Discovered scope: none
  • Plan: plan-2026-03-08-tryout-prep
  • Forgejo issue: #72

Closes #72

## Summary Adds a 1Gi PersistentVolumeClaim so player photos at `/data/uploads/photos` persist across pod restarts and redeployments. No code changes -- the app already writes to this path. ## Changes - **`k8s/pvc.yaml`** (new) -- 1Gi ReadWriteOnce PVC named `photo-uploads`, uses default storage class - **`k8s/deployment.yaml`** -- added `photo-uploads` volume (from PVC) and volumeMount at `/data/uploads/photos` - **`k8s/kustomization.yaml`** -- added `pvc.yaml` to resources list (ordered before deployment.yaml so PVC is created first) ## Test Plan - [ ] `kubectl get pvc -n basketball-api` shows `photo-uploads` in Bound state - [ ] Upload a photo via `POST /upload/photo`, then `kubectl rollout restart deployment basketball-api -n basketball-api`, verify photo is still served - [ ] Existing photo URLs return 200 ## Review Checklist - [x] No code changes -- k8s manifests only - [x] `kubectl kustomize k8s/` builds cleanly - [x] PVC uses default storage class (local-path on k3s) - [x] Deployment strategy is Recreate (no multi-attach concerns with RWO) - [ ] Discovered scope: none ## Related - Plan: `plan-2026-03-08-tryout-prep` - Forgejo issue: #72 Closes #72
Add PVC for photo uploads to survive pod restarts
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
b1034a274d
Photos stored at /data/uploads/photos are currently ephemeral. This adds
a 1Gi PersistentVolumeClaim mounted into the deployment so uploaded
player photos persist across pod restarts and redeployments.

Closes #72

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
forgejo_admin deleted branch 72-add-photo-upload-pvc 2026-03-13 19:53:47 +00:00
Sign in to join this conversation.
No description provided.