Skip to content

Commit

Permalink
Merge pull request #77 from openebs/helm-enable-rdma
Browse files Browse the repository at this point in the history
feat(RDMA): enable and disable RDMA via helm upgrade
  • Loading branch information
rohan2794 authored Oct 9, 2024
2 parents 977d6ef + 3a52152 commit 3a9c50e
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions common/k8sinstall/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,3 +220,31 @@ func ScaleZfsControllerViaHelm(expected_replica int32) (int32, error) {

return orig_replicas, nil
}

// SetRdmaViaHelm enable and disable RDMA
func SetRdmaViaHelm(enableRdma bool, iface string) error {
e2eCfg := e2e_config.GetConfig()
values := map[string]interface{}{
"io_engine.target.nvmf.rdma.enabled": enableRdma,
"io_engine.target.nvmf.iface": iface,
}

err := apps.UpgradeHelmChart(e2eCfg.Product.ChartName,
common.NSMayastor(),
e2eCfg.Product.HelmReleaseName,
values,
)
if err != nil {
return fmt.Errorf("failed to set RDMA via helm, error: %v", err)
}

ready, err := k8stest.OpenEBSReady(10, 340)
if err != nil {
return err
}
if !ready {
return fmt.Errorf("all pods not ready, openebs ready check failed")
}

return nil
}

0 comments on commit 3a9c50e

Please sign in to comment.