diff --git a/charts/ix-chart/2010.0.1/questions.yaml b/charts/ix-chart/2010.0.1/questions.yaml index c523b9e8ea..910268c739 100644 --- a/charts/ix-chart/2010.0.1/questions.yaml +++ b/charts/ix-chart/2010.0.1/questions.yaml @@ -276,6 +276,32 @@ type: string required: true +# Volumes +- variable: volumes + label: "Volumes" + group: "Storage" + schema: + type: list + items: + - variable: volume + label: "Volume" + schema: + type: dict + $ref: + - "normalise/ixVolume" + attrs: + - variable: mountPath + label: "Mount Path" + description: "Path where the volume will be mounted inside the pod" + schema: + type: path + required: true + - variable: datasetName + label: "Dataset Name" + schema: + type: string + required: true + # Pod Probes # Liveness Probe - variable: livenessProbe diff --git a/charts/ix-chart/2010.0.1/templates/_volumes.tpl b/charts/ix-chart/2010.0.1/templates/_volumes.tpl index 6da4aee6d5..c4493bbce7 100644 --- a/charts/ix-chart/2010.0.1/templates/_volumes.tpl +++ b/charts/ix-chart/2010.0.1/templates/_volumes.tpl @@ -2,13 +2,18 @@ Volumes Configuration */}} {{- define "volumeConfiguration" }} -{{- if or .Values.persistentVolumeClaims .Values.hostPathVolumes }} +{{- if or (or .Values.persistentVolumeClaims .Values.hostPathVolumes) .Values.ixVolumes }} volumes: {{- range $index, $hostPathConfiguration := .Values.hostPathVolumes }} - name: ix-host-path-{{ $.Release.Name }}-{{ $index }} hostPath: path: {{ $hostPathConfiguration.hostPath }} {{- end }} +{{- range $index, $hostPathConfiguration := .Values.ixVolumes }} + - name: ix-host-volume-{{ $.Release.Name }}-{{ $index }} + hostPath: + path: {{ $hostPathConfiguration.hostPath }} +{{- end }} {{- range $index, $claim := .Values.persistentVolumeClaims }} - name: ix-pv-{{ $claim.name }} persistentVolumeClaim: @@ -28,6 +33,10 @@ volumeMounts: name: ix-host-path-{{ $.Release.Name }}-{{ $index }} readOnly: {{ $hostPathConfiguration.readOnly }} {{- end }} + {{- range $index, $hostPathConfiguration := .Values.ixVolumes }} + - mountPath: {{ $hostPathConfiguration.mountPath }} + name: ix-host-volume-{{ $.Release.Name }}-{{ $index }} + {{- end }} {{- range $index, $claim := .Values.persistentVolumeClaims }} - mountPath: {{ $claim.mountPath }} name: ix-pv-{{ $claim.name }} diff --git a/charts/ix-chart/2010.0.1/values.yaml b/charts/ix-chart/2010.0.1/values.yaml index 2c2b048449..a50eb3f17a 100644 --- a/charts/ix-chart/2010.0.1/values.yaml +++ b/charts/ix-chart/2010.0.1/values.yaml @@ -17,6 +17,7 @@ externalInterfaces: [] # Storage related configuration hostPathVolumes: [] persistentVolumeClaims: [] +volumes: [] # Probes # Liveness Probe