2 # Copyright © 2018 AT&T, Amdocs, Bell Canada Intellectual Property. All rights reserved.
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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
17 {{ if .Values.persistence.enabled }}
19 {{ range $i, $e := until (atoi (quote $root.Values.replicaCount) | default 3) }}
22 kind: PersistentVolume
24 name: {{ $root.Release.Name }}-{{ $root.Values.service.name }}-{{ $i }}
25 namespace: {{ $root.Release.Namespace }}
27 type: {{ $root.Values.persistence.storageType }}
28 app: {{ $root.Values.service.name }}
29 chart: {{ $root.Chart.Name }}-{{ $root.Chart.Version | replace "+" "_" }}
30 release: {{ $root.Release.Name }}
31 heritage: {{ $root.Release.Service }}
34 storage: {{ $root.Values.persistence.size }}
36 - {{ $root.Values.persistence.accessMode }}
38 path: {{ $root.Values.persistence.mountPath }}/{{ $root.Release.Name }}/{{ $root.Values.persistence.mountSubPath }}-{{$i}}
39 persistentVolumeReclaimPolicy: {{ $root.Values.persistence.volumeReclaimPolicy }}
41 preferredDuringSchedulingIgnoredDuringExecution:
49 - "{{ $root.Chart.Name }}"
50 topologyKey: kubernetes.io/hostname