Skip to content

Commit cf56b99

Browse files
committed
Allow extra args for docker daemon when in dind mode
1 parent 088e2a3 commit cf56b99

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ args:
101101
- dockerd
102102
- --host=unix:///var/run/docker.sock
103103
- --group=$(DOCKER_GROUP_GID)
104+
{{- /* Append extra args only if containerMode.dind.extraDockerDaemonArgs exists and is a list */ -}}
105+
{{- if and (kindIs "map" .Values.containerMode) (kindIs "map" (get .Values.containerMode "dind")) -}}
106+
{{- $extra := (get (get .Values.containerMode "dind") "extraDockerDaemonArgs") | default (list) -}}
107+
{{- range $extra }}
108+
- {{ . | quote }}
109+
{{- end }}
110+
{{- end }}
104111
env:
105112
- name: DOCKER_GROUP_GID
106113
value: "123"

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ githubConfigSecret:
116116
## empty, and configuration should be applied to the template.
117117
# containerMode:
118118
# type: "dind" ## type can be set to dind or kubernetes
119+
# dind:
120+
# ## extraDockerDaemonArgs is a list of extra arguments to pass to the docker daemon
121+
# extraDockerDaemonArgs:
122+
# - --registry-mirror=https://my-mirror.com
123+
# - --https-proxy=http://my-proxy.com:1234
124+
# - --mtu=1400
119125
# ## the following is required when containerMode.type=kubernetes
120126
# kubernetesModeWorkVolumeClaim:
121127
# accessModes: ["ReadWriteOnce"]

0 commit comments

Comments
 (0)