{%- if cookiecutter.include_volume == "many" %}
{% raw %}
{{- $builtinVolumes := include "{% endraw %}{{ cookiecutter.template_base_name }}{% raw %}.builtinVolumes" . | fromYaml }}
{{- $allVolumes := mustMergeOverwrite (dict) $builtinVolumes .Values.volumes }}

{{- range $name, $options := $allVolumes }}{% endraw %}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  creationTimestamp: null
  labels:
    {{ "{{-" }} include "{{ cookiecutter.template_base_name }}.labels" $ | nindent 4 {{ "}}" }}
    io.kompose.service: {% raw %}{{ $name | quote }}{% endraw %}
  name: {% raw %}{{ $name | quote }}{% endraw %}
  {%- raw %}
  {{- if or (not (hasKey $options "keep")) (eq (coalesce $options.keep false) true) }}
  annotations:
    "helm.sh/resource-policy": keep
  {{- end }}
  {%- endraw %}
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: {% raw %}{{ $options.storage | default "1Gi" | quote }}{% endraw %}
  {%- raw %}
  {{- if $options.volumeName }}
  volumeName: {{ $options.volumeName | quote }}
  storageClassName: ""
  {{- end }}
  {%- endraw %}
status: {}
...
{% raw %}{{- end }}{% endraw %}
{%- endif %}