123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- {{- define "firefly.persistence" -}}
- persistence:
- uploads:
- enabled: true
- {{- include "firefly.storage.ci.migration" (dict "storage" .Values.fireflyStorage.uploads) }}
- {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.fireflyStorage.uploads) | nindent 4 }}
- targetSelector:
- firefly:
- firefly:
- mountPath: /var/www/html/storage/upload
- tmp:
- enabled: true
- type: emptyDir
- targetSelector:
- firefly:
- firefly:
- mountPath: /tmp
- firefly-importer:
- firefly-importer:
- mountPath: /tmp
- {{- range $idx, $storage := .Values.fireflyStorage.additionalStorages }}
- {{ printf "firefly-%v:" (int $idx) }}
- enabled: true
- {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
- targetSelector:
- firefly:
- firefly:
- mountPath: {{ $storage.mountPath }}
- {{- end }}
- {{- include "firefly.storage.ci.migration" (dict "storage" .Values.fireflyStorage.pgData) }}
- {{- include "firefly.storage.ci.migration" (dict "storage" .Values.fireflyStorage.pgBackup) }}
- {{- include "ix.v1.common.app.postgresPersistence"
- (dict "pgData" .Values.fireflyStorage.pgData
- "pgBackup" .Values.fireflyStorage.pgBackup
- ) | nindent 2 }}
- {{- end -}}
- {{/* TODO: Remove on the next version bump, eg 1.1.0+ */}}
- {{- define "firefly.storage.ci.migration" -}}
- {{- $storage := .storage -}}
- {{- if $storage.hostPath -}}
- {{- $_ := set $storage "hostPathConfig" dict -}}
- {{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
- {{- end -}}
- {{- end -}}
|