Skip to content

Commit 4d05ff8

Browse files
committed
Added the same functionality for job charts.
1 parent 130b0eb commit 4d05ff8

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

applications/job/templates/cronjob.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,12 @@ spec:
182182
- name: "{{ include "docker-template.fullname" . }}-storage"
183183
mountPath: {{ .Values.pvc.mountPath }}
184184
{{ end }}
185+
{{- if .Values.multiplePvc.enabled }}
186+
{{- range .Values.multiplePvc.volumes }}
187+
- name: {{ .name }}
188+
mountPath: {{ .mountPath }}
189+
{{- end }}
190+
{{- end }}
185191
resources:
186192
requests:
187193
cpu: {{ .Values.resources.requests.cpu }}
@@ -252,7 +258,7 @@ spec:
252258
mountPath: /secrets/
253259
readOnly: true
254260
{{ end }}
255-
{{ if or .Values.cloudsql.enabled .Values.fileSecretMounts.enabled .Values.pvc.enabled}}
261+
{{ if or .Values.cloudsql.enabled .Values.fileSecretMounts.enabled .Values.pvc.enabled .Values.multiplePvc.enabled }}
256262
volumes:
257263
{{ if .Values.cloudsql.enabled }}
258264
- name: "cloud-sql-proxy-service-account-secret"
@@ -268,6 +274,12 @@ spec:
268274
claimName: "{{ include "docker-template.fullname" . }}-pvc"
269275
{{- end }}
270276
{{ end }}
277+
{{ if .Values.multiplePvc.enabled }}
278+
{{- range .Values.multiplePvc.volumes }}
279+
- name: {{ .name }}
280+
persistentVolumeClaim:
281+
claimName: {{ .existingVolume }}
282+
{{- end }}
271283
{{ if .Values.fileSecretMounts.enabled }}
272284
{{ range .Values.fileSecretMounts.mounts }}
273285
- name: {{ .mountPath }}

applications/job/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,13 @@ pvc:
111111
mountPath: /mypath
112112
existingVolume: ""
113113

114+
multiplePvc:
115+
enabled: false
116+
volumes:
117+
- name: ""
118+
storage: 20Gi
119+
mountPath: /mypath
120+
existingVolume: ""
121+
114122
# job timeout configuration
115123
activeDeadlineSeconds: # Optional - if not set, will use sidecar.timeout

0 commit comments

Comments
 (0)