_persistence.tpl 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. {{- define "whoogle.persistence" -}}
  2. persistence:
  3. config:
  4. enabled: true
  5. # Upstream also has this dir
  6. # in an tmpfs directory
  7. type: emptyDir
  8. targetSelector:
  9. whoogle:
  10. whoogle:
  11. mountPath: /config
  12. tmp:
  13. enabled: true
  14. type: emptyDir
  15. targetSelector:
  16. whoogle:
  17. whoogle:
  18. mountPath: /tmp
  19. runtor:
  20. enabled: true
  21. type: emptyDir
  22. targetSelector:
  23. whoogle:
  24. whoogle:
  25. mountPath: /run/tor
  26. varlibtor:
  27. enabled: true
  28. type: emptyDir
  29. targetSelector:
  30. whoogle:
  31. whoogle:
  32. mountPath: /var/lib/tor
  33. # emptyDir is by default 0:fsGroup
  34. # But for this directory we need to set it to 927:927
  35. 01-permissions:
  36. mountPath: /mnt/directories/varlibtor
  37. {{- range $idx, $storage := .Values.whoogleStorage.additionalStorages }}
  38. {{ printf "whoogle-%v" (int $idx) }}:
  39. enabled: true
  40. {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
  41. targetSelector:
  42. whoogle:
  43. whoogle:
  44. mountPath: {{ $storage.mountPath }}
  45. {{- if $.Release.IsInstall }}
  46. {{- if and (eq $storage.type "ixVolume") (not ($storage.ixVolumeConfig | default dict).aclEnable) }}
  47. 01-permissions:
  48. mountPath: /mnt/directories{{ $storage.mountPath }}
  49. {{- end }}
  50. {{- end }}
  51. {{- end }}
  52. {{- end -}}