From 0af8cc7caa9e1712f7c817e770c0bc5ae254161d Mon Sep 17 00:00:00 2001 From: Yashraj Dighe Date: Fri, 4 Apr 2025 19:30:59 +0530 Subject: [PATCH] fix: allow DinD image to be configured via valuesl This change makes the DinD image configurable by checking the container spec for a container named "dind" and using its defined image if present. Defaults to "docker:dind" otherwise. --- charts/gha-runner-scale-set/templates/_helpers.tpl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/charts/gha-runner-scale-set/templates/_helpers.tpl b/charts/gha-runner-scale-set/templates/_helpers.tpl index ef75a3f2..90bb2748 100644 --- a/charts/gha-runner-scale-set/templates/_helpers.tpl +++ b/charts/gha-runner-scale-set/templates/_helpers.tpl @@ -89,14 +89,22 @@ image: {{ $val.image }} command: ["cp"] args: ["-r", "/home/runner/externals/.", "/home/runner/tmpDir/"] volumeMounts: - - name: dind-externals + - name: -externals mountPath: /home/runner/tmpDir {{- end }} {{- end }} {{- end }} {{- define "gha-runner-scale-set.dind-container" -}} -image: docker:dind + +{{- $dindImage := "docker:dind" -}} +{{- range $i, $val := .Values.template.spec.containers }} + {{- if eq $val.name "dind" }} + {{- $dindImage = $val.image }} + {{- end }} +{{- end }} + +image: {{ $dindImage }} args: - dockerd - --host=unix:///var/run/docker.sock