diff options
author | Borislav Glozman <Borislav.Glozman@amdocs.com> | 2019-12-11 14:03:55 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-12-11 14:03:55 +0000 |
commit | 16b32ddfe9237ffeed3dc9f1422978ca65995e4b (patch) | |
tree | d3436df39725395f7529d90c7f19548abb75a91c /kubernetes/sdc/charts/sdc-onboarding-be | |
parent | 1f20e128c5ffe2d7996a33bb2a3d61fa923493cd (diff) | |
parent | 9c131127f3eb1fb0600a8c5835055cd65ce7be4e (diff) |
Merge "[SDC] Use global storage templates for PVC"
Diffstat (limited to 'kubernetes/sdc/charts/sdc-onboarding-be')
-rw-r--r-- | kubernetes/sdc/charts/sdc-onboarding-be/templates/pv.yaml | 7 | ||||
-rw-r--r-- | kubernetes/sdc/charts/sdc-onboarding-be/templates/pvc.yaml | 13 |
2 files changed, 7 insertions, 13 deletions
diff --git a/kubernetes/sdc/charts/sdc-onboarding-be/templates/pv.yaml b/kubernetes/sdc/charts/sdc-onboarding-be/templates/pv.yaml index b292ff9448..70f6d959ce 100644 --- a/kubernetes/sdc/charts/sdc-onboarding-be/templates/pv.yaml +++ b/kubernetes/sdc/charts/sdc-onboarding-be/templates/pv.yaml @@ -16,10 +16,11 @@ # limitations under the License. */}} {{- if and .Values.persistence.enabled (not .Values.cert.persistence.existingClaim) -}} +{{- if eq "True" (include "common.needPV" .) -}} kind: PersistentVolume apiVersion: v1 metadata: - name: {{ include "common.fullname" . }}-cert + name: {{ include "common.fullname" . }} namespace: {{ include "common.namespace" . }} labels: app: {{ include "common.name" . }} @@ -33,6 +34,8 @@ spec: accessModes: - {{ .Values.cert.persistence.accessMode }} persistentVolumeReclaimPolicy: {{ .Values.cert.persistence.volumeReclaimPolicy }} + storageClassName: "{{ include "common.fullname" . }}-data" hostPath: path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.cert.persistence.mountSubPath }} -{{- end -}}
\ No newline at end of file +{{- end -}} +{{- end -}} diff --git a/kubernetes/sdc/charts/sdc-onboarding-be/templates/pvc.yaml b/kubernetes/sdc/charts/sdc-onboarding-be/templates/pvc.yaml index eb2c372a33..662370d204 100644 --- a/kubernetes/sdc/charts/sdc-onboarding-be/templates/pvc.yaml +++ b/kubernetes/sdc/charts/sdc-onboarding-be/templates/pvc.yaml @@ -31,19 +31,10 @@ metadata: {{ toYaml .Values.cert.persistence.annotations | indent 4 }} {{- end }} spec: - selector: - matchLabels: - name: {{ include "common.fullname" . }} accessModes: - {{ .Values.cert.persistence.accessMode }} + storageClassName: {{ include "common.storageClass" . }} resources: requests: storage: {{ .Values.cert.persistence.size }} -{{- if .Values.cert.persistence.storageClass }} -{{- if (eq "-" .Values.cert.persistence.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.cert.persistence.storageClass }}" -{{- end }} -{{- end }} -{{- end -}}
\ No newline at end of file +{{- end -}} |