diff --git a/templates/deployment.yaml b/templates/deployment.yaml index e460e5a..cbceac3 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -109,10 +109,37 @@ spec: value: '{{ .Values.mariadb.loglevel }}' - name: TZ value: '{{ .Values.librebooking.TZ }}' - {{- with .Values.volumes }} volumes: - {{- toYaml . | nindent 8 }} + - name: storage + {{- if .Values.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ .Values.persistence.existingClaim | default (include "librebooking.fullname" .) }} + {{- else }} + emptyDir: {} + {{- end -}} + {{- range .Values.librebooking.extraVolumeMounts }} + - name: {{ .name }} + {{- if .existingClaim }} + persistentVolumeClaim: + claimName: {{ .existingClaim }} + {{- else if .hostPath }} + hostPath: + path: {{ .hostPath }} + {{- else if .configMap }} + configMap: + name: {{ .configMap }} + {{- with .items }} + items: + {{- toYaml . | nindent 14 }} + {{- end }} + {{- else }} + emptyDir: {} + {{- end }} {{- end }} + {{- range .Values.librebooking.extraEmptyDirMounts }} + - name: {{ .name }} + emptyDir: {} + {{- end -}} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/values.yaml b/values.yaml index 34224b5..d21154f 100644 --- a/values.yaml +++ b/values.yaml @@ -25,6 +25,29 @@ librebooking: loglevel: 'none' TZ: 'Europe/Berlin' + ## This allows you to mount additional volumes + ## into the librebooking container + extraVolumeMounts: [] + # - name: extra-volume-0 + # mountPath: /mnt/volume0 + # readOnly: true + # existingClaim: volume-claim + # - name: extra-volume-1 + # mountPath: /mnt/volume1 + # readOnly: true + # hostPath: /usr/shared/ + # - name: extra-volume-configmap + # configMap: librebooking + # items: + # - key: config.php + # path: application/config/config.php + + ## This allows you to mount additional "emptyDirs" + ## into the librebooking container + extraEmptyDirMounts: [] + # - name: extra-empty-dir + # mountPath: /var/lib/foobar + ## MariaDB chart configuration mariadb: enabled: true @@ -142,7 +165,7 @@ readinessProbe: ## Enable persistence using Persistent Volume Claims ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ -## Used for LimeSurvey Uploads +## Used for librebooking Uploads persistence: # Enable persistence with PVC. If false, uses emptyDir instead. enabled: true