Skip to content

Commit

Permalink
Allow specifying dind container in values (#750)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fpiesche authored Feb 6, 2022
1 parent 9ff0f23 commit dbd048c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
10 changes: 6 additions & 4 deletions charts/woodpecker-agent/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions charts/woodpecker-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit dbd048c

Please sign in to comment.