feat(github-runner-exporter): Forgejo runners in the runner series, forge label #520
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/forgejo-runners-exporter"
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?
The runner exporter now reads Forgejo too, so the CI board and the hub show Forgejo runners next to GitHub's.
forgejonamespace. A namespaced Role (apps/forgejo/runner-reader-rbac.yaml) lets the exporter's new ServiceAccount get and list pods, read pod logs, and read only theforgejo-runner-configconfigmap.FORGEJO_REPOS.forgelabel. The HA sensor, the dashboard and its generator readapi_ok{forge="github"}, so a Forgejo read failure never shows as GitHub down.Until a read-only token exists,
forgejo:repos/*reportsapi_ok0 (kindruns) and the runner rows still show. No alert or Infra banner readskind="runs", so nothing pages. Token: a kblack0610 token with onlyread:repository, added withsops apps/github-runner-exporter/github-runner-exporter-secret.yamlas keyforgejo-token. That step is filed on the human sheet.Tests:
test_exporter.py62/62.https://claude.ai/code/session_01BALUC6LnQX9Quuz7grTxLX
The two forgejo-runner pods are rows in github_runner_state, pool="forgejo", one row per capacity slot (<pod>/<n>), and Forgejo waiting jobs, finished jobs, durations, pool workflows and last jobs join the same series. Every row carries forge="github" or forge="forgejo", so hub-core, the cc:pool_* rules and the CI dashboards pick the pool up with no query change. Forgejo 14 has no runner-list API, so the runners come from the runner pods and their ConfigMap (new Role in forgejo, bound to a new exporter ServiceAccount), and the runner of a task from its "task <id> repo is" log line. Jobs and tasks come from /repos/{o}/{r}/actions/runners/jobs and /actions/tasks, which need an owner token: FORGEJO_TOKEN reads the new optional forgejo-token key of the exporter secret, which a human adds. The HA "CI GitHub API" sensor and the Grafana "GitHub API" stat now read api_ok{forge="github"}, so a missing Forgejo token does not read as GitHub down. Claude-Session: https://claude.ai/code/session_01BALUC6LnQX9Quuz7grTxLX