feat(cluster): remove health data explicitly when a cluster is being deleted

Signed-off-by: just1900 <legendj228@gmail.com>
This commit is contained in:
just1900 2021-08-20 13:36:50 +08:00
parent c37bedc1cf
commit 9b0050c800
1 changed files with 3 additions and 0 deletions

View File

@ -139,6 +139,9 @@ func (c *Controller) removeCluster(cluster *v1alpha1.Cluster) (controllerruntime
return controllerruntime.Result{Requeue: true}, fmt.Errorf("requeuing operation until the execution space %v deleted, ", cluster.Name)
}
// delete the health data from the map explicitly after we removing the cluster.
c.clusterHealthMap.Delete(cluster.Name)
return c.removeFinalizer(cluster)
}