X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fappc%2Ftemplates%2Fpv.yaml;h=955285b73d05c03e25e6577963264f3f629d9164;hb=525447ad64582c9d8a94542cc32e89c9986d864d;hp=25257eaeaf01d25c4ca1399520f05bb55b745943;hpb=b5918e8caf918e1348cb0a2a9cc91f79b8732d78;p=oom.git diff --git a/kubernetes/appc/templates/pv.yaml b/kubernetes/appc/templates/pv.yaml index 25257eaeaf..955285b73d 100644 --- a/kubernetes/appc/templates/pv.yaml +++ b/kubernetes/appc/templates/pv.yaml @@ -15,11 +15,12 @@ */}} {{- $global := . }} {{- if and $global.Values.persistence.enabled (not $global.Values.persistence.existingClaim) -}} +{{- if eq "True" (include "common.needPV" .) -}} {{- range $i, $t := until (int $global.Values.replicaCount)}} kind: PersistentVolume apiVersion: v1 metadata: - name: {{ include "common.fullname" $global }}-data{{$i}} + name: {{ include "common.fullname" $global }}-data-{{$i}} namespace: {{ include "common.namespace" $global }} labels: app: {{ include "common.fullname" $global }} @@ -36,6 +37,9 @@ spec: persistentVolumeReclaimPolicy: {{ $global.Values.persistence.volumeReclaimPolicy }} hostPath: path: {{ $global.Values.global.persistence.mountPath | default $global.Values.persistence.mountPath }}/{{ $global.Release.Name }}/{{ $global.Values.persistence.mountSubPath }}{{$i}} +{{if ne $i (int $global.Values.replicaCount) }} --- {{- end -}} {{- end -}} +{{- end -}} +{{- end -}}