Plan: Epinio's S3 backend is this platform's own Garage, not bundled SeaweedFS
IMPLEMENTATION RULES: Before implementing this plan, read and follow:
- WORKFLOW.md - The implementation process
- PLANS.md - Plan structure and best practices
Status: Live-verified by imac (urb-agents#2044) — one real bug found and fixed
Goal: replace the Epinio chart's bundled SeaweedFS object store with this platform's own Garage install — one fewer object-store implementation to operate, and Epinio's app data lands in the same place everything else's does.
Migration source: urb-agents#1909/#1911's Epinio PoC on a lab test cluster — gate
6, proven live there 2026-10-26 (#1910's own decided object-storage backend, exercised
for the first time by this PoC). Full gate-by-gate record:
INVESTIGATE-host-epinio-rollout.md in terchris/home. Migrated via urb-agents#2040.
Related: PLAN-service-epinio-001-install, PLAN-service-epinio-005-external-route
Created: 2026-10-27
The one decision this plan is not free to make: never the bootstrap key
Garage's own setup (047-setup-garage.yml) denies its bootstrap key (GARAGE_ACCESS_KEY/
GARAGE_SECRET_KEY) create-bucket permission right after deploy — by design
(urb-agents#1802), specifically so no second consumer can mint itself a new bucket with
it. Epinio therefore needs a genuinely new, dedicated key, imported (not generated by
Garage itself, so it can be managed the same way every other UIS secret is) and scoped to
its own bucket only.
What was built
- New secrets:
EPINIO_GARAGE_ACCESS_KEY/EPINIO_GARAGE_SECRET_KEYadded to00-master-secrets.yml.templateand00-common-values.env.template, following the exact conventionGARAGE_ACCESS_KEY/SECRET_KEYalready established — a separate pair, never reusing the bootstrap one. ansible/playbooks/625-setup-epinio.yml— new tasks (8c-8k) that, idempotently: read the dedicated key and Garage's connection details fromurbalurba-secrets; find the Garage pod;garage key import <access> <secret> -n epinio --yesif that key doesn't already exist (exact flags confirmed against Garage's own CLI source,src/garage/cli/structs.rsKeyImportOpt, tag v2.3.0 — not guessed);garage bucket create epinioif the bucket doesn't exist;garage bucket allow --key epinio --read --write epinio(idempotent by nature, matches047-setup-garage.yml's owndeny --create-buckettask shape — always run, no existence check needed). The Helm values this playbook writes then setseaweedfs.enabled: falseand a reals3:block pointed at Garage with that dedicated key.- New static test,
test-epinio-garage-s3-backend.sh— asserts the S3 credentials come from the dedicated fact (never the raw bootstrap secret), the key import is existence-guarded (idempotent), the bucket grant is scoped to one bucket, and the Helm-values task carriesno_log(the rendered content now includes a real secret). Mutation-tested: pointed the credentials at the bootstrap key instead (confirmed the test catches it), removed the idempotency guard (confirmed the test catches that too), restored both. website/docs/services/management/epinio.mdupdated with a short Storage section.
Bug found live, fixed in PR #644
The epinio namespace's own urbalurba-secrets block in
00-master-secrets.yml.template was still a stale, never-updated empty stringData: {}
placeholder — a leftover from before this plan existed, left unpopulated when this plan
added 625-setup-epinio.yml's own read of GARAGE_HOST/GARAGE_PORT/
EPINIO_GARAGE_ACCESS_KEY/EPINIO_GARAGE_SECRET_KEY from exactly this namespace's own
copy of the secret (a separate object from the "default" namespace's copy of the same
key names — confirmed by every other namespace block in that file carrying its own real
stringData). uis deploy epinio failed outright before ever reaching Garage. Found
live by imac, patched container-locally to continue testing, reported as a separate bug
rather than silently worked around; populated for real in PR #644.
Bug found live, fixed: the key check compared the name, not the ID (urb-agents#2057)
625-setup-epinio.yml's task 8g decided whether to import Epinio's Garage key by checking whether
the key's name ("epinio") appeared in garage key list. The name never changes, but the key ID
does whenever EPINIO_GARAGE_ACCESS_KEY rotates, which Garage's key tombstoning forces
periodically. With an old key still carrying the name, the new ID was never imported: the configured
secret named a key Garage had never heard of, the bucket stayed granted only to the old one, and
every epinio push failed with HeadBucket ... 403. Found by imac while pushing a real app.
Fixed: the check compares the key ID, and the bucket grant uses the ID too, because after a
rotation two keys can share the name. Confirmed against Garage's source (src/api/admin/key.rs,
v2.3.0) that import is keyed by ID and names are not unique. The existing test had asserted the
name-based check, so it encoded the bug; it now asserts the ID form and the absence of the name
form. One limit that stays: if the new ID was already used and tombstoned, Garage refuses the import
with KeyAlreadyExists and the playbook fails loudly with that message, which is the honest outcome.
Validation
Met, live, 2026-10-27 (urb-agents#2044), once the bug above was worked around:
uis deploy epinio ran the whole Garage sequence clean — imported Epinio's dedicated
key, created the epinio bucket, granted read+write, all idempotently (a full re-deploy
produced zero duplicate keys/buckets, confirmed directly via garage key list/bucket list, not just the playbook's own "changed" count). Pushed a real app — its bucket
genuinely received real data (garage bucket info epinio: 0 B/0 objects before, 3.1
kB/1 object after). Decoded epinio-s3-connection-details directly: real endpoint, real
dedicated key, not the bootstrap one. This was run against imac's own container-local
patch for the bug above, not the code as it stood in the repo at the time; PR #644 makes
that same fix for real, so the shipped code now matches what was actually tested, but
has not been independently re-run against a live cluster since.