29 lines
839 B
YAML
29 lines
839 B
YAML
{{- if or
|
|
.Values.commons.persistence.hostPath.enabled
|
|
}}
|
|
{{- range $name, $config := .Values.persistence }}
|
|
{{- $pvcName := printf "%s-hr-%s" $.Release.Name $config.pvc }}
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolume
|
|
metadata:
|
|
name: {{ $.Release.Namespace }}-{{ $pvcName }}
|
|
spec:
|
|
claimRef:
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
namespace: {{ $.Release.Namespace }}
|
|
name: {{ $pvcName }}
|
|
storageClassName: {{ $.Values.commons.persistence.storageClass }}
|
|
accessModes:
|
|
- "ReadWriteOnce"
|
|
capacity:
|
|
storage: "{{ $config.size }}"
|
|
{{- with $.Values.commons.persistence.hostPath }}
|
|
{{- if .enabled }}
|
|
hostPath:
|
|
path: {{ printf "%s/nextcloud/%s" .prefix $name }}
|
|
{{- end }}{{/* end-if .enabled */}}
|
|
{{- end }}{{/* end-with .hostPath */}}
|
|
{{- end }}{{/* end-range */}}
|
|
{{- end }}{{/* end-if */}}
|