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.
This commit is contained in:
parent
4ca37fbdf2
commit
0af8cc7caa
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue