_persistence.tpl 1.5 KB

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