Parcourir la source

Add support for ix based volumes

Waqar Ahmed il y a 4 ans
Parent
commit
b085048725

+ 26 - 0
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

+ 10 - 1
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 }}

+ 1 - 0
charts/ix-chart/2010.0.1/values.yaml

@@ -17,6 +17,7 @@ externalInterfaces: []
 # Storage related configuration
 hostPathVolumes: []
 persistentVolumeClaims: []
+volumes: []
 
 # Probes
 # Liveness Probe