Commit 3e02cd90 authored by sonicaj's avatar sonicaj

Allow memory backed emptydir volumes

parent 805fda5f
...@@ -391,6 +391,25 @@ questions: ...@@ -391,6 +391,25 @@ questions:
type: boolean type: boolean
default: false default: false
- variable: emptyDirVolumes
label: "Memory Backed Volumes"
description: "Mount memory based temporary volumes for fast access i.e consuming /dev/shm"
group: "Storage"
schema:
type: list
items:
- variable: emptyDirVolume
label: "Memory Backed Volume"
schema:
type: dict
attrs:
- variable: mountPath
label: "Mount Path"
description: "Path where temporary path will be mounted inside the pod"
schema:
type: path
required: true
# Volumes # Volumes
- variable: volumes - variable: volumes
label: "Volumes" label: "Volumes"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Volumes Configuration Volumes Configuration
*/}} */}}
{{- define "volumeConfiguration" }} {{- define "volumeConfiguration" }}
{{- if or .Values.ixVolumes .Values.hostPathVolumes }} {{- if or .Values.ixVolumes .Values.hostPathVolumes .Values.emptyDirVolumes }}
volumes: volumes:
{{- range $index, $hostPathConfiguration := .Values.hostPathVolumes }} {{- range $index, $hostPathConfiguration := .Values.hostPathVolumes }}
- name: ix-host-path-{{ $.Release.Name }}-{{ $index }} - name: ix-host-path-{{ $.Release.Name }}-{{ $index }}
...@@ -15,6 +15,11 @@ volumes: ...@@ -15,6 +15,11 @@ volumes:
hostPath: hostPath:
path: {{ $hostPathConfiguration.hostPath }} path: {{ $hostPathConfiguration.hostPath }}
{{- end }} {{- end }}
{{- range $index, $emptyDirConfiguration := .Values.emptyDirVolumes }}
- name: ix-emptydir-volume-{{ $.Release.Name }}-{{ $index }}
emptyDir:
medium: Memory
{{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}
...@@ -23,7 +28,7 @@ volumes: ...@@ -23,7 +28,7 @@ volumes:
Volume Mounts Configuration Volume Mounts Configuration
*/}} */}}
{{- define "volumeMountsConfiguration" }} {{- define "volumeMountsConfiguration" }}
{{- if or .Values.hostPathVolumes .Values.ixVolumes }} {{- if or .Values.hostPathVolumes .Values.ixVolumes .Values.emptyDirVolumes }}
volumeMounts: volumeMounts:
{{- range $index, $hostPathConfiguration := .Values.hostPathVolumes }} {{- range $index, $hostPathConfiguration := .Values.hostPathVolumes }}
- mountPath: {{ $hostPathConfiguration.mountPath }} - mountPath: {{ $hostPathConfiguration.mountPath }}
...@@ -34,5 +39,9 @@ volumeMounts: ...@@ -34,5 +39,9 @@ volumeMounts:
- mountPath: {{ $hostPathConfiguration.mountPath }} - mountPath: {{ $hostPathConfiguration.mountPath }}
name: ix-host-volume-{{ $.Release.Name }}-{{ $hostPathConfiguration.datasetName }} name: ix-host-volume-{{ $.Release.Name }}-{{ $hostPathConfiguration.datasetName }}
{{- end }} {{- end }}
{{- range $index, $emptyDirConfiguration := .Values.emptyDirVolumes }}
- mountPath: {{ $emptyDirConfiguration.mountPath }}
name: ix-emptydir-volume-{{ $.Release.Name }}-{{ $index }}
{{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}
...@@ -27,6 +27,7 @@ dnsConfig: ...@@ -27,6 +27,7 @@ dnsConfig:
# Storage related configuration # Storage related configuration
hostPathVolumes: [] hostPathVolumes: []
volumes: [] volumes: []
emptyDirVolumes: []
# Probes # Probes
# Liveness Probe # Liveness Probe
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment