aboutsummaryrefslogtreecommitdiffstats
path: root/templates/pv.yaml
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2019-12-09 11:49:36 +0100
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2019-12-09 11:49:36 +0100
commita58fe83cfbf60ae058819daf7e6d942f96e603cf (patch)
tree421fac87f7636b7cc7f605e87a739d9e2328ce15 /templates/pv.yaml
parent868374dc9e41555fa9e75a0ca63deb7cd6780ab9 (diff)
Use global storage templates for PVC
OOM has now templates in order to create the needed PVC, using: * a PV with a specific class when using a common nfs mount path between nodes (sames as today use) --> is the default behavior today * or a storage class if we want to use dynamic PV. On this case, we use (in order of priority): - persistence.storageClassOverride if set on the chart - global.persistence.storageClass if set globally - persistence.storageClass if set on the chart Issue-ID: OOM-1227 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: Ie65e55bca92eb0ada674636f049ecb054b65c5da
Diffstat (limited to 'templates/pv.yaml')
-rw-r--r--templates/pv.yaml3
1 files changed, 3 insertions, 0 deletions
diff --git a/templates/pv.yaml b/templates/pv.yaml
index 184728f..63829cb 100644
--- a/templates/pv.yaml
+++ b/templates/pv.yaml
@@ -15,6 +15,7 @@
*/}}
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+{{- if eq "True" (include "common.needPV" .) -}}
kind: PersistentVolume
apiVersion: v1
metadata:
@@ -31,7 +32,9 @@ spec:
storage: {{ .Values.persistence.size}}
accessModes:
- {{ .Values.persistence.accessMode }}
+ storageClassName: "{{ include "common.fullname" . }}-data"
persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
hostPath:
path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
{{- end -}}
+{{- end -}}