Skip to content

Commit aaf2d60

Browse files
authored
Merge pull request #1691 from dannyzaken/danny-fixes
Set default path for nsfs bucket OBC provisioning to the bucket name
2 parents 35e2e61 + b64f204 commit aaf2d60

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/obc/provisioner.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,11 @@ func (r *BucketRequest) CreateAndUpdateBucket(
467467

468468
// create NS bucket
469469
if r.BucketClass.Spec.NamespacePolicy != nil {
470-
createBucketParams.Namespace = bucketclass.CreateNamespaceBucketInfoStructure(*r.BucketClass.Spec.NamespacePolicy, r.OBC.Spec.AdditionalConfig["path"])
470+
path := r.OBC.Spec.AdditionalConfig["path"]
471+
if path == "" {
472+
path = r.BucketName
473+
}
474+
createBucketParams.Namespace = bucketclass.CreateNamespaceBucketInfoStructure(*r.BucketClass.Spec.NamespacePolicy, path)
471475
}
472476

473477
err = r.SysClient.NBClient.CreateBucketAPI(*createBucketParams)

0 commit comments

Comments
 (0)