|
|
||
|---|---|---|
| .. | ||
| externalscaler | ||
| Dockerfile | ||
| README.md | ||
| externalscaler.proto | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
README.md
Stateless Gitea runner scaler.
Design:
- Gitea emits
workflow_jobwebhooks toPOST /webhooks/workflow-job - This service verifies the webhook signature and tracks queued jobs in Redis
- KEDA polls the gRPC external scaler API on port
50051 - The scale target is
Deployment/act-runner
Why this exists:
- The previous scaler read
gitea.dbfrom thegitea-dataSQLite volume - That coupled scaler scheduling and failover to the same
ReadWriteOncePVC as Gitea - This redesign removes that PVC dependency entirely
Current assumptions:
- Gitea webhook payloads are GitHub-compatible enough to provide:
actionworkflow_job.idworkflow_job.labelsworkflow_job.status
- The label we currently care about is
ubuntu-latest
Required wiring before production/staging rollout:
- Build and publish
git.staging.jamkazam.com/seth/gitea-external-scaler:2.0.1 - Set a real
webhookSecretinrunner-scaler.yaml - Add repo or instance webhooks in Gitea that send
workflow_jobevents to:http://gitea-external-scaler.jam-cloud-infra.svc.cluster.local:8080/webhooks/workflow-job - Decide whether
act-runnerdesired replicas should move to0in repo-managed state
Reference:
- Gitea docs recommend the
workflow_jobwebhook to automate registration/startup of new runners.