BorislavG | 3c751b3 | 2018-03-26 21:13:34 +0300 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright © 2017 Amdocs, AT&T, Bell Canada |
| 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 and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}} |
| 17 | kind: PersistentVolume |
| 18 | apiVersion: v1 |
| 19 | metadata: |
| 20 | name: {{ include "common.fullname" . }}0 |
| 21 | namespace: {{ include "common.namespace" . }} |
| 22 | labels: |
| 23 | app: {{ include "common.name" . }} |
| 24 | chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" |
| 25 | release: "{{ .Release.Name }}" |
| 26 | heritage: "{{ .Release.Service }}" |
| 27 | name: {{ include "common.fullname" . }} |
| 28 | spec: |
| 29 | storageClassName: manual |
| 30 | capacity: |
| 31 | storage: {{ .Values.persistence.size }} |
| 32 | accessModes: |
| 33 | - {{ .Values.persistence.accessMode }} |
| 34 | persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} |
| 35 | hostPath: |
| 36 | path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}0 |
| 37 | --- |
| 38 | kind: PersistentVolume |
| 39 | apiVersion: v1 |
| 40 | metadata: |
| 41 | name: {{ include "common.fullname" . }}1 |
| 42 | namespace: {{ include "common.namespace" . }} |
| 43 | labels: |
| 44 | app: {{ include "common.name" . }} |
| 45 | chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" |
| 46 | release: "{{ .Release.Name }}" |
| 47 | heritage: "{{ .Release.Service }}" |
| 48 | name: {{ include "common.fullname" . }} |
| 49 | spec: |
| 50 | storageClassName: manual |
| 51 | capacity: |
| 52 | storage: {{ .Values.persistence.size }} |
| 53 | accessModes: |
| 54 | - {{ .Values.persistence.accessMode }} |
| 55 | persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} |
| 56 | hostPath: |
| 57 | path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}1 |
| 58 | --- |
| 59 | kind: PersistentVolume |
| 60 | apiVersion: v1 |
| 61 | metadata: |
| 62 | name: {{ include "common.fullname" . }}2 |
| 63 | namespace: {{ include "common.namespace" . }} |
| 64 | labels: |
| 65 | app: {{ include "common.name" . }} |
| 66 | chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" |
| 67 | release: "{{ .Release.Name }}" |
| 68 | heritage: "{{ .Release.Service }}" |
| 69 | name: {{ include "common.fullname" . }} |
| 70 | spec: |
| 71 | storageClassName: manual |
| 72 | capacity: |
| 73 | storage: {{ .Values.persistence.size }} |
| 74 | accessModes: |
| 75 | - {{ .Values.persistence.accessMode }} |
| 76 | persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} |
| 77 | hostPath: |
| 78 | path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}2 |
| 79 | --- |
| 80 | kind: PersistentVolume |
| 81 | apiVersion: v1 |
| 82 | metadata: |
| 83 | name: {{ include "common.fullname" . }}3 |
| 84 | namespace: {{ include "common.namespace" . }} |
| 85 | labels: |
| 86 | app: {{ include "common.name" . }} |
| 87 | chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" |
| 88 | release: "{{ .Release.Name }}" |
| 89 | heritage: "{{ .Release.Service }}" |
| 90 | name: {{ include "common.fullname" . }} |
| 91 | spec: |
| 92 | storageClassName: manual |
| 93 | capacity: |
| 94 | storage: {{ .Values.persistence.size }} |
| 95 | accessModes: |
| 96 | - {{ .Values.persistence.accessMode }} |
| 97 | persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} |
| 98 | hostPath: |
| 99 | path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}3 |
| 100 | --- |
| 101 | kind: PersistentVolume |
| 102 | apiVersion: v1 |
| 103 | metadata: |
| 104 | name: {{ include "common.fullname" . }}4 |
| 105 | namespace: {{ include "common.namespace" . }} |
| 106 | labels: |
| 107 | app: {{ include "common.name" . }} |
| 108 | chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" |
| 109 | release: "{{ .Release.Name }}" |
| 110 | heritage: "{{ .Release.Service }}" |
| 111 | name: {{ include "common.fullname" . }} |
| 112 | spec: |
| 113 | storageClassName: manual |
| 114 | capacity: |
| 115 | storage: {{ .Values.persistence.size }} |
| 116 | accessModes: |
| 117 | - {{ .Values.persistence.accessMode }} |
| 118 | persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} |
| 119 | hostPath: |
| 120 | path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}4 |
| 121 | --- |
| 122 | kind: PersistentVolume |
| 123 | apiVersion: v1 |
| 124 | metadata: |
| 125 | name: {{ include "common.fullname" . }}5 |
| 126 | namespace: {{ include "common.namespace" . }} |
| 127 | labels: |
| 128 | app: {{ include "common.name" . }} |
| 129 | chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" |
| 130 | release: "{{ .Release.Name }}" |
| 131 | heritage: "{{ .Release.Service }}" |
| 132 | name: {{ include "common.fullname" . }} |
| 133 | spec: |
| 134 | storageClassName: manual |
| 135 | capacity: |
| 136 | storage: {{ .Values.persistence.size }} |
| 137 | accessModes: |
| 138 | - {{ .Values.persistence.accessMode }} |
| 139 | persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} |
| 140 | hostPath: |
| 141 | path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}5 |
| 142 | --- |
| 143 | kind: PersistentVolume |
| 144 | apiVersion: v1 |
| 145 | metadata: |
| 146 | name: {{ include "common.fullname" . }}6 |
| 147 | namespace: {{ include "common.namespace" . }} |
| 148 | labels: |
| 149 | app: {{ include "common.name" . }} |
| 150 | chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" |
| 151 | release: "{{ .Release.Name }}" |
| 152 | heritage: "{{ .Release.Service }}" |
| 153 | name: {{ include "common.fullname" . }} |
| 154 | spec: |
| 155 | storageClassName: manual |
| 156 | capacity: |
| 157 | storage: {{ .Values.persistence.size }} |
| 158 | accessModes: |
| 159 | - {{ .Values.persistence.accessMode }} |
| 160 | persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} |
| 161 | hostPath: |
| 162 | path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}6 |
| 163 | --- |
| 164 | kind: PersistentVolume |
| 165 | apiVersion: v1 |
| 166 | metadata: |
| 167 | name: {{ include "common.fullname" . }}7 |
| 168 | namespace: {{ include "common.namespace" . }} |
| 169 | labels: |
| 170 | app: {{ include "common.name" . }} |
| 171 | chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" |
| 172 | release: "{{ .Release.Name }}" |
| 173 | heritage: "{{ .Release.Service }}" |
| 174 | name: {{ include "common.fullname" . }} |
| 175 | spec: |
| 176 | storageClassName: manual |
| 177 | capacity: |
| 178 | storage: {{ .Values.persistence.size }} |
| 179 | accessModes: |
| 180 | - {{ .Values.persistence.accessMode }} |
| 181 | persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} |
| 182 | hostPath: |
| 183 | path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}7 |
| 184 | --- |
| 185 | kind: PersistentVolume |
| 186 | apiVersion: v1 |
| 187 | metadata: |
| 188 | name: {{ include "common.fullname" . }}8 |
| 189 | namespace: {{ include "common.namespace" . }} |
| 190 | labels: |
| 191 | app: {{ include "common.name" . }} |
| 192 | chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" |
| 193 | release: "{{ .Release.Name }}" |
| 194 | heritage: "{{ .Release.Service }}" |
| 195 | name: {{ include "common.fullname" . }} |
| 196 | spec: |
| 197 | storageClassName: manual |
| 198 | capacity: |
| 199 | storage: {{ .Values.persistence.size }} |
| 200 | accessModes: |
| 201 | - {{ .Values.persistence.accessMode }} |
| 202 | persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} |
| 203 | hostPath: |
| 204 | path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}8 |
| 205 | --- |
| 206 | kind: PersistentVolume |
| 207 | apiVersion: v1 |
| 208 | metadata: |
| 209 | name: {{ include "common.fullname" . }}9 |
| 210 | namespace: {{ include "common.namespace" . }} |
| 211 | labels: |
| 212 | app: {{ include "common.name" . }} |
| 213 | chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" |
| 214 | release: "{{ .Release.Name }}" |
| 215 | heritage: "{{ .Release.Service }}" |
| 216 | name: {{ include "common.fullname" . }} |
| 217 | spec: |
| 218 | storageClassName: manual |
| 219 | capacity: |
| 220 | storage: {{ .Values.persistence.size }} |
| 221 | accessModes: |
| 222 | - {{ .Values.persistence.accessMode }} |
| 223 | persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} |
| 224 | hostPath: |
| 225 | path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Namespace }}/{{ .Values.persistence.mountSubPath }}9 |
| 226 | |
| 227 | {{- end -}} |