_persistence.tpl 1.4 KB

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