[ONAP-wide] Replace .Release.Name with common.release
[oom.git] / kubernetes / aaf / charts / aaf-hello / templates / aaf-hello-pvc.yaml
1 {{- if ne 0 (int .Values.global.aaf.hello.replicas) }}
2 {{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
3 #########
4 ##  ============LICENSE_START====================================================
5 ##  org.onap.aaf
6 ##  ===========================================================================
7 ##  Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
8 ##  ===========================================================================
9 ##  Licensed under the Apache License, Version 2.0 (the "License");
10 ##  you may not use this file except in compliance with the License.
11 ##  You may obtain a copy of the License at
12 ##
13 ##       http://www.apache.org/licenses/LICENSE-2.0
14 ##
15 ##  Unless required by applicable law or agreed to in writing, software
16 ##  distributed under the License is distributed on an "AS IS" BASIS,
17 ##  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 ##  See the License for the specific language governing permissions and
19 ##  limitations under the License.
20 ##  ============LICENSE_END====================================================
21 ##
22 kind: PersistentVolumeClaim
23 apiVersion: v1
24 metadata:
25   name: {{ include "common.release" . }}-aaf-hello-pvc
26   namespace: {{ include "common.namespace" . }}
27   labels:
28     app: {{ include "common.name" . }}
29     chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
30     release: "{{ include "common.release" . }}"
31     heritage: "{{ .Release.Service }}"
32 {{- if .Values.persistence.annotations }}
33   annotations:
34 {{ toYaml .Values.persistence.annotations | indent 4 }}
35 {{- end }}
36 spec:
37   accessModes:
38     - {{ .Values.persistence.config.accessMode }}
39   resources:
40     requests:
41       storage: {{ .Values.persistence.config.size }}
42   storageClassName: {{ include "common.storageClass" . }}
43 {{- end -}}
44 {{- end -}}