aboutsummaryrefslogtreecommitdiffstats
path: root/templates/pvc.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/pvc.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/pvc.yaml')
-rw-r--r--templates/pvc.yaml11
1 files changed, 1 insertions, 10 deletions
diff --git a/templates/pvc.yaml b/templates/pvc.yaml
index e27c331..e21babb 100644
--- a/templates/pvc.yaml
+++ b/templates/pvc.yaml
@@ -30,19 +30,10 @@ metadata:
{{ toYaml .Values.persistence.annotations | indent 4 }}
{{- end }}
spec:
- selector:
- matchLabels:
- name: {{ include "common.fullname" . }}
accessModes:
- {{ .Values.persistence.accessMode }}
+ storageClassName: {{ include "common.storageClass" . }}
resources:
requests:
storage: {{ .Values.persistence.size }}
-{{- if .Values.persistence.storageClass }}
-{{- if (eq "-" .Values.persistence.storageClass) }}
- storageClassName: ""
-{{- else }}
- storageClassName: "{{ .Values.persistence.storageClass }}"
-{{- end }}
-{{- end }}
{{- end -}}