From dbd048c5e9a9d2beebdb13a6f830f14037912197 Mon Sep 17 00:00:00 2001 From: Florian Piesche Date: Sun, 6 Feb 2022 15:39:51 +0000 Subject: [PATCH] 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 --- charts/woodpecker-agent/templates/deployment.yaml | 10 ++++++---- charts/woodpecker-agent/values.yaml | 7 +++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/charts/woodpecker-agent/templates/deployment.yaml b/charts/woodpecker-agent/templates/deployment.yaml index a07c4459a..09baa8e83 100644 --- a/charts/woodpecker-agent/templates/deployment.yaml +++ b/charts/woodpecker-agent/templates/deployment.yaml @@ -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: diff --git a/charts/woodpecker-agent/values.yaml b/charts/woodpecker-agent/values.yaml index d4841d4b8..fa79704c5 100644 --- a/charts/woodpecker-agent/values.yaml +++ b/charts/woodpecker-agent/values.yaml @@ -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..svc.cluster.local:9000"