- Clone repo
$ mkdir -p $GOPATH/src/sigs.k8s.io/
$ git clone https://github.com/csi-driver/csi-driver-smb $GOPATH/src/github.com/csi-driver/csi-driver-smb
- Build CSI driver
$ cd $GOPATH/src/github.com/csi-driver/csi-driver-smb
$ make
- Run verification test before submitting code
$ make verify
Install csc
tool according to https://github.com/rexray/gocsi/tree/master/csc
$ mkdir -p $GOPATH/src/github.com
$ cd $GOPATH/src/github.com
$ git clone https://github.com/rexray/gocsi.git
$ cd rexray/gocsi/csc
$ make build
$ cd $GOPATH/src/github.com/csi-driver/csi-driver-smb
$ ./_output/smbplugin --endpoint tcp://127.0.0.1:10000 --nodeid CSINode -v=5 &
$ csc identity plugin-info --endpoint tcp://127.0.0.1:10000
"smb.csi.k8s.io" "v0.1.0"
$ mkdir ~/testmount
$ csc node publish --endpoint tcp://127.0.0.1:10000 --cap 1,block --target-path ~/testmount CSIVolumeID
#f5713de20cde511e8ba4900#pvc-file-dynamic-8ff5d05a-f47c-11e8-9c3a-000d3a00df41
$ csc node unpublish --endpoint tcp://127.0.0.1:10000 --target-path ~/testmount CSIVolumeID
CSIVolumeID
$ csc controller validate-volume-capabilities --endpoint tcp://127.0.0.1:10000 --cap 1,block CSIVolumeID
CSIVolumeID true
$ csc node get-info --endpoint tcp://127.0.0.1:10000
CSINode
- Build continer image and push image to dockerhub
# run `docker login` first
export REGISTRY=<dockerhub-alias>
make container
make push-latest
- Replace
andyzhangx/smb-csi:latest
incsi-smb-controller.yaml
andcsi-smb-node.yaml
with above dockerhub image urls and then follow install CSI driver master version
wget -O csi-smb-controller.yaml https://raw.githubusercontent.com/csi-driver/csi-driver-smb/master/deploy/csi-smb-controller.yaml
# edit csi-smb-controller.yaml
kubectl apply -f csi-smb-controller.yaml
wget -O csi-smb-node.yaml https://raw.githubusercontent.com/csi-driver/csi-driver-smb/master/deploy/csi-smb-node.yaml
# edit csi-smb-node.yaml
kubectl apply -f csi-smb-node.yaml