Files
chart/library/ix-dev/community/cloudflared/templates/_persistance.tpl
Stavros Kois aaac90fbff Cloudflared - migrate storage section (#1939)
* update ui

* add migration

* update values

* update templates

* bumpv ersion

* whops
2023-12-24 23:08:01 +02:00

28 lines
1.0 KiB
Smarty

{{- define "cloudflared.persistence" -}}
persistence:
{{- range $idx, $storage := .Values.cloudflaredStorage.additionalStorages }}
{{ printf "cloudflared-%v:" (int $idx) }}
enabled: true
{{- include "cloudflared.storage.ci.migration" (dict "storage" $storage) }}
{{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
targetSelector:
cloudflared:
cloudflared:
mountPath: {{ $storage.mountPath }}
{{- if and (eq $storage.type "ixVolume") (not ($storage.ixVolumeConfig | default dict).aclEnable) }}
01-permissions:
mountPath: /mnt/directories{{ $storage.mountPath }}
{{- end }}
{{- end }}
{{- end -}}
{{/* TODO: Remove on the next version bump, eg 1.2.0+ */}}
{{- define "cloudflared.storage.ci.migration" -}}
{{- $storage := .storage -}}
{{- if $storage.hostPath -}}
{{- $_ := set $storage "hostPathConfig" dict -}}
{{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
{{- end -}}
{{- end -}}