From b4ca05f4e8cf5d2391fb73e71ed621459bf5073d Mon Sep 17 00:00:00 2001 From: David Jetelina Date: Thu, 4 Dec 2025 13:12:38 +0100 Subject: [PATCH] feat(chart-scale-set): Add support for custom dind image and imagePullPolicy --- charts/gha-runner-scale-set/templates/_helpers.tpl | 11 +++++++++-- charts/gha-runner-scale-set/values.yaml | 5 +++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/charts/gha-runner-scale-set/templates/_helpers.tpl b/charts/gha-runner-scale-set/templates/_helpers.tpl index 9dfb615f..f6d93229 100644 --- a/charts/gha-runner-scale-set/templates/_helpers.tpl +++ b/charts/gha-runner-scale-set/templates/_helpers.tpl @@ -86,6 +86,7 @@ app.kubernetes.io/instance: {{ include "gha-runner-scale-set.scale-set-name" . } {{- range $i, $val := .Values.template.spec.containers }} {{- if eq $val.name "runner" }} image: {{ $val.image }} +imagePullPolicy: {{ $val.imagePullPolicy }} command: ["cp"] args: ["-r", "/home/runner/externals/.", "/home/runner/tmpDir/"] volumeMounts: @@ -96,7 +97,11 @@ volumeMounts: {{- end }} {{- define "gha-runner-scale-set.dind-container" -}} -image: docker:dind +{{- $root := . -}} +{{- range $i, $val := .Values.template.spec.dindContainers }} + {{- if eq $val.name "dind" }} +image: {{ $val.image }} +imagePullPolicy: {{ $val.imagePullPolicy }} args: - dockerd - --host=unix:///var/run/docker.sock @@ -106,7 +111,7 @@ env: value: "123" securityContext: privileged: true -{{- if (ge (.Capabilities.KubeVersion.Minor | int) 29) }} +{{- if (ge ($root.Capabilities.KubeVersion.Minor | int) 29) }} restartPolicy: Always startupProbe: exec: @@ -124,6 +129,8 @@ volumeMounts: mountPath: /var/run - name: dind-externals mountPath: /home/runner/externals + {{- end }} +{{- end }} {{- end }} {{- define "gha-runner-scale-set.dind-volume" -}} diff --git a/charts/gha-runner-scale-set/values.yaml b/charts/gha-runner-scale-set/values.yaml index 8a9b64e9..828774df 100644 --- a/charts/gha-runner-scale-set/values.yaml +++ b/charts/gha-runner-scale-set/values.yaml @@ -415,7 +415,12 @@ template: containers: - name: runner image: ghcr.io/actions/actions-runner:latest + imagePullPolicy: Always command: ["/home/runner/run.sh"] + dindContainers: + - name: dind + image: docker:dind + imagePullPolicy: Always ## Optional controller service account that needs to have required Role and RoleBinding ## to operate this gha-runner-scale-set installation. ## The helm chart will try to find the controller deployment and its service account at installation time.