{{- if .Values.mongodb.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: {{ index .Values.mongodb.persistence.existingClaim }}
  namespace: {{ .Release.Namespace }}
  annotations:
    helm.sh/resource-policy: keep
spec:
  accessModes: {{ .Values.mongodb.persistence.accessModes }}
  resources:
    requests:
      storage: {{ index .Values.mongodb.persistence.size }}
  storageClassName: {{ index .Values.mongodb.persistence.storageClass }}
{{- end }}
