Skip to content

Commit

Permalink
rbd: remove topologyConstrainedPools parameter
Browse files Browse the repository at this point in the history
This commit removes the `topologyConstrainedPools` parameter
from PV volumeAttributes as it is not required.

Signed-off-by: Praveen M <m.praveen@ibm.com>
  • Loading branch information
iPraveenParihar committed Mar 14, 2024
1 parent 6c43789 commit 6d70eb8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions internal/rbd/controllerserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@ func buildCreateVolumeResponse(req *csi.CreateVolumeRequest, rbdVol *rbdVolume)
}
}

// remove topologyConstrainedPools param as it is not required
delete(volumeContext, util.TopologyPoolsParam)

return &csi.CreateVolumeResponse{Volume: volume}
}

Expand Down
5 changes: 4 additions & 1 deletion internal/util/topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ import (
const (
keySeparator rune = '/'
labelSeparator string = ","

// topologyPoolsParam is the parameter name used to pass topology constrained pools
TopologyPoolsParam = "topologyConstrainedPools"
)

// GetTopologyFromDomainLabels returns the CSI topology map, determined from
Expand Down Expand Up @@ -129,7 +132,7 @@ func GetTopologyFromRequest(
var topologyPools []TopologyConstrainedPool

// check if parameters have pool configuration pertaining to topology
topologyPoolsStr := req.GetParameters()["topologyConstrainedPools"]
topologyPoolsStr := req.GetParameters()[TopologyPoolsParam]
if topologyPoolsStr == "" {
return nil, nil, nil
}
Expand Down

0 comments on commit 6d70eb8

Please sign in to comment.