From 554012c6fe886693af10490054d6a63fe0de74c3 Mon Sep 17 00:00:00 2001 From: Patrick Lee Scott Date: Sat, 27 Jun 2026 21:58:09 -0500 Subject: [PATCH] feat(local): make registry volume persist across computer restarts with PVC The local in-cluster OCI registry (used for dev-* builds and provider snapshots) now uses a PersistentVolumeClaim. This ensures /var/lib/registry data lives on the colima VM disk (via local-path), surviving host reboots and colima restarts. This is the primary solution for the "registry wipe on restart" problem. See updated spec [[specs/hops-cli-local-registry-recover]] and task for details. Recover command remains as safety net for full resets. --- bootstrap/registry/registry.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/bootstrap/registry/registry.yaml b/bootstrap/registry/registry.yaml index 905e66a..225857b 100644 --- a/bootstrap/registry/registry.yaml +++ b/bootstrap/registry/registry.yaml @@ -1,3 +1,19 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: registry-pvc + namespace: crossplane-system +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20Gi + # Uses the default StorageClass (local-path in colima/k3s). + # Data lives on the colima VM disk, which persists across computer restarts + # (as long as the colima instance/VM itself is not deleted). + +--- apiVersion: apps/v1 kind: Deployment metadata: @@ -18,6 +34,13 @@ spec: image: registry:2 ports: - containerPort: 5000 + volumeMounts: + - name: registry-data + mountPath: /var/lib/registry + volumes: + - name: registry-data + persistentVolumeClaim: + claimName: registry-pvc --- apiVersion: v1 kind: Service