mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
cephfs: set PV/PVC details on the subvolume 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:
parent
ecf03eb6ae
commit
6bcb8ecc68
@ -386,6 +386,13 @@ func (cs *ControllerServer) CreateVolume(
|
||||
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
||||
// Set Metadata on PV Create
|
||||
metadata := k8s.GetVolumeMetadata(req.GetParameters())
|
||||
err = volClient.SetAllMetadata(metadata)
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
log.DebugLog(ctx, "cephfs: successfully created backing volume named %s for request name %s",
|
||||
|
Loading…
Reference in New Issue
Block a user