Files
chart/library/ix-dev/community/bazarr/templates/_persistence.tpl
Stavros Kois 5c0c3f161b Bazarr migrate storage section (#1815)
* use pvc on ci

* remove chown

* adapt values

* adjust storage tempalte

* adapt questions

* bump version

* add migration
2023-12-03 22:09:32 +02:00

39 lines
1.2 KiB
Smarty

{{- define "bazarr.persistence" -}}
persistence:
config:
enabled: true
{{- include "bazarr.storage.ci.migration" (dict "storage" .Values.bazarrStorage.config) }}
{{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.bazarrStorage.config) | nindent 4 }}
targetSelector:
bazarr:
bazarr:
mountPath: /config
tmp:
enabled: true
type: emptyDir
targetSelector:
bazarr:
bazarr:
mountPath: /tmp
{{- range $idx, $storage := .Values.bazarrStorage.additionalStorages }}
{{ printf "bazarr-%v:" (int $idx) }}
enabled: true
{{- include "bazarr.storage.ci.migration" (dict "storage" $storage) }}
{{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
targetSelector:
bazarr:
bazarr:
mountPath: {{ $storage.mountPath }}
{{- end }}
{{- end -}}
{{/* TODO: Remove on the next version bump, eg 1.2.0+ */}}
{{- define "bazarr.storage.ci.migration" -}}
{{- $storage := .storage -}}
{{- if $storage.hostPath -}}
{{- $_ := set $storage "hostPathConfig" dict -}}
{{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
{{- end -}}
{{- end -}}