b84a431854
### Description of the change The code change ensures proper usage of gitea.persistence.storageClass, improving configuration accuracy and code readability. ### Applicable issues - fixes #601 Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/602 Reviewed-by: pat-s <pat-s@noreply.gitea.com> Co-authored-by: florianspk <florianspk@gmail.com> Co-committed-by: florianspk <florianspk@gmail.com>
24 lines
703 B
YAML
24 lines
703 B
YAML
{{- if and .Values.persistence.enabled .Values.persistence.create }}
|
|
kind: PersistentVolumeClaim
|
|
apiVersion: v1
|
|
metadata:
|
|
name: {{ .Values.persistence.claimName }}
|
|
namespace: {{ $.Release.Namespace }}
|
|
annotations:
|
|
{{ .Values.persistence.annotations | toYaml | indent 4}}
|
|
spec:
|
|
accessModes:
|
|
{{- if gt .Values.replicaCount 1.0 }}
|
|
- ReadWriteMany
|
|
{{- else }}
|
|
{{- .Values.persistence.accessModes | toYaml | nindent 4 }}
|
|
{{- end }}
|
|
volumeMode: Filesystem
|
|
{{- include "gitea.persistence.storageClass" . | nindent 2 }}
|
|
{{- with .Values.persistence.volumeName }}
|
|
volumeName: {{ . }}
|
|
{{- end }}
|
|
resources:
|
|
requests:
|
|
storage: {{ .Values.persistence.size }}
|
|
{{- end }} |