pvc.yaml 887 B

1234567891011121314151617181920212223242526272829
  1. {{- if .Values.persistence.enabled }}
  2. {{- if not .Values.persistence.existingClaim -}}
  3. kind: PersistentVolumeClaim
  4. apiVersion: v1
  5. metadata:
  6. name: {{ template "docker-registry.fullname" . }}
  7. namespace: {{ .Values.namespace | default .Release.Namespace }}
  8. annotations:
  9. helm.sh/resource-policy: "keep"
  10. labels:
  11. app: {{ template "docker-registry.fullname" . }}
  12. chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
  13. release: "{{ .Release.Name }}"
  14. heritage: "{{ .Release.Service }}"
  15. spec:
  16. accessModes:
  17. - {{ .Values.persistence.accessMode | quote }}
  18. resources:
  19. requests:
  20. storage: {{ .Values.persistence.size | quote }}
  21. {{- if .Values.persistence.storageClass }}
  22. {{- if (eq "-" .Values.persistence.storageClass) }}
  23. storageClassName: ""
  24. {{- else }}
  25. storageClassName: "{{ .Values.persistence.storageClass }}"
  26. {{- end }}
  27. {{- end }}
  28. {{- end }}
  29. {{- end -}}