diff --git a/charts/gha-runner-scale-set/templates/_helpers.tpl b/charts/gha-runner-scale-set/templates/_helpers.tpl index 53b1c2b3..ca324991 100644 --- a/charts/gha-runner-scale-set/templates/_helpers.tpl +++ b/charts/gha-runner-scale-set/templates/_helpers.tpl @@ -100,6 +100,7 @@ annotations: {{- 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: @@ -110,7 +111,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 @@ -120,7 +125,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: @@ -138,6 +143,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 4b4640cf..1601fac1 100644 --- a/charts/gha-runner-scale-set/values.yaml +++ b/charts/gha-runner-scale-set/values.yaml @@ -417,7 +417,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.