summaryrefslogtreecommitdiffstats
path: root/kubernetes/clamp/charts/mariadb/templates/pv.yaml
diff options
context:
space:
mode:
authorBorislav Glozman <Borislav.Glozman@amdocs.com>2019-12-11 14:08:59 +0000
committerGerrit Code Review <gerrit@onap.org>2019-12-11 14:08:59 +0000
commit6803a3e1883d627eb72a14c4a51f6cee1aaf5656 (patch)
tree8ddd92635a3e522ce71d1df300d1d7b2b3e8f4cb /kubernetes/clamp/charts/mariadb/templates/pv.yaml
parent9d390192fce4824a1b393ab4252ba95307c10a2b (diff)
parent3a9a9788bad00f13fc17056a456ef0cbe9a5d7a4 (diff)
Merge "[CLAMP] Use global storage templates for PVC"
Diffstat (limited to 'kubernetes/clamp/charts/mariadb/templates/pv.yaml')
-rw-r--r--kubernetes/clamp/charts/mariadb/templates/pv.yaml5
1 files changed, 4 insertions, 1 deletions
diff --git a/kubernetes/clamp/charts/mariadb/templates/pv.yaml b/kubernetes/clamp/charts/mariadb/templates/pv.yaml
index 252ca76599..d166900c6f 100644
--- a/kubernetes/clamp/charts/mariadb/templates/pv.yaml
+++ b/kubernetes/clamp/charts/mariadb/templates/pv.yaml
@@ -16,10 +16,11 @@
*/}}
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+{{- if eq "True" (include "common.needPV" .) -}}
kind: PersistentVolume
apiVersion: v1
metadata:
- name: {{ include "common.fullname" . }}
+ name: {{ include "common.fullname" . }}-data
namespace: {{ include "common.namespace" . }}
labels:
app: {{ include "common.name" . }}
@@ -32,7 +33,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 -}}