{{- if and .Values.gerritReplica.pluginManagement.cache.enabled }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: {{ .Release.Name }}-plugin-cache-pvc
  labels:
    app.kubernetes.io/component: gerrit-replica
    app.kubernetes.io/instance: {{ .Release.Name }}
    chart: {{ template "gerrit-replica.chart" . }}
    heritage: {{ .Release.Service }}
    release: {{ .Release.Name }}
    {{- if .Values.additionalLabels }}
{{ toYaml .Values.additionalLabels  | indent 4 }}
    {{- end }}
spec:
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: {{ .Values.gerritReplica.pluginManagement.cache.size }}
  storageClassName: {{ .Values.storageClasses.shared.name }}
{{- end }}
