X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fcommon%2Fpostgres%2Ftemplates%2Fpv-replica.yaml;h=af46f611c8f5e3a8a555638d477c1ec741c58f55;hb=refs%2Fheads%2Fmaster;hp=a98abefba04efe4a0880cf63266e3423def8a6e9;hpb=0b243b600f5c9c296189d66161a814396d648563;p=oom.git diff --git a/kubernetes/common/postgres/templates/pv-replica.yaml b/kubernetes/common/postgres/templates/pv-replica.yaml index a98abefba0..af46f611c8 100644 --- a/kubernetes/common/postgres/templates/pv-replica.yaml +++ b/kubernetes/common/postgres/templates/pv-replica.yaml @@ -13,7 +13,9 @@ # # See the License for the specific language governing permissions and # # limitations under the License. */}} +{{- if not .Values.global.postgres.useOperator }} {{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}} +{{- if include "common.needPV" . -}} kind: PersistentVolume apiVersion: v1 metadata: @@ -22,7 +24,7 @@ metadata: labels: app: {{ include "common.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" - release: "{{ .Release.Name }}" + release: "{{ include "common.release" . }}" heritage: "{{ .Release.Service }}" name: {{ include "common.fullname" . }} spec: @@ -33,5 +35,7 @@ spec: storageClassName: "{{ include "common.fullname" . }}-replica" persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}/replica -{{- end -}} + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ include "common.release" . }}/{{ .Values.persistence.mountSubPath }}/replica +{{- end }} +{{- end }} +{{- end }}