mirror of
https://github.com/truenas/charts.git
synced 2026-04-23 18:10:06 +08:00
* Empty-Commit * temp commit * make sure that we use the pv * typo * add validation * typo * cleanup validation and add secret for smb * revert * add some tets * add more tests * add more tests * more tests * rename to share * rename * moar tests * clean * add some docs * fix name uniqueness and tests * make mountOptions validation a bit better * update docs
24 lines
855 B
Smarty
24 lines
855 B
Smarty
{{/* SMB CSI */}}
|
|
{{/* Call this template:
|
|
{{ include "ix.v1.common.lib.storage.smbCSI" (dict "rootCtx" $ "objectData" $objectData) }}
|
|
|
|
rootCtx: The root context of the chart.
|
|
objectData:
|
|
driver: The name of the driver.
|
|
server: The server address.
|
|
share: The share to the SMB share.
|
|
*/}}
|
|
{{- define "ix.v1.common.lib.storage.smbCSI" -}}
|
|
{{- $rootCtx := .rootCtx -}}
|
|
{{- $objectData := .objectData }}
|
|
csi:
|
|
driver: {{ $objectData.driver }}
|
|
{{- /* Create a unique handle, server/share#release-app-volumeName */}}
|
|
volumeHandle: {{ printf "%s/%s#%s" $objectData.server $objectData.share $objectData.name }}
|
|
volumeAttributes:
|
|
source: {{ printf "//%v/%v" (tpl $objectData.server $rootCtx) (tpl $objectData.share $rootCtx) }}
|
|
nodeStageSecretRef:
|
|
name: {{ $objectData.name }}
|
|
namespace: {{ $rootCtx.Release.Namespace }}
|
|
{{- end -}}
|