_persistence.tpl 1.0 KB

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