feat: take advantage of Forgejo 15.0 Actions/runner changes #30
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 15.0 (release notes, full changelog) introduced several runner-side changes that the operator could meaningfully exploit. Grouping by impact for triage.
High-impact opportunities
Ephemeral runners
Forgejo now supports runners that execute exactly one job and then terminate, with their registration credentials auto-deleted. The runner exposes a new
one-jobcommand for this mode, and registration accepts an"ephemeral": trueparameter.This is a near-perfect fit for a Kubernetes operator: rather than maintaining long-lived
Deployments of runners, the operator could create aJob(or pod) per queued workflow run, scale to zero when idle, and never reuse a pod across jobs. Eliminates "leaky state between jobs" classes of bugs (which is partly why we currently rebuild the storage path on every run inpr-reviewer's build-push).Worth designing for explicitly — what does a
RunnerPoolCR look like when "pool" really means "controller for ephemeral runner Jobs"? Do we keep the long-lived pool model alongside as a fallback?OIDC workload identity federation
Runners can now obtain short-lived signed JWTs to authenticate to external systems (Harbor, OpenBao, etc.) instead of relying on static secrets baked into the runner pod or pulled from OpenBao at job start. Requires Forgejo Runner v12.5.0+.
If we adopt this, the OpenBao step in
pr-reviewer'sbuild-push.yaml(and equivalents) gets a lot simpler — no more "fetch a service-account token, exchange it for a Bao token, exchange that for Harbor creds, write a docker config." The runner mints a JWT, exchanges with OpenBao directly via OIDC auth method, done. Adjacent work in OpenBao to add a JWT/OIDC auth role for the Forgejo issuer.New HTTP API for runner registration
Forgejo 15.0 adds a proper HTTP API endpoint for runner registration and deprecates the old token-acquisition endpoints. The operator currently relies on the older flow (presumably). Migrate before the deprecated endpoints are removed in a future release.
Medium-impact / hygiene
one-job. Audit current pinned versions in runner pool definitions; bump as needed.Low-impact / informational
Suggested ordering
RunnerPoolCR (alongside the existing long-lived shape).pr-reviewersince it's the one with the most secret-handling), then expose via operator config.