Akansha Dua | 3fb95ef | 2019-09-04 11:47:43 +0000 | [diff] [blame] | 1 | {{/* |
Sylvain Desbureaux | b7ed2ee | 2019-11-29 11:35:13 +0100 | [diff] [blame] | 2 | # Copyright © 2019 Amdocs, Bell Canada, Orange |
Akansha Dua | 3fb95ef | 2019-09-04 11:47:43 +0000 | [diff] [blame] | 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | */}} |
| 16 | {{- if .Values.backup.enabled }} |
| 17 | {{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}} |
Sylvain Desbureaux | b7ed2ee | 2019-11-29 11:35:13 +0100 | [diff] [blame] | 18 | --- |
Akansha Dua | 3fb95ef | 2019-09-04 11:47:43 +0000 | [diff] [blame] | 19 | kind: PersistentVolumeClaim |
| 20 | apiVersion: v1 |
| 21 | metadata: |
Sylvain Desbureaux | b7ed2ee | 2019-11-29 11:35:13 +0100 | [diff] [blame] | 22 | name: {{ include "common.fullname" . }}-backup-data |
Akansha Dua | 3fb95ef | 2019-09-04 11:47:43 +0000 | [diff] [blame] | 23 | namespace: {{ include "common.namespace" . }} |
| 24 | labels: |
| 25 | app: {{ include "common.name" . }}-backup |
| 26 | chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame^] | 27 | release: "{{ include "common.release" . }}" |
Akansha Dua | 3fb95ef | 2019-09-04 11:47:43 +0000 | [diff] [blame] | 28 | heritage: "{{ .Release.Service }}" |
| 29 | {{- if .Values.persistence.annotations }} |
| 30 | annotations: |
| 31 | {{ toYaml .Values.persistence.annotations | indent 4 }} |
| 32 | {{- end }} |
| 33 | spec: |
Akansha Dua | 3fb95ef | 2019-09-04 11:47:43 +0000 | [diff] [blame] | 34 | accessModes: |
| 35 | - {{ .Values.persistence.accessMode }} |
| 36 | resources: |
| 37 | requests: |
| 38 | storage: {{ .Values.persistence.size }} |
Sylvain Desbureaux | b7ed2ee | 2019-11-29 11:35:13 +0100 | [diff] [blame] | 39 | {{- if eq "True" (include "common.needPV" .) -}} |
| 40 | storageClassName: "{{ include "common.fullname" . }}-data-backup" |
Akansha Dua | 3fb95ef | 2019-09-04 11:47:43 +0000 | [diff] [blame] | 41 | {{- else }} |
Sylvain Desbureaux | b7ed2ee | 2019-11-29 11:35:13 +0100 | [diff] [blame] | 42 | storageClassName: {{ include "common.storageClass" . }} |
Akansha Dua | 3fb95ef | 2019-09-04 11:47:43 +0000 | [diff] [blame] | 43 | {{- end -}} |
| 44 | {{- end -}} |
Sylvain Desbureaux | b7ed2ee | 2019-11-29 11:35:13 +0100 | [diff] [blame] | 45 | {{- end -}} |