_persistence.tpl 1.1 KB

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