namespace: add new CRD

This introduces a new CRD to add the ability
to create rados namespace for a given
ceph block pool. Typically the name of the pool
is the name of the blockpool created by rook.

Closes: #7035

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit b0fc7c9b92)
This commit is contained in:
Madhu Rajanna authored and mergify-bot committed 2022-04-05 13:33:54 +00:00
1 parent 1a5ed03ee5
commit baa2c90568
33 files changed
+1857 -2

No files matched your search

+10 -1
View File
@@ -227,6 +227,15 @@ func (r *ReconcileCephBlockPool) reconcile(request reconcile.Request) (reconcile
// DELETE: the CR was deleted
if !cephBlockPool.GetDeletionTimestamp().IsZero() {
deps, err := cephBlockPoolDependents(r.context, r.clusterInfo, cephBlockPool)
if err != nil {
return reconcile.Result{}, *cephBlockPool, err
}
if !deps.Empty() {
err := reporting.ReportDeletionBlockedDueToDependents(r.opManagerContext, logger, r.client, cephBlockPool, deps)
return opcontroller.WaitForRequeueIfFinalizerBlocked, *cephBlockPool, err
}
reporting.ReportDeletionNotBlockedDueToDependents(r.opManagerContext, logger, r.client, r.recorder, cephBlockPool)
// If the ceph block pool is still in the map, we must remove it during CR deletion
// We must remove it first otherwise the checker will panic since the status/info will be nil
r.cancelMirrorMonitoring(cephBlockPool)
@@ -235,7 +244,7 @@ func (r *ReconcileCephBlockPool) reconcile(request reconcile.Request) (reconcile
logger.Infof("deleting pool %q", cephBlockPool.Name)
poolSpec := cephBlockPool.Spec.ToNamedPoolSpec()
err := deletePool(r.context, clusterInfo, &poolSpec)
err = deletePool(r.context, clusterInfo, &poolSpec)
if err != nil {
return opcontroller.ImmediateRetryResult, *cephBlockPool, errors.Wrapf(err, "failed to delete pool %q. ", cephBlockPool.Name)
}