Files
chart/library/ix-dev/enterprise/syncthing/templates/_persistence.tpl
Stavros Kois df4b8ae4ac Adds smb-pv-pvc option to apps (#1670)
* autobrr

* bazarr

* briefkasten

* castopod

* cloudflared

* deluge

* distribution

* drawio

* filebrowser

* flame

* frigaet

* fscrawler

* grafana

* bump missed app

* homarr

* homepage

* homer

* jellyfin

* jenkins

* kapowarr

* kavita

* komga

* lidarr

* linkding

* listmonk

* logseq

* metube

* minecraft

* n8n

* navidrome

* node-red

* omada

* paperless

* passbolt

* pgadmin

* pigallery

* piwigo

* planka

* plex auto lang

* prowlarr

* qbit

* radarr

* readarr

* recyclarr

* rust-desk

* sabnzbd

* searxng

* sftpgo

* sonarr

* tautulli

* tdarr

* tmm

* transmission

* 2fauth

* unifi

* unifi backup

* whoogle

* wordpress

* syncthing-enterprise

* immutable type
2023-10-26 18:08:46 +03:00

88 lines
2.4 KiB
Smarty

{{- define "syncthing.persistence" -}}
persistence:
home:
enabled: true
type: {{ .Values.syncthingStorage.home.type }}
datasetName: {{ .Values.syncthingStorage.home.datasetName | default "" }}
hostPath: {{ .Values.syncthingStorage.home.hostPath | default "" }}
targetSelector:
syncthing:
syncthing:
mountPath: /var/syncthing
01-certs:
mountPath: /var/syncthing
configure:
enabled: true
type: configmap
objectName: syncthing-configure
defaultMode: "0770"
targetSelector:
syncthing:
syncthing:
mountPath: /configure.sh
subPath: configure.sh
truenas-logo:
enabled: true
type: configmap
objectName: syncthing-truenas-logo
defaultMode: "0770"
targetSelector:
syncthing:
syncthing:
mountPath: /var/truenas/assets/gui/default/assets/img/logo-horizontal.svg
subPath: logo-horizontal.svg
{{- if not .Values.syncthingStorage.additionalStorages -}}
{{- fail "Syncthing - Expected at least one additional storage defined" -}}
{{- end -}}
{{- 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 }}
targetSelector:
syncthing:
syncthing:
mountPath: {{ $storage.mountPath }}
{{- end }}
{{- if .Values.syncthingNetwork.certificateID }}
certs:
enabled: true
type: secret
objectName: syncthing-cert
defaultMode: "0600"
items:
- key: tls.key
path: https-key.pem
- key: tls.crt
path: https-cert.pem
targetSelector:
syncthing:
01-certs:
mountPath: /certs
readOnly: true
scaleCertificate:
syncthing-cert:
enabled: true
id: {{ .Values.syncthingNetwork.certificateID }}
{{- end -}}
{{- end -}}