Skip to content

Commit

Permalink
Merge pull request #1459 from porter-dev/ym/additional_volumes
Browse files Browse the repository at this point in the history
feat: additional volumes on worker apps
  • Loading branch information
yosefmih authored Dec 20, 2024
2 parents 863c282 + 1bf0fb3 commit f5f8b2e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
16 changes: 15 additions & 1 deletion applications/worker/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,13 @@ spec:
readOnly: true
{{ end }}
{{ end }}
{{ if .Values.additionalVolumes }}
volumeMounts:
{{- range .Values.additionalVolumes }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
{{- end }}
{{ end }}
{{- if .Values.cloudsql.enabled }}
- name: cloud-sql-proxy
image: gcr.io/cloudsql-docker/gce-proxy:1.17
Expand Down Expand Up @@ -398,7 +405,7 @@ spec:
{{- end }}
{{- end }}
{{ end }}
{{ if or .Values.pvc.enabled .Values.cloudsql.enabled .Values.emptyDir.enabled .Values.datadogSocketVolume.enabled .Values.fileSecretMounts.enabled }}
{{ if or .Values.pvc.enabled .Values.cloudsql.enabled .Values.emptyDir.enabled .Values.datadogSocketVolume.enabled .Values.fileSecretMounts.enabled (and .Values.additionalVolumes (not (empty .Values.additionalVolumes))) }}
volumes:
{{ if .Values.datadogSocketVolume.enabled }}
- hostPath:
Expand Down Expand Up @@ -432,4 +439,11 @@ spec:
secretName: "{{ .secretName }}"
{{ end }}
{{ end }}
{{ if .Values.additionalVolumes }}
{{- range .Values.additionalVolumes }}
- name: {{ .name }}
{{ .type }}:
{{- toYaml .volumeOptions | nindent 12 }}
{{- end }}
{{ end }}
{{ end }}
9 changes: 8 additions & 1 deletion applications/worker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,4 +177,11 @@ nodeGroups: []
# Format: fileSecretMounts: [{secretName: <SECRET_NAME>, mountPath: <MOUNT_PATH>},..]
fileSecretMounts:
enabled: false
mounts: []
mounts: []

# set this to add additional volumes to the deployment
additionalVolumes:
# - name: ""
# type: ""
# mountPath: ""
# volumeOptions: {}

0 comments on commit f5f8b2e

Please sign in to comment.