Skip to content

Commit

Permalink
Update powermax.go
Browse files Browse the repository at this point in the history
Added changes for PowerMax volume limits feature
  • Loading branch information
Lakshmi3004 authored and tssushma committed Aug 10, 2023
1 parent 82c0aca commit 521c389
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/drivers/powermax.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ const (
CSIPmaxVsphereHostname = "<X_CSI_VSPHERE_HOSTNAME>"
CSIPmaxVsphereHost = "<X_CSI_VCENTER_HOST>"
CSIPmaxChap = "<X_CSI_POWERMAX_ISCSI_ENABLE_CHAP>"

// CsiPmaxMaxVolumesPerNode - Maximum volumes that the controller can schedule on the node
CsiPmaxMaxVolumesPerNode = "<X_CSI_MAX_VOLUMES_PER_NODE>"
)

// PrecheckPowerMax do input validation
Expand Down Expand Up @@ -115,6 +118,7 @@ func ModifyPowermaxCR(yamlString string, cr csmv1.ContainerStorageModule, fileTy
ctrlHealthMonitor := "false"
nodeHealthMonitor := "false"
storageCapacity := "true"
maxVolumesPerNode := ""

switch fileType {
case "Node":
Expand Down Expand Up @@ -169,6 +173,9 @@ func ModifyPowermaxCR(yamlString string, cr csmv1.ContainerStorageModule, fileTy
if env.Name == "X_CSI_TOPOLOGY_CONTROL_ENABLED" {
nodeTopology = env.Value
}
if env.Name == "X_CSI_MAX_VOLUMES_PER_NODE" {
maxVolumesPerNode = env.Value
}
}
yamlString = strings.ReplaceAll(yamlString, CSIPmaxManagedArray, managedArray)
yamlString = strings.ReplaceAll(yamlString, CSIPmaxEndpoint, endpoint)
Expand Down

0 comments on commit 521c389

Please sign in to comment.