_nfsCSI.tpl 747 B

123456789101112131415161718192021
  1. {{/* NFS CSI */}}
  2. {{/* Call this template:
  3. {{ include "ix.v1.common.lib.storage.nfsCSI" (dict "rootCtx" $ "objectData" $objectData) }}
  4. rootCtx: The root context of the chart.
  5. objectData:
  6. driver: The name of the driver.
  7. server: The server address.
  8. share: The share to the NFS share.
  9. */}}
  10. {{- define "ix.v1.common.lib.storage.nfsCSI" -}}
  11. {{- $rootCtx := .rootCtx -}}
  12. {{- $objectData := .objectData }}
  13. csi:
  14. driver: {{ $objectData.driver }}
  15. {{- /* Create a unique handle, server/share#release-app-volumeName */}}
  16. volumeHandle: {{ printf "%s%s#%s" $objectData.server $objectData.share $objectData.name }}
  17. volumeAttributes:
  18. server: {{ tpl $objectData.server $rootCtx }}
  19. share: {{ tpl $objectData.share $rootCtx }}
  20. {{- end -}}