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"] | command: ["cp"] | ||||||
| args: ["-r", "/home/runner/externals/.", "/home/runner/tmpDir/"] | args: ["-r", "/home/runner/externals/.", "/home/runner/tmpDir/"] | ||||||
| volumeMounts: | volumeMounts: | ||||||
|   - name: dind-externals |   - name: -externals | ||||||
|     mountPath: /home/runner/tmpDir |     mountPath: /home/runner/tmpDir | ||||||
|   {{- end }} |   {{- end }} | ||||||
| {{- end }} | {{- end }} | ||||||
| {{- end }} | {{- end }} | ||||||
| 
 | 
 | ||||||
| {{- define "gha-runner-scale-set.dind-container" -}} | {{- 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: | args: | ||||||
|   - dockerd |   - dockerd | ||||||
|   - --host=unix:///var/run/docker.sock |   - --host=unix:///var/run/docker.sock | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue