Added PVC

This commit is contained in:
Jon Ervine 2021-02-13 22:10:05 +08:00
parent accaedf00e
commit 6ee513c363
3 changed files with 17 additions and 4 deletions

View File

@ -14,7 +14,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.4
version: 0.1.5
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.

View File

@ -56,6 +56,14 @@ spec:
volumeMounts:
- name: gitea-pv
mountPath: /data
volumes:
{{- if and .Values.config.persistence.enabled .Values.config.persistence.existingClaim }}
- name: gitea-pv
persistentVolumeClaim:
{{- with .Values.config.persistence.existingClaim }}
claimName: {{ tpl . $ }}
{{- end }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
@ -68,6 +76,7 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if and .Values.config.persistence.enabled (not .Values.config.persistence.existingClaim) }}
volumeClaimTemplates:
- metadata:
name: gitea-pv
@ -77,4 +86,5 @@ spec:
resources:
requests:
storage: {{ .Values.config.storageSize }}
storageClassName: {{ .Values.config.storageClassName | quote }}
storageClassName: {{ .Values.config.persistence.storageClassName | quote }}
{{= end -}}

View File

@ -72,5 +72,8 @@ tolerations: []
affinity: {}
config:
storageClassName: nfs-client-hestia
persistence:
enabled: true
existingClaim: gitea-data
storageClassName: nfs-client-icarus
storageSize: 20Gi