{{- /* Global shared PVC for all components */ -}}
{{- if .Values.storage.enabled -}}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: {{ include "gitdata.fullname" . }}-shared-data
  namespace: {{ include "gitdata.namespace" . }}
  labels:
    app.kubernetes.io/name: {{ include "gitdata.fullname" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
  annotations:
    helm.sh/resource-policy: keep
spec:
  accessModes:
    - {{ .Values.storage.accessMode | default "ReadWriteMany" }}
  storageClassName: {{ .Values.storage.storageClass }}
  resources:
    requests:
      storage: {{ .Values.storage.size }}
{{- end }}
