chore(forgejo): move the repository volume to hcloud-volumes #232
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/forgejo-hcloud-volume"
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?
Forgejo held the last Mayastor claim. With this change every Mayastor PVC in the cluster is gone, which is what lets a later change remove Mayastor and return 4 CPU, 2 GiB of hugepages and 2 GiB of RAM per worker.
What moved
data-forgejo-m2onmayastor-repl2becomesdata-forgejo-hconhcloud-volumes. The volume holds bare git repositories only, 3.12 GB in 41,489 files. Attachments and LFS live in MinIO and the database is the shared CNPG.The cutover already happened
A PVC
storageClassNameis immutable, so the claim had to be recreated and the data copied by hand.docs/DEVELOPMENT-WORKFLOW.mdpermitskubectlfor temporary local verification immediately followed by the matching commit, which is this shape.The commit has to follow the cutover rather than precede it, because every pull request in this migration lands through Forgejo and the release train needs Forgejo up to merge and promote.
What was done, in order:
kustomize.toolkit.fluxcd.io/reconcile=disabledon the Deployment and on theforgejo-mirror-recoveryCronJob, then the CronJob suspended. The annotation comes first, or the Kustomization flipssuspendback within ten minutes.rsync -aH --numeric-ids --deletefrom the old claim mounted read-only.claimNamepatched with a strategic merge, which mergesvolumesby name, so there is no array-index brittleness.Downtime was about three minutes, 21:42:27Z to 21:45:37Z. Verified afterwards:
/api/healthzpasses on cache and database,git ls-remotereturnsrefs/heads/trunk, the web UI answers, and the pod mountsdata-forgejo-hc.Rollback
forgejo-appsetsprune: false, so deletingstorage.yamldoes not delete the old claim.data-forgejo-m2survives untouched, having been mounted read-only throughout, and stays the rollback until the soak ends. Reverting is scale to zero, patchclaimNameback, scale to one.The Deployment stays annotated until
mainis confirmed to carryclaimName: data-forgejo-hc. Removing the annotation whilemainstill saiddata-forgejo-m2would send Forgejo back to the stale volume.Checks
kustomize build kubernetes/flux/infrastructure/forgejo-apprenders 40 objects with nomayastorreference.bash tests/check.shexits 0.https://claude.ai/code/session_01MdSbMhzabSbpG8TtP9Ur3H