Skip to content

Commit 225e8fc

Browse files
authored
Merge pull request #1460 from porter-dev/main
Move additional volumes for workers to prod
2 parents 7e84dfe + f5f8b2e commit 225e8fc

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

applications/worker/templates/deployment.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,13 @@ spec:
331331
readOnly: true
332332
{{ end }}
333333
{{ end }}
334+
{{ if .Values.additionalVolumes }}
335+
volumeMounts:
336+
{{- range .Values.additionalVolumes }}
337+
- name: {{ .name }}
338+
mountPath: {{ .mountPath }}
339+
{{- end }}
340+
{{ end }}
334341
{{- if .Values.cloudsql.enabled }}
335342
- name: cloud-sql-proxy
336343
image: gcr.io/cloudsql-docker/gce-proxy:1.17
@@ -398,7 +405,7 @@ spec:
398405
{{- end }}
399406
{{- end }}
400407
{{ end }}
401-
{{ if or .Values.pvc.enabled .Values.cloudsql.enabled .Values.emptyDir.enabled .Values.datadogSocketVolume.enabled .Values.fileSecretMounts.enabled }}
408+
{{ if or .Values.pvc.enabled .Values.cloudsql.enabled .Values.emptyDir.enabled .Values.datadogSocketVolume.enabled .Values.fileSecretMounts.enabled (and .Values.additionalVolumes (not (empty .Values.additionalVolumes))) }}
402409
volumes:
403410
{{ if .Values.datadogSocketVolume.enabled }}
404411
- hostPath:
@@ -432,4 +439,11 @@ spec:
432439
secretName: "{{ .secretName }}"
433440
{{ end }}
434441
{{ end }}
442+
{{ if .Values.additionalVolumes }}
443+
{{- range .Values.additionalVolumes }}
444+
- name: {{ .name }}
445+
{{ .type }}:
446+
{{- toYaml .volumeOptions | nindent 12 }}
447+
{{- end }}
448+
{{ end }}
435449
{{ end }}

applications/worker/values.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,4 +177,11 @@ nodeGroups: []
177177
# Format: fileSecretMounts: [{secretName: <SECRET_NAME>, mountPath: <MOUNT_PATH>},..]
178178
fileSecretMounts:
179179
enabled: false
180-
mounts: []
180+
mounts: []
181+
182+
# set this to add additional volumes to the deployment
183+
additionalVolumes:
184+
# - name: ""
185+
# type: ""
186+
# mountPath: ""
187+
# volumeOptions: {}

0 commit comments

Comments
 (0)