Skip to content

Commit 8801876

Browse files
authored
Merge pull request #352 from andyzhangx/upgrade-csi-1.5.0
feat: ReadWriteOncePod support
2 parents 16e5b38 + c69d930 commit 8801876

File tree

6 files changed

+429
-255
lines changed

6 files changed

+429
-255
lines changed

go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require (
77
github.com/Azure/go-autorest/autorest v0.11.12
88
github.com/Azure/go-autorest/autorest/adal v0.9.5
99
github.com/Azure/go-autorest/autorest/to v0.3.0
10-
github.com/container-storage-interface/spec v1.3.0
10+
github.com/container-storage-interface/spec v1.5.0
1111
github.com/golang/protobuf v1.4.3
1212
github.com/kubernetes-csi/csi-lib-utils v0.7.0
1313
github.com/kubernetes-csi/csi-proxy/client v1.0.1
@@ -88,7 +88,6 @@ replace (
8888
github.com/clusterhq/flocker-go => github.com/clusterhq/flocker-go v0.0.0-20160920122132-2b8b7259d313
8989
github.com/cockroachdb/datadriven => github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa
9090
github.com/codegangsta/negroni => github.com/codegangsta/negroni v1.0.0
91-
github.com/container-storage-interface/spec => github.com/container-storage-interface/spec v1.3.0
9291
github.com/containerd/console => github.com/containerd/console v0.0.0-20170925154832-84eeaae905fa
9392
github.com/containerd/containerd => github.com/containerd/containerd v1.0.2
9493
github.com/containerd/typeurl => github.com/containerd/typeurl v0.0.0-20190228175220-2a93cfde8c20

go.sum

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,11 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
7777
github.com/clusterhq/flocker-go v0.0.0-20160920122132-2b8b7259d313/go.mod h1:P1wt9Z3DP8O6W3rvwCt0REIlshg1InHImaLW0t3ObY0=
7878
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
7979
github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0=
80-
github.com/container-storage-interface/spec v1.3.0 h1:wMH4UIoWnK/TXYw8mbcIHgZmB6kHOeIsYsiaTJwa6bc=
80+
github.com/container-storage-interface/spec v1.1.0/go.mod h1:6URME8mwIBbpVyZV93Ce5St17xBiQJQY67NDsuohiy4=
81+
github.com/container-storage-interface/spec v1.2.0/go.mod h1:6URME8mwIBbpVyZV93Ce5St17xBiQJQY67NDsuohiy4=
8182
github.com/container-storage-interface/spec v1.3.0/go.mod h1:6URME8mwIBbpVyZV93Ce5St17xBiQJQY67NDsuohiy4=
83+
github.com/container-storage-interface/spec v1.5.0 h1:lvKxe3uLgqQeVQcrnL2CPQKISoKjTJxojEs9cBk+HXo=
84+
github.com/container-storage-interface/spec v1.5.0/go.mod h1:8K96oQNkJ7pFcC2R9Z1ynGGBB1I93kcS6PGg3SsOk8s=
8285
github.com/containerd/console v0.0.0-20170925154832-84eeaae905fa/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
8386
github.com/containerd/containerd v1.0.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
8487
github.com/containerd/typeurl v0.0.0-20190228175220-2a93cfde8c20/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc=

pkg/smb/smb.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,14 @@ func (d *Driver) Run(endpoint, kubeconfig string, testMode bool) {
7171
d.AddControllerServiceCapabilities(
7272
[]csi.ControllerServiceCapability_RPC_Type{
7373
csi.ControllerServiceCapability_RPC_CREATE_DELETE_VOLUME,
74+
csi.ControllerServiceCapability_RPC_SINGLE_NODE_MULTI_WRITER,
7475
})
7576

7677
d.AddVolumeCapabilityAccessModes([]csi.VolumeCapability_AccessMode_Mode{
7778
csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER,
7879
csi.VolumeCapability_AccessMode_SINGLE_NODE_READER_ONLY,
80+
csi.VolumeCapability_AccessMode_SINGLE_NODE_SINGLE_WRITER,
81+
csi.VolumeCapability_AccessMode_SINGLE_NODE_MULTI_WRITER,
7982
csi.VolumeCapability_AccessMode_MULTI_NODE_READER_ONLY,
8083
csi.VolumeCapability_AccessMode_MULTI_NODE_SINGLE_WRITER,
8184
csi.VolumeCapability_AccessMode_MULTI_NODE_MULTI_WRITER,
@@ -84,6 +87,7 @@ func (d *Driver) Run(endpoint, kubeconfig string, testMode bool) {
8487
d.AddNodeServiceCapabilities([]csi.NodeServiceCapability_RPC_Type{
8588
csi.NodeServiceCapability_RPC_GET_VOLUME_STATS,
8689
csi.NodeServiceCapability_RPC_STAGE_UNSTAGE_VOLUME,
90+
csi.NodeServiceCapability_RPC_SINGLE_NODE_MULTI_WRITER,
8791
})
8892

8993
s := csicommon.NewNonBlockingGRPCServer()

test/sanity/run-test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function install_csi_sanity_bin {
3939
mkdir -p $GOPATH/src/github.com/kubernetes-csi
4040
pushd $GOPATH/src/github.com/kubernetes-csi
4141
export GO111MODULE=off
42-
git clone https://github.com/kubernetes-csi/csi-test.git -b v4.0.2
42+
git clone https://github.com/kubernetes-csi/csi-test.git -b v4.2.0
4343
pushd csi-test/cmd/csi-sanity
4444
make install
4545
popd
@@ -82,8 +82,8 @@ CSI_SANITY_BIN=$GOPATH/bin/csi-sanity
8282
if [ -z "$GITHUB_ACTIONS" ]
8383
then
8484
# if not running on github actions, do not use sudo
85-
"$CSI_SANITY_BIN" --ginkgo.v --csi.secrets="$(pwd)/test/sanity/secrets.yaml" --csi.testvolumeparameters="$(pwd)/test/sanity/params.yaml" --csi.endpoint="$endpoint" --ginkgo.skip='create a volume with already existing name and different capacity|should fail when requesting to create a volume with already existing name and different capacity|should fail when the requested volume does not exist'
85+
"$CSI_SANITY_BIN" --ginkgo.v --csi.secrets="$(pwd)/test/sanity/secrets.yaml" --csi.testvolumeparameters="$(pwd)/test/sanity/params.yaml" --csi.endpoint="$endpoint" --ginkgo.skip='create a volume with already existing name and different capacity|should fail when requesting to create a volume with already existing name and different capacity|should fail when the requested volume does not exist|should return appropriate capabilities'
8686
else
8787
# if running on github actions, use sudo
88-
sudo "$CSI_SANITY_BIN" --ginkgo.v --csi.secrets="$(pwd)/test/sanity/secrets.yaml" --csi.testvolumeparameters="$(pwd)/test/sanity/params.yaml" --csi.endpoint="$endpoint" --ginkgo.skip='create a volume with already existing name and different capacity|should fail when requesting to create a volume with already existing name and different capacity|should fail when the requested volume does not exist'
88+
sudo "$CSI_SANITY_BIN" --ginkgo.v --csi.secrets="$(pwd)/test/sanity/secrets.yaml" --csi.testvolumeparameters="$(pwd)/test/sanity/params.yaml" --csi.endpoint="$endpoint" --ginkgo.skip='create a volume with already existing name and different capacity|should fail when requesting to create a volume with already existing name and different capacity|should fail when the requested volume does not exist|should return appropriate capabilities'
8989
fi

0 commit comments

Comments
 (0)