From: Borislav Glozman Date: Wed, 11 Dec 2019 14:17:17 +0000 (+0000) Subject: Merge "[CDS] Use global storage templates for PVC" X-Git-Tag: 6.0.0~487 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=b76e563c2091b311450ada9c9e702bd44f7de734;hp=2fcb342c4e8feb654e034bde46547b13f67cb589;p=oom.git Merge "[CDS] Use global storage templates for PVC" --- 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 -}} diff --git a/kubernetes/cds/charts/cds-blueprints-processor/templates/pvc.yaml b/kubernetes/cds/charts/cds-blueprints-processor/templates/pvc.yaml index 98b55716c5..601334ec44 100755 --- a/kubernetes/cds/charts/cds-blueprints-processor/templates/pvc.yaml +++ b/kubernetes/cds/charts/cds-blueprints-processor/templates/pvc.yaml @@ -30,21 +30,10 @@ metadata: {{ .Values.persistence.annotations | indent 4 }} {{- end }} spec: -{{- if not .Values.persistence.storageClass }} - selector: - matchLabels: - name: {{ include "common.fullname" . }}-blueprints -{{- end }} accessModes: - {{ .Values.persistence.accessMode }} resources: requests: storage: {{ .Values.persistence.size }} -{{- if .Values.persistence.storageClass }} -{{- if (eq "-" .Values.persistence.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.persistence.storageClass }}" -{{- end }} -{{- end }} + storageClassName: {{ include "common.storageClass" . }} {{- end -}}