diff options
author | Mike Elliott <mike.elliott@amdocs.com> | 2018-10-11 01:03:11 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-10-11 01:03:11 +0000 |
commit | 05a2d5bcc85a555693688304d240512dfa0f1dba (patch) | |
tree | 705fabc566cb04b7acde35a9d203e0612e967448 /kubernetes/aaf/templates/pv.yaml | |
parent | fb2b4f3fdfbbe3e792f899f5a7a5ca4a91556890 (diff) | |
parent | 6dcc80d4de60b8de810216f8ed8b66e8b496e1c3 (diff) |
Merge "refactor AAF casablanca charts"
Diffstat (limited to 'kubernetes/aaf/templates/pv.yaml')
-rw-r--r-- | kubernetes/aaf/templates/pv.yaml | 52 |
1 files changed, 44 insertions, 8 deletions
diff --git a/kubernetes/aaf/templates/pv.yaml b/kubernetes/aaf/templates/pv.yaml index d9b58f62ad..9d28184985 100644 --- a/kubernetes/aaf/templates/pv.yaml +++ b/kubernetes/aaf/templates/pv.yaml @@ -14,24 +14,60 @@ # limitations under the License. */}} -{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} +{{- if and .Values.global.persistence.enabled (not .Values.persistence.config.existingClaim) }} kind: PersistentVolume apiVersion: v1 metadata: - name: {{ include "common.fullname" . }} + name: {{ .Release.Name }}-config namespace: {{ include "common.namespace" . }} labels: - app: {{ include "common.name" . }} + app: {{ include "common.name" . }}-config chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" name: {{ include "common.fullname" . }} spec: capacity: - storage: {{ .Values.persistence.size}} + storage: {{ .Values.persistence.config.size}} accessModes: - - {{ .Values.persistence.accessMode }} - persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} + - {{ .Values.persistence.config.accessMode }} + persistentVolumeReclaimPolicy: {{ .Values.persistence.config.volumeReclaimPolicy }} hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} -{{- end -}} + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.config.mountSubPath }} +{{- if .Values.persistence.config.storageClass }} +{{- if (eq "-" .Values.persistence.config.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.config.storageClass }}" +{{- end }} +{{- end }} +{{- end }} +--- +{{- if and .Values.global.persistence.enabled (not .Values.persistence.logs.existingClaim) }} +kind: PersistentVolume +apiVersion: v1 +metadata: + name: {{ .Release.Name }}-logs + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }}-logs + chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" + name: {{ include "common.fullname" . }} +spec: + capacity: + storage: {{ .Values.persistence.logs.size}} + accessModes: + - {{ .Values.persistence.logs.accessMode }} + persistentVolumeReclaimPolicy: {{ .Values.persistence.logs.volumeReclaimPolicy }} + hostPath: + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.logs.mountSubPath }} +{{- if .Values.persistence.logs.storageClass }} +{{- if (eq "-" .Values.persistence.logs.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.logs.storageClass }}" +{{- end }} +{{- end }} +{{- end }}
\ No newline at end of file |