{{ if .Values.gitGC.logging.persistence.enabled -}}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: {{ .Release.Name }}-git-gc-logs-pvc
  labels:
    app.kubernetes.io/component: git-gc
    app.kubernetes.io/instance: {{ .Release.Name }}
    chart: {{ template "gerrit.chart" . }}
    heritage: {{ .Release.Service }}
    release: {{ .Release.Name }}
    {{- if .Values.additionalLabels }}
{{ toYaml .Values.additionalLabels  | indent 4 }}
    {{- end }}
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: {{ .Values.gitGC.logging.persistence.size }}
  storageClassName: {{ .Values.storageClasses.default.name }}
{{- end }}
