Merge pull request #125150 from humblec/csi-update

update CSI spec to v1.9.0 which has modifyVolume API support and other updated libraries in place
This commit is contained in:
Kubernetes Prow Robot 2024-05-30 05:13:48 -07:00 committed by GitHub
commit 2c46fafa23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 545 additions and 327 deletions

2
go.mod
View File

@ -16,7 +16,7 @@ require (
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5
github.com/blang/semver/v4 v4.0.0
github.com/container-storage-interface/spec v1.8.0
github.com/container-storage-interface/spec v1.9.0
github.com/containerd/cgroups v1.1.0
github.com/coredns/corefile-migration v1.0.21
github.com/coreos/go-oidc v2.2.1+incompatible

4
go.sum
View File

@ -201,8 +201,8 @@ github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+g
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cockroachdb/datadriven v1.0.2 h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD93PBm/jA=
github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU=
github.com/container-storage-interface/spec v1.8.0 h1:D0vhF3PLIZwlwZEf2eNbpujGCNwspwTYf2idJRJx4xI=
github.com/container-storage-interface/spec v1.8.0/go.mod h1:ROLik+GhPslwwWRNFF1KasPzroNARibH2rfz1rkg4H0=
github.com/container-storage-interface/spec v1.9.0 h1:zKtX4STsq31Knz3gciCYCi1SXtO2HJDecIjDVboYavY=
github.com/container-storage-interface/spec v1.9.0/go.mod h1:ZfDu+3ZRyeVqxZM0Ds19MVLkN2d1XJ5MAfi1L3VjlT0=
github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU=
github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM=
github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw=

View File

@ -179,7 +179,6 @@
"google.golang.org/grpc"
],
"google.golang.org/genproto": [
"github.com/container-storage-interface/spec",
"github.com/containerd/ttrpc",
"github.com/grpc-ecosystem/go-grpc-middleware",
"github.com/grpc-ecosystem/grpc-gateway",

View File

@ -169,6 +169,21 @@ func (mr *MockControllerServerMockRecorder) ControllerGetVolume(arg0, arg1 any)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerGetVolume", reflect.TypeOf((*MockControllerServer)(nil).ControllerGetVolume), arg0, arg1)
}
// ControllerModifyVolume mocks base method.
func (m *MockControllerServer) ControllerModifyVolume(arg0 context.Context, arg1 *csi.ControllerModifyVolumeRequest) (*csi.ControllerModifyVolumeResponse, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ControllerModifyVolume", arg0, arg1)
ret0, _ := ret[0].(*csi.ControllerModifyVolumeResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ControllerModifyVolume indicates an expected call of ControllerModifyVolume.
func (mr *MockControllerServerMockRecorder) ControllerModifyVolume(arg0, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ControllerModifyVolume", reflect.TypeOf((*MockControllerServer)(nil).ControllerModifyVolume), arg0, arg1)
}
// ControllerPublishVolume mocks base method.
func (m *MockControllerServer) ControllerPublishVolume(arg0 context.Context, arg1 *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error) {
m.ctrl.T.Helper()

View File

@ -567,6 +567,13 @@ func (s *service) ControllerGetCapabilities(
},
},
},
{
Type: &csi.ControllerServiceCapability_Rpc{
Rpc: &csi.ControllerServiceCapability_RPC{
Type: csi.ControllerServiceCapability_RPC_MODIFY_VOLUME,
},
},
},
}
if !s.config.DisableAttach {
@ -736,6 +743,14 @@ func (s *service) ControllerExpandVolume(
return resp, nil
}
func (s *service) ControllerModifyVolume(
ctx context.Context,
req *csi.ControllerModifyVolumeRequest) (*csi.ControllerModifyVolumeResponse, error) {
// todo: implement the functionality while we add the modifyVolume test
resp := &csi.ControllerModifyVolumeResponse{}
return resp, nil
}
func getSnapshotById(s *service, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error) {
if len(req.GetSnapshotId()) != 0 {
i, snapshot := s.snapshots.FindSnapshot("id", req.GetSnapshotId())

File diff suppressed because it is too large Load Diff

2
vendor/modules.txt vendored
View File

@ -91,7 +91,7 @@ github.com/cilium/ebpf/internal
github.com/cilium/ebpf/internal/sys
github.com/cilium/ebpf/internal/unix
github.com/cilium/ebpf/link
# github.com/container-storage-interface/spec v1.8.0
# github.com/container-storage-interface/spec v1.9.0
## explicit; go 1.18
github.com/container-storage-interface/spec/lib/go/csi
# github.com/containerd/cgroups v1.1.0