Skip to content

Commit

Permalink
fix(csi): create jivaVolume CR in the csi controller namespace
Browse files Browse the repository at this point in the history
Signed-off-by: shubham <[email protected]>
  • Loading branch information
shubham14bajpai authored and kmova committed May 15, 2021
1 parent 8cc80b5 commit fb582dd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/kubernetes/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package client
import (
"context"
"fmt"
"os"

"github.com/container-storage-interface/spec/lib/go/csi"
"github.com/openebs/jiva-operator/pkg/apis"
Expand Down Expand Up @@ -154,10 +155,8 @@ func (cl *Client) CreateJivaVolume(req *csi.CreateVolumeRequest) (string, error)
name := utils.StripName(req.GetName())
policyName := req.GetParameters()["policy"]
pvcName := req.GetParameters()[pvcNameKey]
ns, ok := req.GetParameters()["namespace"]
if !ok {
ns = defaultNS
}
ns := os.Getenv("OPENEBS_NAMESPACE")

if req.GetCapacityRange() == nil {
logrus.Warningf("CreateVolume: capacity range is nil, provisioning with default size: {%v (bytes)}", defaultSizeBytes)
sizeBytes = defaultSizeBytes
Expand Down

0 comments on commit fb582dd

Please sign in to comment.