Add support for ix based volumes

This commit is contained in:
Waqar Ahmed 2020-10-09 21:38:22 +05:00
parent 8bd17a7e55
commit b085048725
3 changed files with 37 additions and 1 deletions

View File

@ -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

View File

@ -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 }}

View File

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