diff options
author | Sylvain Desbureaux <sylvain.desbureaux@orange.com> | 2019-11-29 09:25:04 +0100 |
---|---|---|
committer | Sylvain Desbureaux <sylvain.desbureaux@orange.com> | 2019-11-29 13:14:48 +0100 |
commit | f8e163f50771a4681217614ad538ee13280f006b (patch) | |
tree | 436eb4179514f297c39a09bc6283e26f96d2e1cc /kubernetes/cds/charts/cds-blueprints-processor/templates/pv.yaml | |
parent | 9b0adea0769b026875ee312d223960c559c700bb (diff) |
[CDS] 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: I9ffc9f121fb68993dd7bf96d4909913c3aaa09c3
Issue-ID: OOM-1227
Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
Diffstat (limited to 'kubernetes/cds/charts/cds-blueprints-processor/templates/pv.yaml')
-rwxr-xr-x | kubernetes/cds/charts/cds-blueprints-processor/templates/pv.yaml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kubernetes/cds/charts/cds-blueprints-processor/templates/pv.yaml b/kubernetes/cds/charts/cds-blueprints-processor/templates/pv.yaml index 812108760b..a4bf83ed96 100755 --- a/kubernetes/cds/charts/cds-blueprints-processor/templates/pv.yaml +++ b/kubernetes/cds/charts/cds-blueprints-processor/templates/pv.yaml @@ -15,6 +15,7 @@ */}} {{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}} +{{- if eq "True" (include "common.needPV" .) -}} {{- if not .Values.persistence.storageClass -}} kind: PersistentVolume apiVersion: v1 @@ -33,7 +34,9 @@ spec: accessModes: - {{ .Values.persistence.accessMode }} persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} + storageClassName: "{{ include "common.fullname" . }}-data" 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 -}} |