From cf56b99c674e050e69a4be1e270d27aefd3d065c Mon Sep 17 00:00:00 2001 From: Konstantinos Kokkinos Date: Mon, 22 Sep 2025 16:32:21 +0300 Subject: [PATCH] Allow extra args for docker daemon when in dind mode --- charts/gha-runner-scale-set/templates/_helpers.tpl | 7 +++++++ charts/gha-runner-scale-set/values.yaml | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/charts/gha-runner-scale-set/templates/_helpers.tpl b/charts/gha-runner-scale-set/templates/_helpers.tpl index 8428c29aee..8b5bb475bb 100644 --- a/charts/gha-runner-scale-set/templates/_helpers.tpl +++ b/charts/gha-runner-scale-set/templates/_helpers.tpl @@ -101,6 +101,13 @@ args: - dockerd - --host=unix:///var/run/docker.sock - --group=$(DOCKER_GROUP_GID) +{{- /* Append extra args only if containerMode.dind.extraDockerDaemonArgs exists and is a list */ -}} +{{- if and (kindIs "map" .Values.containerMode) (kindIs "map" (get .Values.containerMode "dind")) -}} + {{- $extra := (get (get .Values.containerMode "dind") "extraDockerDaemonArgs") | default (list) -}} + {{- range $extra }} + - {{ . | quote }} + {{- end }} +{{- end }} env: - name: DOCKER_GROUP_GID value: "123" diff --git a/charts/gha-runner-scale-set/values.yaml b/charts/gha-runner-scale-set/values.yaml index c602dd2280..22951dd099 100644 --- a/charts/gha-runner-scale-set/values.yaml +++ b/charts/gha-runner-scale-set/values.yaml @@ -116,6 +116,12 @@ githubConfigSecret: ## empty, and configuration should be applied to the template. # containerMode: # type: "dind" ## type can be set to dind or kubernetes +# dind: +# ## extraDockerDaemonArgs is a list of extra arguments to pass to the docker daemon +# extraDockerDaemonArgs: +# - --registry-mirror=https://my-mirror.com +# - --https-proxy=http://my-proxy.com:1234 +# - --mtu=1400 # ## the following is required when containerMode.type=kubernetes # kubernetesModeWorkVolumeClaim: # accessModes: ["ReadWriteOnce"]