From 87804624fea1ccb30d236147c930b82fe85fa38d Mon Sep 17 00:00:00 2001 From: Harrison Brown Date: Thu, 10 Oct 2024 08:48:16 -0700 Subject: [PATCH] Helm: Add extraVolumes and extraVolumeMounts to the customCommandJob section (#19988) added extraVolumes and extraVolumeMounts to the customCommandJob section --- helm/minio/templates/post-job.yaml | 6 ++++++ helm/minio/values.yaml | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/helm/minio/templates/post-job.yaml b/helm/minio/templates/post-job.yaml index 5feb78317..899fd81d6 100644 --- a/helm/minio/templates/post-job.yaml +++ b/helm/minio/templates/post-job.yaml @@ -82,6 +82,9 @@ spec: - key: {{ .Values.tls.publicCrt }} path: CAs/public.crt {{- end }} + {{- if .Values.customCommandJob.extraVolumes }} + {{- toYaml .Values.customCommandJob.extraVolumes | nindent 8 }} + {{- end }} {{- if .Values.serviceAccount.create }} serviceAccountName: {{ .Values.serviceAccount.name }} {{- end }} @@ -217,6 +220,9 @@ spec: - name: cert-secret-volume-mc mountPath: {{ .Values.configPathmc }}certs {{- end }} + {{- if .Values.customCommandJob.extraVolumeMounts }} + {{- toYaml .Values.customCommandJob.extraVolumeMounts | nindent 12 }} + {{- end }} resources: {{- toYaml .Values.customCommandJob.resources | nindent 12 }} {{- end }} {{- if .Values.svcaccts }} diff --git a/helm/minio/values.yaml b/helm/minio/values.yaml index 8cb1d970d..f8e644bce 100644 --- a/helm/minio/values.yaml +++ b/helm/minio/values.yaml @@ -476,6 +476,16 @@ customCommandJob: resources: requests: memory: 128Mi + ## Additional volumes to add to the post-job. + extraVolumes: [] + # - name: extra-policies + # configMap: + # name: my-extra-policies-cm + ## Additional volumeMounts to add to the custom commands container when + ## running the post-job. + extraVolumeMounts: [] + # - name: extra-policies + # mountPath: /mnt/extras/ # Command to run after the main command on exit exitCommand: ""