{{- if and .Values.persistence.enabled ( not .Values.useStatefulSet) }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: {{ include "appsmith.fullname" . }}
  namespace: {{ include "appsmith.namespace" . }}
spec:
  accessModes:
  {{- range .Values.persistence.accessModes }}
    - {{ . | quote }}
  {{- end }}
  resources:
    requests:
      storage: {{ .Values.persistence.size | quote }}
  {{ include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) }}
{{- end }}