diff --git a/pkg/operator/ceph/cluster/controller.go b/pkg/operator/ceph/cluster/controller.go index d24100fcf..4f1680d98 100644 --- a/pkg/operator/ceph/cluster/controller.go +++ b/pkg/operator/ceph/cluster/controller.go @@ -369,13 +369,10 @@ func (c *ClusterController) requestClusterDelete(cluster *cephv1.CephCluster) (r } // close the goroutines watching the health of the cluster (mons, osds, ceph status) - var isDisabled bool for _, daemon := range monitorDaemonList { - isDisabled = isMonitoringDisabled(daemon, cluster.Spec) - if _, ok := cluster.monitoringChannels[daemon]; ok { - if !isDisabled { - close(cluster.monitoringChannels[daemon].stopChan) - } + if monitoring, ok := cluster.monitoringChannels[daemon]; ok && monitoring.monitoringRunning { + close(cluster.monitoringChannels[daemon].stopChan) + cluster.monitoringChannels[daemon].monitoringRunning = false } } }