_persistence.tpl 1.3 KB

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