Merge pull request #630 from just1900/master

remove health data explicitly when a cluster is being deleted
This commit is contained in:
karmada-bot 2021-08-25 10:01:42 +08:00 committed by GitHub
commit 2cfab7b24d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)
}