diff options
author | Krzysztof Opasiak <k.opasiak@samsung.com> | 2020-12-04 21:32:13 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-12-04 21:32:13 +0000 |
commit | 402744dfb6a0c0b1de43614c9919d513a24ee729 (patch) | |
tree | 8963db637c5f2276a922d2f611eb8c6a1daae08e /kubernetes/common/music/components/music-cassandra/templates/pv.yaml | |
parent | 305d69a99c70feab066bdf216b02897fa4192711 (diff) | |
parent | 589ecb93f9cd18bd42349243214e965f193c6286 (diff) |
Merge "[COMMON][MUSIC] Uses new tpls for repos / images"
Diffstat (limited to 'kubernetes/common/music/components/music-cassandra/templates/pv.yaml')
-rw-r--r-- | kubernetes/common/music/components/music-cassandra/templates/pv.yaml | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/kubernetes/common/music/components/music-cassandra/templates/pv.yaml b/kubernetes/common/music/components/music-cassandra/templates/pv.yaml new file mode 100644 index 0000000000..8399bff77d --- /dev/null +++ b/kubernetes/common/music/components/music-cassandra/templates/pv.yaml @@ -0,0 +1,46 @@ +{{/* +# Copyright © 2018 AT&T, Amdocs, Bell Canada Intellectual Property. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +*/}} + +{{- $global := . }} +{{- if and $global.Values.persistence.enabled (not $global.Values.persistence.existingClaim) }} +{{- if eq "True" (include "common.needPV" .) -}} +{{- range $i := until (int $global.Values.replicaCount)}} +kind: PersistentVolume +apiVersion: v1 +metadata: + name: {{ include "common.fullname" $global }}-data-{{ $i }} + namespace: {{ include "common.namespace" $global }} + labels: + app: {{ include "common.fullname" $global }} + chart: "{{ $global.Chart.Name }}-{{ $global.Chart.Version | replace "+" "_" }}" + release: "{{ include "common.release" $global }}" + heritage: "{{ $global.Release.Service }}" + name: {{ include "common.fullname" $global }} +spec: + capacity: + storage: {{ $global.Values.persistence.size}} + accessModes: + - {{ $global.Values.persistence.accessMode }} + persistentVolumeReclaimPolicy: {{ $global.Values.persistence.volumeReclaimPolicy }} + storageClassName: "{{ include "common.fullname" $global }}-data" + hostPath: + path: {{ $global.Values.global.persistence.mountPath | default $global.Values.persistence.mountPath }}/{{ include "common.release" $global }}/{{ $global.Values.persistence.mountSubPath }}-{{$i}} +{{if ne $i (int $global.Values.replicaCount) }} +--- +{{- end -}} +{{- end -}} +{{- end -}} +{{- end -}} |