_persistence.tpl 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. {{- define "omada.persistence" -}}
  2. persistence:
  3. data:
  4. enabled: true
  5. {{- include "omada.storage.ci.migration" (dict "storage" .Values.omadaStorage.data) }}
  6. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.omadaStorage.data) | nindent 4 }}
  7. targetSelector:
  8. omada:
  9. omada:
  10. mountPath: /opt/tplink/EAPController/data
  11. logs:
  12. enabled: true
  13. {{- include "omada.storage.ci.migration" (dict "storage" .Values.omadaStorage.logs) }}
  14. {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.omadaStorage.logs) | nindent 4 }}
  15. targetSelector:
  16. omada:
  17. omada:
  18. mountPath: /opt/tplink/EAPController/logs
  19. tmp:
  20. enabled: true
  21. type: emptyDir
  22. targetSelector:
  23. omada:
  24. omada:
  25. mountPath: /tmp
  26. {{- range $idx, $storage := .Values.omadaStorage.additionalStorages }}
  27. {{ printf "omada-%v" (int $idx) }}:
  28. enabled: true
  29. {{- include "omada.storage.ci.migration" (dict "storage" $storage) }}
  30. {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
  31. targetSelector:
  32. omada:
  33. omada:
  34. mountPath: {{ $storage.mountPath }}
  35. 01-permissions:
  36. mountPath: /mnt/directories{{ $storage.mountPath }}
  37. {{- end -}}
  38. {{- if .Values.omadaNetwork.certificateID }}
  39. cert:
  40. enabled: true
  41. type: secret
  42. objectName: omada-cert
  43. defaultMode: "0600"
  44. items:
  45. - key: tls.key
  46. path: tls.key
  47. - key: tls.crt
  48. path: tls.crt
  49. targetSelector:
  50. omada:
  51. omada:
  52. mountPath: /cert
  53. readOnly: true
  54. scaleCertificate:
  55. omada-cert:
  56. enabled: true
  57. id: {{ .Values.omadaNetwork.certificateID }}
  58. {{- end -}}
  59. {{- end -}}
  60. {{/* TODO: Remove on the next version bump, eg 1.2.0+ */}}
  61. {{- define "omada.storage.ci.migration" -}}
  62. {{- $storage := .storage -}}
  63. {{- if $storage.hostPath -}}
  64. {{- $_ := set $storage "hostPathConfig" dict -}}
  65. {{- $_ := set $storage.hostPathConfig "hostPath" $storage.hostPath -}}
  66. {{- end -}}
  67. {{- end -}}