{{- if .Values.explore.enabled }}
{{- if and .Values.explore.companion.enabled .Values.explore.companion.persistence.enabled }}
{{- if not .Values.explore.companion.persistence.existentPvc.enabled }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: {{ template "cmem.name-explore" . }}-companion
  namespace: {{ .Release.Namespace }}
  labels:
    {{- include "cmem.labels-explore" . | nindent 4 }}
spec:
  storageClassName: {{ .Values.explore.companion.persistence.storageClassName }}
  resources:
    requests:
      storage: {{ .Values.explore.companion.persistence.storageSize }}
  accessModes:
    - ReadWriteOnce
{{- end }}
{{- end }}

{{- if .Values.graphinsights.enabled }}
{{- if .Values.graphinsights.explore.persistence.enabled }}
{{- if not .Values.graphinsights.explore.persistence.existentPvc.enabled }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: {{ template "cmem.name-explore" . }}-graphinsights
  namespace: {{ .Release.Namespace }}
  labels:
    {{- include "cmem.labels-explore" . | nindent 4 }}
spec:
  storageClassName: {{ .Values.graphinsights.explore.persistence.storageClassName }}
  resources:
    requests:
      storage: {{ .Values.graphinsights.explore.persistence.storageSize }}
  accessModes:
    - ReadWriteOnce
{{- end }}
{{- end }}
{{- end }}
{{- end }}
