Browse Source

Fix whitespace issues for volume rendering

Waqar Ahmed 4 years ago
parent
commit
9c13001a5a
1 changed files with 25 additions and 25 deletions
  1. 25 25
      library/common/2101.0.0/templates/lib/storage/_appStorage.tpl

+ 25 - 25
library/common/2101.0.0/templates/lib/storage/_appStorage.tpl

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