-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrunner-deployment.yaml
56 lines (54 loc) · 1.54 KB
/
runner-deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Self-hosted Github runner template
#
# You need to replace all values following the `<variable_name>` pattern
# see:
# - https://github.com/actions/actions-runner-controller/blob/master/docs/installing-arc.md
# - https://github.com/actions/actions-runner-controller/blob/master/docs/authenticating-to-the-github-api.md#deploying-using-github-app-authentication
# - https://github.com/actions/actions-runner-controller/blob/master/docs/deploying-arc-runners.md
---
apiVersion: v1
kind: Secret
metadata:
name: <github_username>
stringData:
github_app_id: '<github_app_id>'
github_app_installation_id: '<github_app_installation_id>'
github_app_private_key: |-
<github_app_private_key>
---
apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerDeployment
metadata:
name: <github_repository>
spec:
template:
spec:
repository: <github_username>/<github_repository>
githubAPICredentialsFrom:
secretRef:
name: <github_username>
---
apiVersion: actions.summerwind.dev/v1alpha1
kind: HorizontalRunnerAutoscaler
metadata:
name: <github_repository>
spec:
scaleDownDelaySecondsAfterScaleOut: 600
githubAPICredentialsFrom:
secretRef:
name: <github_repository>
scaleTargetRef:
kind: RunnerDeployment
name: <github_repository>
minReplicas: 2
maxReplicas: 4
scaleUpTriggers:
- githubEvent:
workflowJob: {}
duration: 30m
# metrics:
# - type: PercentageRunnersBusy
# scaleUpThreshold: '0.75'
# scaleDownThreshold: '0.25'
# scaleUpFactor: '2'
# scaleDownFactor: '0.5'