Browse Source

only run pre-instal job when export is defined (#1667)

Stavros Kois 1 năm trước cách đây
mục cha
commit
c5fceed7ca

+ 1 - 1
library/ix-dev/charts/minio/Chart.yaml

@@ -3,7 +3,7 @@ description: High Performance, Kubernetes Native Object Storage
 annotations:
   title: MinIO
 type: application
-version: 1.7.18
+version: 1.7.19
 apiVersion: v2
 appVersion: '2023-03-13'
 kubeVersion: '>=1.16.0-0'

+ 4 - 0
library/ix-dev/charts/minio/templates/pre-install-job.yaml

@@ -1,3 +1,5 @@
+{{- if .Values.appVolumeMounts -}}
+{{- if hasKey .Values.appVolumeMounts "export" }}
 apiVersion: batch/v1
 kind: Job
 metadata:
@@ -26,3 +28,5 @@ spec:
         command: ["chown", "-R", "{{ .Values.runAsUser }}:{{ .Values.runAsGroup }}", "{{ .Values.appVolumeMounts.export.mountPath }}"]
         volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }}
       volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
+{{- end -}}
+{{- end -}}