_persistence.tpl 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. varlognginx:
  12. enabled: true
  13. type: emptyDir
  14. targetSelector:
  15. tmm:
  16. tmm:
  17. mountPath: /var/log/nginx/
  18. tmp:
  19. enabled: true
  20. type: emptyDir
  21. targetSelector:
  22. tmm:
  23. tmm:
  24. mountPath: /tmp
  25. {{- range $idx, $storage := .Values.tmmStorage.additionalStorages }}
  26. {{ printf "tmm-%v" (int $idx) }}:
  27. enabled: true
  28. {{- include "tmm.storage.ci.migration" (dict "storage" $storage) }}
  29. {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
  30. targetSelector:
  31. tmm:
  32. tmm:
  33. mountPath: {{ $storage.mountPath }}
  34. {{- end }}
  35. {{- end -}}
  36. {{/* TODO: Remove on the next version bump, eg 1.2.0+ */}}
  37. {{- define "tmm.storage.ci.migration" -}}
  38. {{- $storage := .storage -}}
  39. {{- if $storage.hostPath -}}
  40. {{- $_ := set $storage "hostPathConfig" dict -}}
  41. {{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
  42. {{- end -}}
  43. {{- end -}}