create a way of not mounting volumes (#650)
* create a way of not mounting volumes * fix mistake * also noMount for statefull sets
This commit is contained in:
@@ -18,4 +18,4 @@ maintainers:
|
||||
name: common
|
||||
sources:
|
||||
type: library
|
||||
version: 6.4.6
|
||||
version: 6.5.0
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{{/* Volumes included by the controller */}}
|
||||
{{- define "common.controller.volumeMounts" -}}
|
||||
{{- range $index, $item := .Values.persistence }}
|
||||
{{- if not $item.noMount }}
|
||||
{{- $mountPath := (printf "/%v" $index) -}}
|
||||
{{- if eq "hostPath" (default "pvc" $item.type) -}}
|
||||
{{- $mountPath = $item.hostPath -}}
|
||||
@@ -19,15 +20,19 @@
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if eq .Values.controller.type "statefulset" }}
|
||||
{{- range $index, $vct := .Values.volumeClaimTemplates }}
|
||||
{{- if not $vct.noMount }}
|
||||
- mountPath: {{ $vct.mountPath }}
|
||||
name: {{ $vct.name }}
|
||||
{{- if $vct.subPath }}
|
||||
subPath: {{ $vct.subPath }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user