actions-runner-controller/api/v1alpha1
Yusuke Kuoka ab1c39de57
feat: HorizontalRunnerAutoscaler Webhook server (#282)
* feat: HorizontalRunnerAutoscaler Webhook server

This introduces a Webhook server that responds GitHub `check_run`, `pull_request`, and `push` events by scaling up matched HorizontalRunnerAutoscaler by 1 replica. This allows you to immediately add "resource slack" for future GitHub Actions job runs, without waiting next sync period to add insufficient runners.

This feature is highly inspired by https://github.com/philips-labs/terraform-aws-github-runner. terraform-aws-github-runner can manage one set of runners per deployment, where actions-runner-controller with this feature can manage as many sets of runners as you declare with HorizontalRunnerAutoscaler and RunnerDeployment pairs.

On each GitHub event received, the webhook server queries repository-wide and organizational runners from the cluster and searches for the single target to scale up. The webhook server tries to match HorizontalRunnerAutoscaler.Spec.ScaleUpTriggers[].GitHubEvent.[CheckRun|Push|PullRequest] against the event and if it finds only one HRA, it is the scale target. If none or two or more targets are found for repository-wide runners, it does the same on organizational runners.

Changes:

* Fix integration test
* Update manifests
* chart: Add support for github webhook server
* dockerfile: Include github-webhook-server binary
* Do not import unversioned go-github
* Update README
2021-02-07 17:37:27 +09:00
..
groupversion_info.go Initial commit 2020-01-28 15:03:23 +09:00
horizontalrunnerautoscaler_types.go feat: HorizontalRunnerAutoscaler Webhook server (#282) 2021-02-07 17:37:27 +09:00
runner_types.go Add support for enterprise runners (#290) 2021-02-05 09:31:06 +09:00
runner_webhook.go Add validation webhooks 2020-04-30 22:11:59 +09:00
runnerdeployment_types.go Add "PercentageRunnersBusy" horizontal runner autoscaler metric type (#223) 2020-12-13 08:48:19 +09:00
runnerdeployment_webhook.go Add validation webhooks 2020-04-30 22:11:59 +09:00
runnerreplicaset_types.go Make Runner{Deployment,ReplicaSet} replicas actually optional (#186) 2020-11-14 22:06:33 +09:00
runnerreplicaset_webhook.go Add validation webhooks 2020-04-30 22:11:59 +09:00
zz_generated.deepcopy.go feat: HorizontalRunnerAutoscaler Webhook server (#282) 2021-02-07 17:37:27 +09:00