Skip to content

Gitea

Git hosting and CI/CD (Act runners) for the platform, served at gitea.prod.skatzi.com.

Overview

Deployed by the gitea component (components/gitea/base/helmrelease.yaml) on hetzner-mgmt. Repositories, LFS objects and attachments share the gitea-shared-storage PVC (20 Gi hcloud volume).

Dependencies

  • Keycloak (OIDC sign-in)
  • Bundled PostgreSQL (gitea-postgresql). Its resources are set explicitly under postgresql.primary.resources (request 500m / 512Mi, limit 2 CPU / 1Gi). Without them the Bitnami chart's nano preset (150m CPU, 192Mi) applies: PostgreSQL was OOM-killed and CPU-throttled, every Gitea request slowed to seconds, and act-runner lost jobs on slow FetchTask replies.

Exposed Services

  • HTTP via Gateway API (gitea.prod.skatzi.com)
  • SSH via MetalLB LoadBalancer on port 22

Push mirror to GitHub

Skatzi/platform is push-mirrored on every commit to the GitHub repository behind Flux's bootstrap-cluster GitRepository, so Flux has a Git source when Gitea is down. The mirror is declared in components/gitea/push-mirror/; see Flux: fallback source.

CI runners

The shared Actions runners (components/gitea/act-runner/) run one runner process (gitea/runner) per pod with capacity: 1 (two from #2683 to #2931). Under act_runner 0.6.1 concurrent jobs in one process shared its action cache and broke each other's actions (Cannot find module …/dist/index.js), so each pod ran two processes of one job until #2683. See CI Runners.

Completed Actions runs are deleted after 400 days (actions.RUN_RETENTION_DAYS, a nightly cron since Gitea 28); 0 keeps them forever. Logs expire after 365 days and artifacts after 90, Gitea's defaults.

Backups and upgrades

A Gitea upgrade is applied only after the running version has been backed up and the backup restored, and a weekly drill restores the latest backup. See Backups, Upgrade Gate and Restore Drill, including the manual restore. A failed upgrade is rolled back automatically by restoring that backup: see Post-upgrade Smoke Check and Rollback.

Git LFS

LFS is enabled with a 1 GiB per-file limit (LFS_MAX_FILE_SIZE). Pushing a larger object fails with 413.

git lfs install
git lfs track "*.bin"
git add .gitattributes data.bin && git commit -m "Add data" && git push

LFS stores a full copy of every version — no deltas — so each edit to a 500 MB file adds 500 MB to the shared PVC. Keep an eye on volume usage and prune unreferenced objects from the repository's Settings → LFS page when needed.