Skip to content

Commit ad0dc63

Browse files
committed
feat(chart-scale-set): Add support for custom dind image and imagePullPolicy
1 parent 5402698 commit ad0dc63

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ app.kubernetes.io/instance: {{ include "gha-runner-scale-set.scale-set-name" . }
8686
{{- range $i, $val := .Values.template.spec.containers }}
8787
{{- if eq $val.name "runner" }}
8888
image: {{ $val.image }}
89+
imagePullPolicy: {{ $val.imagePullPolicy }}
8990
command: ["cp"]
9091
args: ["-r", "/home/runner/externals/.", "/home/runner/tmpDir/"]
9192
volumeMounts:
@@ -96,7 +97,10 @@ volumeMounts:
9697
{{- end }}
9798

9899
{{- define "gha-runner-scale-set.dind-container" -}}
99-
image: docker:dind
100+
{{- range $i, $val := .Values.template.spec.containers }}
101+
{{- if eq $val.name "dind" }}
102+
image: {{ $val.image }}
103+
imagePullPolicy: {{ $val.imagePullPolicy }}
100104
args:
101105
- dockerd
102106
- --host=unix:///var/run/docker.sock
@@ -124,6 +128,8 @@ volumeMounts:
124128
mountPath: /var/run
125129
- name: dind-externals
126130
mountPath: /home/runner/externals
131+
{{- end }}
132+
{{- end }}
127133
{{- end }}
128134

129135
{{- define "gha-runner-scale-set.dind-volume" -}}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,11 @@ template:
415415
containers:
416416
- name: runner
417417
image: ghcr.io/actions/actions-runner:latest
418+
imagePullPolicy: Always
418419
command: ["/home/runner/run.sh"]
420+
- name: dind
421+
image: docker:dind
422+
imagePullPolicy: Always
419423
## Optional controller service account that needs to have required Role and RoleBinding
420424
## to operate this gha-runner-scale-set installation.
421425
## The helm chart will try to find the controller deployment and its service account at installation time.

0 commit comments

Comments
 (0)