Skip to content

Commit

Permalink
fix: allow nfs shared storages
Browse files Browse the repository at this point in the history
Remove limitation of using nfs as shared storage.

Signed-off-by: Serge Logvinov <[email protected]>
  • Loading branch information
sergelogvinov committed Aug 25, 2024
1 parent cbcb65f commit 04cfb97
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
k8s.io/component-base v0.31.0
k8s.io/klog/v2 v2.130.1
k8s.io/mount-utils v0.31.0
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8
k8s.io/utils v0.0.0-20240821151609-f90d01438635
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ k8s.io/kube-openapi v0.0.0-20240620174524-b456828f718b h1:Q9xmGWBvOGd8UJyccgpYlL
k8s.io/kube-openapi v0.0.0-20240620174524-b456828f718b/go.mod h1:UxDHUPsUwTOOxSU+oXURfFBcAS6JwiRXTYqYwfuGowc=
k8s.io/mount-utils v0.31.0 h1:o+a+n6gyZ7MGc6bIERU3LeFTHbLDBiVReaDpWlJotUE=
k8s.io/mount-utils v0.31.0/go.mod h1:HV/VYBUGqYUj4vt82YltzpWvgv8FPg0G9ItyInT3NPU=
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A=
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
k8s.io/utils v0.0.0-20240821151609-f90d01438635 h1:2wThSvJoW/Ncn9TmQEYXRnevZXi2duqHWf5OX9S3zjI=
k8s.io/utils v0.0.0-20240821151609-f90d01438635/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4=
Expand Down
4 changes: 2 additions & 2 deletions pkg/csi/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ func (d *ControllerService) CreateVolume(_ context.Context, request *csi.CreateV
if storageConfig["shared"] != nil && int(storageConfig["shared"].(float64)) == 1 {
// https://pve.proxmox.com/wiki/Storage only block/local storage are supported
switch storageConfig["type"].(string) {
case "nfs", "cifs", "pbs":
return nil, status.Error(codes.Internal, "error: shared storage type nfs,cifs,pbs are not supported")
case "cifs", "pbs":
return nil, status.Error(codes.Internal, "error: shared storage type cifs, pbs are not supported")
}

topology = &csi.Topology{
Expand Down
2 changes: 1 addition & 1 deletion pkg/csi/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ func (ts *csiTestSuite) TestCreateVolume() {
},
},
},
expectedError: status.Error(codes.Internal, "error: shared storage type nfs,cifs,pbs are not supported"),
expectedError: status.Error(codes.Internal, "error: shared storage type cifs, pbs are not supported"),
},
{
msg: "WrongClusterNotFound",
Expand Down

0 comments on commit 04cfb97

Please sign in to comment.