rbd: set PV/PVC details on the image as metadata on create

This helps Monitoring solutions without access to Kubernetes clusters to
display the details of the PV/PVC/NameSpace in their dashboard.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
This commit is contained in:
Prasanna Kumar Kalever 2022-02-21 15:18:18 +05:30 committed by mergify[bot]
parent 4d750ed0e5
commit 0119d69ab2

View File

@ -329,6 +329,12 @@ func (cs *ControllerServer) CreateVolume(
return nil, err return nil, err
} }
// Set Metadata on PV Create
err = rbdVol.setVolumeMetadata(req.GetParameters())
if err != nil {
return nil, err
}
return buildCreateVolumeResponse(req, rbdVol), nil return buildCreateVolumeResponse(req, rbdVol), nil
} }