_persistence.tpl 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {{- define "fscrawler.persistence" -}}
  2. persistence:
  3. jobs:
  4. enabled: true
  5. {{- include "fscrawler.storage.ci.migration" (dict "storage" .Values.fscrawlerStorage.jobs) }}
  6. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.fscrawlerStorage.jobs) | nindent 4 }}
  7. targetSelector:
  8. fscrawler:
  9. fscrawler:
  10. mountPath: /root/.fscrawler
  11. config:
  12. mountPath: /root/.fscrawler
  13. default-config:
  14. enabled: true
  15. type: configmap
  16. objectName: example-config
  17. targetSelector:
  18. fscrawler:
  19. config:
  20. mountPath: /example/_settings.example.yaml
  21. subPath: _settings.example.yaml
  22. {{- range $idx, $storage := .Values.fscrawlerStorage.additionalStorages }}
  23. {{ printf "fscrawler-%v:" (int $idx) }}
  24. enabled: true
  25. {{- include "fscrawler.storage.ci.migration" (dict "storage" $storage) }}
  26. {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
  27. targetSelector:
  28. fscrawler:
  29. fscrawler:
  30. mountPath: {{ $storage.mountPath }}
  31. {{- end }}
  32. {{- end -}}
  33. {{/* TODO: Remove on the next version bump, eg 1.2.0+ */}}
  34. {{- define "fscrawler.storage.ci.migration" -}}
  35. {{- $storage := .storage -}}
  36. {{- if $storage.hostPath -}}
  37. {{- $_ := set $storage "hostPathConfig" dict -}}
  38. {{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
  39. {{- end -}}
  40. {{- end -}}