_persistence.tpl 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. {{- define "fscrawler.persistence" -}}
  2. persistence:
  3. jobs:
  4. enabled: true
  5. type: {{ .Values.fscrawlerStorage.jobs.type }}
  6. datasetName: {{ .Values.fscrawlerStorage.jobs.datasetName | default "" }}
  7. hostPath: {{ .Values.fscrawlerStorage.jobs.hostPath | default "" }}
  8. targetSelector:
  9. fscrawler:
  10. fscrawler:
  11. mountPath: /root/.fscrawler
  12. config:
  13. mountPath: /root/.fscrawler
  14. default-config:
  15. enabled: true
  16. type: configmap
  17. objectName: example-config
  18. targetSelector:
  19. fscrawler:
  20. config:
  21. mountPath: /example/_settings.example.yaml
  22. subPath: _settings.example.yaml
  23. {{- range $idx, $storage := .Values.fscrawlerStorage.additionalStorages }}
  24. {{ printf "fscrawler-%v" (int $idx) }}:
  25. {{- $size := "" -}}
  26. {{- if $storage.size -}}
  27. {{- $size = (printf "%vGi" $storage.size) -}}
  28. {{- end }}
  29. enabled: true
  30. type: {{ $storage.type }}
  31. datasetName: {{ $storage.datasetName | default "" }}
  32. hostPath: {{ $storage.hostPath | default "" }}
  33. server: {{ $storage.server | default "" }}
  34. share: {{ $storage.share | default "" }}
  35. domain: {{ $storage.domain | default "" }}
  36. username: {{ $storage.username | default "" }}
  37. password: {{ $storage.password | default "" }}
  38. size: {{ $size }}
  39. {{- if eq $storage.type "smb-pv-pvc" }}
  40. mountOptions:
  41. - key: noperm
  42. {{- end }}
  43. targetSelector:
  44. fscrawler:
  45. fscrawler:
  46. mountPath: {{ $storage.mountPath }}
  47. {{- end }}
  48. {{- end -}}