{{- if and .Values.persistence.connector.enabled (not .Values.persistence.connector.existingClaim)}}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: {{ include "danswer-stack.fullname" . }}-connector
  labels:
    {{- include "danswer-stack.labels" . | nindent 4 }}
spec:
  accessModes:
    {{- range .Values.persistence.connector.accessModes }}
    - {{ . | quote }}
    {{- end }}
  resources:
    requests:
      storage: {{ .Values.persistence.connector.size | quote }}
  {{- with .Values.persistence.connector.storageClassName }}
  storageClassName: {{ . }}
  {{- end }}
{{- end }}