mirror of
https://github.com/truenas/charts.git
synced 2026-04-23 18:10:06 +08:00
syncthing/test - migrate storage section (#2008)
* bump version * update values * update ui * update templates * add migration * keep previous version
This commit is contained in:
@@ -2,9 +2,8 @@
|
||||
persistence:
|
||||
home:
|
||||
enabled: true
|
||||
type: {{ .Values.syncthingStorage.home.type }}
|
||||
datasetName: {{ .Values.syncthingStorage.home.datasetName | default "" }}
|
||||
hostPath: {{ .Values.syncthingStorage.home.hostPath | default "" }}
|
||||
{{- include "syncthing.storage.ci.migration" (dict "storage" .Values.syncthingStorage.home) }}
|
||||
{{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.syncthingStorage.home) | nindent 4 }}
|
||||
targetSelector:
|
||||
syncthing:
|
||||
syncthing:
|
||||
@@ -38,24 +37,9 @@ persistence:
|
||||
|
||||
{{- range $idx, $storage := .Values.syncthingStorage.additionalStorages }}
|
||||
{{ printf "sync-%v" (int $idx) }}:
|
||||
{{- $size := "" -}}
|
||||
{{- if $storage.size -}}
|
||||
{{- $size = (printf "%vGi" $storage.size) -}}
|
||||
{{- end }}
|
||||
enabled: true
|
||||
type: {{ $storage.type }}
|
||||
datasetName: {{ $storage.datasetName | default "" }}
|
||||
hostPath: {{ $storage.hostPath | default "" }}
|
||||
server: {{ $storage.server | default "" }}
|
||||
share: {{ $storage.share | default "" }}
|
||||
domain: {{ $storage.domain | default "" }}
|
||||
username: {{ $storage.username | default "" }}
|
||||
password: {{ $storage.password | default "" }}
|
||||
size: {{ $size }}
|
||||
{{- if eq $storage.type "smb-pv-pvc" }}
|
||||
mountOptions:
|
||||
- key: noperm
|
||||
{{- end }}
|
||||
{{- include "syncthing.storage.ci.migration" (dict "storage" $storage) }}
|
||||
{{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
|
||||
targetSelector:
|
||||
syncthing:
|
||||
syncthing:
|
||||
@@ -85,3 +69,13 @@ scaleCertificate:
|
||||
id: {{ .Values.syncthingNetwork.certificateID }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* TODO: Remove on the next version bump, eg 1.2.0+ */}}
|
||||
{{- define "syncthing.storage.ci.migration" -}}
|
||||
{{- $storage := .storage -}}
|
||||
|
||||
{{- if $storage.hostPath -}}
|
||||
{{- $_ := set $storage "hostPathConfig" dict -}}
|
||||
{{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user