feat: Organization RunnerDeployment with webhook-based autoscaling only for certain repositories (#766)

Resolves #765

Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
This commit is contained in:
Tarasovych
2021-08-31 03:46:36 +03:00
committed by GitHub
parent d9df455781
commit 7008b0c257
9 changed files with 76 additions and 7 deletions

View File

@@ -577,6 +577,30 @@ spec:
duration: "5m"
```
To scale up replicas of the runners for `myorg` organization by 1 for 5 minutes on each `check_run`, you write manifests like the below:
```yaml
kind: RunnerDeployment
metadata:
name: myrunners
spec:
organization: myorg
---
kind: HorizontalRunnerAutoscaler
spec:
scaleTargetRef:
name: myrunners
scaleUpTriggers:
- githubEvent:
checkRun:
types: ["created"]
status: "queued"
# allow only certain repositories within your organization to trigger autoscaling
# repositories: ["myrepo", "myanotherrepo"]
amount: 1
duration: "5m"
```
###### Example 2: Scale on each `pull_request` event against `develop` or `main` branches
```yaml