From a1f93014d079919c82738157bf539a5d7b91274a Mon Sep 17 00:00:00 2001 From: Sylvain Desbureaux Date: Mon, 9 Dec 2019 11:43:47 +0100 Subject: [Multicloud] 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 Change-Id: I8ed04b153aec0b81971a7a1eb97737d905ea4c5c Issue-ID: OOM-1227 Signed-off-by: Sylvain Desbureaux --- .../multicloud/charts/multicloud-prometheus/templates/pv.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'kubernetes/multicloud/charts/multicloud-prometheus/templates/pv.yaml') diff --git a/kubernetes/multicloud/charts/multicloud-prometheus/templates/pv.yaml b/kubernetes/multicloud/charts/multicloud-prometheus/templates/pv.yaml index 961b6bba63..6a75441843 100644 --- a/kubernetes/multicloud/charts/multicloud-prometheus/templates/pv.yaml +++ b/kubernetes/multicloud/charts/multicloud-prometheus/templates/pv.yaml @@ -15,8 +15,8 @@ */}} {{- if .Values.global.prometheus.enabled -}} - {{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}} +{{- if eq "True" (include "common.needPV" .) -}} kind: PersistentVolume apiVersion: v1 metadata: @@ -33,9 +33,10 @@ 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 -}} \ No newline at end of file +{{- end -}} +{{- end -}} -- cgit