make uploads persistent

This commit is contained in:
2025-03-10 12:54:27 +01:00
parent 5e8de87c5d
commit e231c419c4
2 changed files with 20 additions and 7 deletions

View File

@@ -54,11 +54,16 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- name: storage
- name: config
mountPath: "/config/"
{{- if .Values.persistence.subPath }}
subPath: {{ .Values.persistence.subPath }}
{{- end }}
- name: uploads
mountPath: "/var/www/html/uploads"
{{- if .Values.persistence.subPath }}
subPath: {{ .Values.persistence.subPath }}
{{- end }}
env:
- name: LB_DB_HOST
{{- if eq .Values.mariadb.enabled true }}
@@ -110,13 +115,20 @@ spec:
- name: TZ
value: '{{ .Values.librebooking.TZ }}'
volumes:
- name: storage
{{- if .Values.persistence.enabled }}
- name: uploads
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim | default (include "librebooking.fullname" .) }}
{{- else }}
claimName: {{ .Values.persistence.existingClaimUploads | default (printf "%s-uploads" (include "librebooking.fullname" .))}}
{{- else }}
emptyDir: {}
{{- end -}}
{{- end }}
- name: config
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaimConfig | default (printf "%s-config" (include "librebooking.fullname" .)) }}
{{- else }}
emptyDir: {}
{{- end }}
{{- range .Values.librebooking.extraVolumeMounts }}
- name: {{ .name }}
{{- if .existingClaim }}

View File

@@ -178,7 +178,8 @@ persistence:
- kubernetes.io/pvc-protection
selectorLabels: {}
subPath: ""
existingClaim: null
existingClaimConfig: null
existingClaimUploads: null
# This section is for setting up autoscaling more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/
autoscaling: