fix(fencing): change mdb controller to use namespace for checking status

This commit changed mdb controller to make use of cephCluster's namespace instead of cephCluster's name for checking the ceph health as the ceph config is located in the cephCluster's namespace folder which can makes mdb controller fail when rook operator is deployed in any other namespace apart from rook-ceph.

Signed-off-by: Ashish Ranjan <aranjan@redhat.com>
This commit is contained in:
Ashish Ranjan committed 2019-09-17 11:46:54 +05:30
1 parent ceec3accf1
commit c4ee336fe0
1 file changed
+1 -1
@@ -129,7 +129,7 @@ func (r *MachineDisruptionReconciler) reconcile(request reconcile.Request) (reco
mdb.Spec.MaxUnavailable = &maxUnavailable
}
// Check if the cluster is clean or not
_, isClean, err := cephClient.IsClusterClean(r.context.ClusterdContext, request.Name)
_, isClean, err := cephClient.IsClusterClean(r.context.ClusterdContext, request.Namespace)
if err != nil {
maxUnavailable := int32(0)
mdb.Spec.MaxUnavailable = &maxUnavailable