Skip to content

Commit

Permalink
Merge pull request #1193 from zjx20/fix-volume-capabilities
Browse files Browse the repository at this point in the history
fix: don't pass confusing value to GetCapacityRequest.VolumeCapabilities
  • Loading branch information
k8s-ci-robot authored Apr 23, 2024
2 parents 3038532 + a101473 commit d511a50
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 d511a50

Please sign in to comment.