actions-runner-controller/runner
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
..
patched Use self update ready entrypoint (#99) 2020-10-05 08:58:20 +09:00
supervisor Configurable "runner and DinD in a single container" (#126) 2020-10-20 08:48:28 +09:00
Dockerfile Locally build runner image instead of pulling it (#473) 2021-05-01 15:10:57 +09:00
Dockerfile.dindrunner Locally build runner image instead of pulling it (#473) 2021-05-01 15:10:57 +09:00
Dockerfile.ubuntu.1804 Locally build runner image instead of pulling it (#473) 2021-05-01 15:10:57 +09:00
Makefile chore: bump runner (#486) 2021-04-27 08:38:40 +09:00
entrypoint.sh feat: Support for scaling from/to zero (#465) 2021-05-02 16:11:36 +09:00
logger.sh Configurable "runner and DinD in a single container" (#126) 2020-10-20 08:48:28 +09:00
modprobe Configurable "runner and DinD in a single container" (#126) 2020-10-20 08:48:28 +09:00
startup.sh feat: Docker registry mirror (#478) 2021-04-25 14:04:01 +09:00