{{- if .Values.trivy.persistence.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: {{ include "chart.resourceNamePrefix" . }}trivy
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: {{ .Values.trivy.persistence.size | quote }}
  {{- if .Values.trivy.persistence.storageClassName }}
  storageClassName: {{ .Values.trivy.persistence.storageClassName }}
  {{- end -}}
{{- end -}}
