Files
chart/library/common/templates/lib/storage/_smbCSI.tpl
Stavros Kois 1e5e1b8ef8 NAS-123350 / 24.04 / Add support in common for nfs/smb pvc (#1422)
* 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
2023-08-24 17:40:31 +03:00

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 -}}