Commit 9c13001a authored by Waqar Ahmed's avatar Waqar Ahmed

Fix whitespace issues for volume rendering

parent 8f1d1e84
...@@ -4,20 +4,20 @@ Define appVolumeMounts for container ...@@ -4,20 +4,20 @@ Define appVolumeMounts for container
{{- define "common.storage.configureAppVolumeMountsInContainer" -}} {{- define "common.storage.configureAppVolumeMountsInContainer" -}}
{{- include "common.schema.validateKeys" (dict "values" . "checkKeys" (list "appVolumeMounts")) -}} {{- include "common.schema.validateKeys" (dict "values" . "checkKeys" (list "appVolumeMounts")) -}}
{{- $appVolumeMounts := .appVolumeMounts -}} {{- $appVolumeMounts := .appVolumeMounts -}}
{{- if $appVolumeMounts }} {{- if $appVolumeMounts -}}
{{- range $name, $avm := $appVolumeMounts -}} {{ range $name, $avm := $appVolumeMounts }}
{{- if (default true $avm.enabled) }} {{- if (default true $avm.enabled) -}}
{{- if $avm.containerNameOverride -}} {{ if $avm.containerNameOverride }}
{{- $name = $avm.containerNameOverride -}} {{ $name = $avm.containerNameOverride }}
{{- end -}} {{ end }}
- name: {{ $name }} - name: {{ $name }}
mountPath: {{ $avm.mountPath }} mountPath: {{ $avm.mountPath }}
{{- if $avm.subPath }} {{ if $avm.subPath }}
subPath: {{ $avm.subPath }} subPath: {{ $avm.subPath }}
{{- end }} {{ end }}
{{- end }} {{- end -}}
{{- end }} {{ end }}
{{- end }} {{- end -}}
{{- end -}} {{- end -}}
...@@ -26,27 +26,27 @@ Define hostPath for appVolumes ...@@ -26,27 +26,27 @@ Define hostPath for appVolumes
*/}} */}}
{{- define "common.storage.configureAppVolumes" -}} {{- define "common.storage.configureAppVolumes" -}}
{{- include "common.schema.validateKeys" (dict "values" . "checkKeys" (list "appVolumeMounts")) -}} {{- include "common.schema.validateKeys" (dict "values" . "checkKeys" (list "appVolumeMounts")) -}}
{{- $appVolumeMounts := .appVolumeMounts -}} {{- $values := . -}}
{{- if $appVolumeMounts }} {{- if $values.appVolumeMounts -}}
{{- range $name, $av := $appVolumeMounts -}} {{- range $name, $av := $values.appVolumeMounts -}}
{{- if (default true $av.enabled) }} {{ if (default true $av.enabled) }}
- name: {{ $name }} - name: {{ $name }}
{{- if or $av.emptyDir $.emptyDirVolumes }} {{ if or $av.emptyDir $.emptyDirVolumes }}
emptyDir: {} emptyDir: {}
{{- else }} {{- else -}}
hostPath: hostPath:
{{ if $av.hostPathEnabled }} {{ if $av.hostPathEnabled }}
path: {{ required "hostPath not set" $av.hostPath }} path: {{ required "hostPath not set" $av.hostPath }}
{{- else }} {{ else }}
{{- include "common.schema.validateKeys" (dict "values" . "checkKeys" (list "ixVolumes")) -}} {{- include "common.schema.validateKeys" (dict "values" $values "checkKeys" (list "ixVolumes")) -}}
{{- include "common.schema.validateKeys" (dict "values" $av "checkKeys" (list "datasetName")) -}} {{- include "common.schema.validateKeys" (dict "values" $av "checkKeys" (list "datasetName")) -}}
{{- $volDict := dict "datasetName" $av.datasetName "ixVolumes" $.ixVolumes -}} {{- $volDict := dict "datasetName" $av.datasetName "ixVolumes" $values.ixVolumes -}}
path: {{ include "common.storage.retrieveHostPathFromiXVolume" $volDict }} path: {{ include "common.storage.retrieveHostPathFromiXVolume" $volDict }}
{{- end }} {{ end }}
{{- end }} {{ end }}
{{- end }} {{ end }}
{{- end }} {{- end -}}
{{- end }} {{- end -}}
{{- end -}} {{- end -}}
......
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