_persistence.tpl 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. {{- define "searxng.persistence" -}}
  2. persistence:
  3. config:
  4. enabled: true
  5. {{- include "searxng.storage.ci.migration" (dict "storage" .Values.searxngStorage.config) }}
  6. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.searxngStorage.config) | nindent 4 }}
  7. targetSelector:
  8. searxng:
  9. searxng:
  10. mountPath: /etc/searxng
  11. 01-permissions:
  12. mountPath: /mnt/directories/searxng
  13. tmp:
  14. enabled: true
  15. type: emptyDir
  16. targetSelector:
  17. searxng:
  18. searxng:
  19. mountPath: /tmp
  20. {{- range $idx, $storage := .Values.searxngStorage.additionalStorages }}
  21. {{ printf "searxng-%v:" (int $idx) }}
  22. enabled: true
  23. {{- include "searxng.storage.ci.migration" (dict "storage" $storage) }}
  24. {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
  25. targetSelector:
  26. searxng:
  27. searxng:
  28. mountPath: {{ $storage.mountPath }}
  29. {{- end }}
  30. {{- end -}}
  31. {{/* TODO: Remove on the next version bump, eg 1.2.1+ */}}
  32. {{- define "searxng.storage.ci.migration" -}}
  33. {{- $storage := .storage -}}
  34. {{- if $storage.hostPath -}}
  35. {{- $_ := set $storage "hostPathConfig" dict -}}
  36. {{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
  37. {{- end -}}
  38. {{- end -}}