actions-runner-controller/config
Yusuke Kuoka dbd7b486d2
feat: Support for scaling from/to zero (#465)
This is an attempt to support scaling from/to zero.

The basic idea is that we create a one-off "registration-only" runner pod on RunnerReplicaSet being scaled to zero, so that there is one "offline" runner, which enables GitHub Actions to queue jobs instead of discarding those.

GitHub Actions seems to immediately throw away the new job when there are no runners at all. Generally, having runners of any status, `busy`, `idle`, or `offline` would prevent GitHub actions from failing jobs. But retaining `busy` or `idle` runners means that we need to keep runner pods running, which conflicts with our desired to scale to/from zero, hence we retain `offline` runners.

In this change, I enhanced the runnerreplicaset controller to create a registration-only runner on very beginning of its reconciliation logic, only when a runnerreplicaset is scaled to zero. The runner controller creates the registration-only runner pod, waits for it to become "offline", and then removes the runner pod. The runner on GitHub stays `offline`, until the runner resource on K8s is deleted. As we remove the registration-only runner pod as soon as it registers, this doesn't block cluster-autoscaler.

Related to #447
2021-05-02 16:11:36 +09:00
..
certmanager Change api version of cert manager (#94) 2020-10-05 09:13:10 +09:00
crd feat: Docker registry mirror (#478) 2021-04-25 14:04:01 +09:00
default Use ARM64 compatible kube-rbac-proxy from upstream (#310) 2021-02-16 09:55:03 +09:00
manager feat: Support for scaling from/to zero (#465) 2021-05-02 16:11:36 +09:00
prometheus Initial commit 2020-01-28 15:03:23 +09:00
rbac Ensure controller-gen is up-to-date and the code and the manifests are in-sync 2020-10-06 09:23:03 +09:00
samples Add sample manifest of RunnerDeployment and RunnerReplicaSet 2020-03-15 22:08:01 +09:00
webhook Add manifests for validation webhook 2020-04-30 22:12:39 +09:00