mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-18 04:10:22 +00:00
rbd: expose CSI-Addons ReclaimSpace operations
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
c274649b80
commit
e574c807f0
@ -75,6 +75,13 @@ func (is *IdentityServer) GetCapabilities(
|
||||
Type: identity.Capability_Service_CONTROLLER_SERVICE,
|
||||
},
|
||||
},
|
||||
},
|
||||
&identity.Capability{
|
||||
Type: &identity.Capability_ReclaimSpace_{
|
||||
ReclaimSpace: &identity.Capability_ReclaimSpace{
|
||||
Type: identity.Capability_ReclaimSpace_OFFLINE,
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@ -87,6 +94,13 @@ func (is *IdentityServer) GetCapabilities(
|
||||
Type: identity.Capability_Service_NODE_SERVICE,
|
||||
},
|
||||
},
|
||||
},
|
||||
&identity.Capability{
|
||||
Type: &identity.Capability_ReclaimSpace_{
|
||||
ReclaimSpace: &identity.Capability_ReclaimSpace{
|
||||
Type: identity.Capability_ReclaimSpace_ONLINE,
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -213,6 +213,16 @@ func (r *Driver) setupCSIAddonsServer(conf *util.Config) error {
|
||||
is := casrbd.NewIdentityServer(conf)
|
||||
r.cas.RegisterService(is)
|
||||
|
||||
if conf.IsControllerServer {
|
||||
rs := casrbd.NewReclaimSpaceControllerServer()
|
||||
r.cas.RegisterService(rs)
|
||||
}
|
||||
|
||||
if conf.IsNodeServer {
|
||||
rs := casrbd.NewReclaimSpaceNodeServer()
|
||||
r.cas.RegisterService(rs)
|
||||
}
|
||||
|
||||
// start the server, this does not block, it runs a new go-routine
|
||||
err = r.cas.Start()
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user