Allow specifying dind container in values (#750)

This allows:

- resource spec for the dind container different from the main agent
- environment variables for the dind container can also be specified in values, e.g. to change the default driver if one so wishes
- crucially: specifying a different dind image
This commit is contained in:
Florian Piesche 2022-02-06 15:39:51 +00:00 committed by GitHub
parent 9ff0f230ec
commit dbd048c5e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 4 deletions

View file

@ -57,12 +57,14 @@ spec:
name: {{ . }}
{{- end }}
- name: dind
image: "docker:20.10.12-dind"
image: {{ .Values.dind.image }}
env:
- name: DOCKER_DRIVER
value: overlay2
{{- range $key, $value := .Values.dind.env }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- toYaml .Values.dind.resources | nindent 12 }}
securityContext:
privileged: true
volumeMounts:

View file

@ -7,6 +7,13 @@ image:
# Overrides the image tag whose default is the chart appVersion.
tag: ""
dind:
image: "docker:20.10.12-dind"
env:
- name: DOCKER_DRIVER
value: overlay2
resources: {}
env:
WOODPECKER_SERVER: "woodpecker-server.<namespace>.svc.cluster.local:9000"