- Clone repo
$ mkdir -p $GOPATH/src/github.com/kubernetes-csi
$ git clone https://github.com/kubernetes-csi/csi-driver-smb $GOPATH/src/github.com/kubernetes-csi/csi-driver-smb
- Build CSI driver
$ cd $GOPATH/src/github.com/kubernetes-csi/csi-driver-smb
$ make
- Run verification test before submitting code
$ make verify
- If there is config file changed under
charts
directory, run following command to update chart file
helm package charts/latest/csi-driver-smb -d charts/latest/
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/kubernetes-csi/csi-driver-smb
$ ./_output/amd64/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"
$ csc node stage --endpoint tcp://127.0.0.1:10000 --cap 1,block --staging-target-path=/tmp/staging-path --with-requires-attribs ... --with-requires-creds ...
$ csc node publish --endpoint tcp://127.0.0.1:10000 --cap 1,block --staging-target-path=/tmp/staging-path --target-path=/tmp/publish-path volumeid
$ csc node unpublish --endpoint tcp://127.0.0.1:10000 --target-path=/tmp/publish-path volumeid
$ csc node unstage --endpoint tcp://127.0.0.1:10000 --staging-target-path=/tmp/staging-path volumeid
$ 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 container image and push image to dockerhub
# run `docker login` first
export REGISTRY=<dockerhub-alias>
export IMAGE_VERSION=latest
# build linux, windows images
make container-all
# create a manifest list for the images above
make push-manifest
- Replace
registry.k8s.io/sig-storage/smbplugin:canary
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-node.yaml https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/deploy/csi-smb-node.yaml
# edit csi-smb-node.yaml
kubectl apply -f csi-smb-node.yaml
helm repo index charts --url=https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/master/charts