-
Notifications
You must be signed in to change notification settings - Fork 31
/
gh-actions-with-aks-aci.yaml
76 lines (76 loc) · 1.63 KB
/
gh-actions-with-aks-aci.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
apiVersion: v1
kind: Service
metadata:
name: dindsvc
labels:
app: dinddindsvc
spec:
ports:
- port: 2375
targetPort: 2375
name: dockerd
selector:
app: dind
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: dind
spec:
replicas: 1
selector:
matchLabels:
app: dind
template:
metadata:
labels:
app: dind
spec:
containers:
- name: dind
image: "docker:dind"
imagePullPolicy: Always
command: ["dockerd", "--host", "tcp://0.0.0.0:2375"]
securityContext:
privileged: true
volumes:
- name: launcher-storage
emptyDir: {}
---
apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerDeployment
metadata:
name: dos-box-runner
spec:
replicas: 1
template:
spec:
image: summerwind/actions-runner-dind
env:
- name: DOCKER_HOST
value: "tcp://dindsvc:2375"
dockerdWithinRunnerContainer: true
repository: theonemule/dos-game
tolerations:
- key: virtual-kubelet.io/provider
operator: "Exists"
effect: NoSchedule
---
apiVersion: actions.summerwind.dev/v1alpha1
kind: HorizontalRunnerAutoscaler
metadata:
name: dos-box-runner-autoscaler
spec:
scaleDownDelaySecondsAfterScaleOut: 300
scaleTargetRef:
kind: RunnerDeployment
name: dos-box-runner
minReplicas: 0
maxReplicas: 5
metrics:
- type: TotalNumberOfQueuedAndInProgressWorkflowRuns
scaleUpThreshold: '1'
scaleDownThreshold: '0'
scaleUpFactor: '2'
scaleDownFactor: '0.5'