Skip to content
This repository was archived by the owner on Aug 29, 2024. It is now read-only.

Commit 3b82596

Browse files
committed
Add custom dind config and node tolerations for runner pob
1 parent 3be7128 commit 3b82596

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed

charts/gha-runner-scale-set/templates/_helpers.tpl

+7-1
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,17 @@ volumeMounts:
9696
{{- end }}
9797

9898
{{- define "gha-runner-scale-set.dind-container" -}}
99-
image: docker:dind
99+
image: {{ default "docker:dind" .Values.dindConfig.image }}
100100
args:
101101
- dockerd
102102
- --host=unix:///var/run/docker.sock
103103
- --group=$(DOCKER_GROUP_GID)
104+
{{- if .Values.dindConfig.bip }}
105+
- --bip={{ .Values.dindConfig.bip }}
106+
{{- end }}
107+
{{- if .Values.dindConfig.defaultAddressPool }}
108+
- --default-address-pool=base={{ .Values.dindConfig.defaultAddressPool.base}},size={{ .Values.dindConfig.defaultAddressPool.size}}
109+
{{- end }}
104110
env:
105111
- name: DOCKER_GROUP_GID
106112
value: "123"

charts/gha-runner-scale-set/templates/autoscalingrunnerset.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,19 @@ spec:
164164
{{- end }}
165165
{{- end }}
166166
{{- end }}
167+
{{- with .Values.nodeSelector }}
168+
nodeSelector:
169+
{{- toYaml . | nindent 8 }}
170+
{{- end }}
171+
{{- with .Values.affinity }}
172+
affinity:
173+
{{- toYaml . | nindent 8 }}
174+
{{- end }}
175+
{{- with .Values.topologySpreadConstraints }}
176+
topologySpreadConstraints:
177+
{{- toYaml . | nindent 8 }}
178+
{{- end }}
179+
{{- with .Values.tolerations }}
180+
tolerations:
181+
{{- toYaml . | nindent 8 }}
182+
{{- end }}

charts/gha-runner-scale-set/values.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,14 @@ githubConfigSecret:
8888
# kubernetesModeServiceAccount:
8989
# annotations:
9090

91+
## The following is the customization for dind image and network configuration
92+
# dindConfig:
93+
# image: docker:20.10.7-dind
94+
# bip: 192.168.200.1/24
95+
# defaultAddressPool:
96+
# base: 192.168.201.1/24
97+
# size: 24
98+
9199
## listenerTemplate is the PodSpec for each listener Pod
92100
## For reference: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#PodSpec
93101
# listenerTemplate:
@@ -201,3 +209,11 @@ template:
201209
# controllerServiceAccount:
202210
# namespace: arc-system
203211
# name: test-arc-gha-runner-scale-set-controller
212+
213+
nodeSelector: {}
214+
215+
tolerations: []
216+
217+
affinity: {}
218+
219+
topologySpreadConstraints: []

0 commit comments

Comments
 (0)