Skip to content

Commit

Permalink
fix: don't pass confusing value to GetCapacityRequest.VolumeCapabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
zjx20 committed Apr 10, 2024
1 parent 91e80e5 commit a101473
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions pkg/capacity/capacity.go
Original file line number Diff line number Diff line change
Expand Up @@ -591,17 +591,8 @@ func (c *Controller) syncCapacity(ctx context.Context, item workItem) error {

req := &csi.GetCapacityRequest{
Parameters: sc.Parameters,
// The assumption is that the capacity is independent of the
// capabilities. The standard makes it mandatory to pass something,
// therefore we pick something rather arbitrarily.
VolumeCapabilities: []*csi.VolumeCapability{
{
AccessType: &csi.VolumeCapability_Mount{},
AccessMode: &csi.VolumeCapability_AccessMode{
Mode: csi.VolumeCapability_AccessMode_UNKNOWN,
},
},
},
// The assumption is that the capacity is independent of the capabilities.
VolumeCapabilities: nil,
}
if item.segment != nil {
req.AccessibleTopology = &csi.Topology{
Expand Down

0 comments on commit a101473

Please sign in to comment.