Skip to content

Commit af7253d

Browse files
authored
Merge pull request #383 from concourse/fix-worker-deployment
Create emptyDir for worker when using kind Deployment
2 parents acff4b1 + 698e468 commit af7253d

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

templates/worker-deployment.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ spec:
116116
subPath: worker-additional-certs.pem
117117
readOnly: true
118118
{{- end }}
119+
{{- if include "concourse.are-there-additional-volumes.with-the-name.concourse-work-dir" . | not }}
120+
- name: concourse-work-dir
121+
mountPath: {{ .Values.concourse.worker.workDir | quote }}
122+
{{- end }}
119123

120124
{{- if .Values.worker.additionalVolumeMounts }}
121125
{{ toYaml .Values.worker.additionalVolumeMounts | indent 12 }}
@@ -147,6 +151,13 @@ spec:
147151
release: {{ .Release.Name | quote }}
148152
{{- end }}
149153
volumes:
154+
{{- if include "concourse.are-there-additional-volumes.with-the-name.concourse-work-dir" . | not }}
155+
- name: concourse-work-dir
156+
emptyDir:
157+
{{- if .Values.worker.emptyDirSize }}
158+
sizeLimit: {{ .Values.worker.emptyDirSize | quote }}
159+
{{- end }}
160+
{{- end }}
150161
{{- if .Values.worker.additionalVolumes }}
151162
{{ toYaml .Values.worker.additionalVolumes | indent 8 }}
152163
{{- end }}

values.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2683,7 +2683,8 @@ worker:
26832683
## Ignored for Kind Deployment
26842684
podManagementPolicy: Parallel
26852685

2686-
## When persistance is disabled this value will be used to limit the emptyDir volume size
2686+
## When persistance is disabled or using a Deployment, this value will be used
2687+
## to limit the emptyDir volume size
26872688
## Ref: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir
26882689
##
26892690
## Example: 20Gi

0 commit comments

Comments
 (0)