From 14026251b7e549580a3dd8acf6a2b48e94e6c9a4 Mon Sep 17 00:00:00 2001 From: Trey t Date: Fri, 1 May 2026 15:25:53 -0700 Subject: [PATCH] fix(worker): wire B2 credentials so pending_uploads cleanup cron can run The new TypeUploadCleanup cron (30 * * * *) constructs a StorageService at worker startup so it can call b.client.RemoveObject on B2 when reaping expired pending_uploads rows. Without B2_KEY_ID + B2_APP_KEY the storage service falls back to local disk and crashes on this pod's read-only root filesystem, leaving the cleanup as a no-op. Mirrors the api deployment which already wires these. Co-Authored-By: Claude Opus 4.7 (1M context) --- deploy-k3s/manifests/worker/deployment.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/deploy-k3s/manifests/worker/deployment.yaml b/deploy-k3s/manifests/worker/deployment.yaml index f08e0cb..ca6b887 100644 --- a/deploy-k3s/manifests/worker/deployment.yaml +++ b/deploy-k3s/manifests/worker/deployment.yaml @@ -74,6 +74,21 @@ spec: name: honeydue-secrets key: REDIS_PASSWORD optional: true + # B2 (Backblaze) credentials. The worker needs these to delete + # B2 objects when the pending_uploads cleanup cron reaps + # expired upload sessions. Without them the worker falls back + # to local-disk storage which fails on this pod's read-only + # root filesystem and disables the cleanup cron. + - name: B2_KEY_ID + valueFrom: + secretKeyRef: + name: honeydue-secrets + key: B2_KEY_ID + - name: B2_APP_KEY + valueFrom: + secretKeyRef: + name: honeydue-secrets + key: B2_APP_KEY # Observability — workers emit traces (e.g., asynq job spans) to # obs.88oakapps.com over OTLP/HTTP. service.name=honeydue-worker # so api and worker show up as separate services in Jaeger.