kubewharf / kubeadmiral

Multi-Cluster Kubernetes Orchestration
Apache License 2.0
658 stars 89 forks source link

fix: delete cluster failed when failed to remove finalizers #329

Closed wy-lucky closed 1 month ago

wy-lucky commented 1 month ago

When connecting to a member cluster using a ServiceAccountToken and removing the member cluster, the steps are as follows:

  1. Obtain the connection credentials from the ServiceAccountToken secret.
  2. Remove the connection credentials from the secret.
  3. Remove the finalizers from the fcluster.

In the event of a failure during the third step, when re-entering the queue, the first step retries to obtain the credentials from the secret. However, since the credentials were already deleted in the second step, the attempt to retrieve the credentials fails. Therefore, in this scenario, a retry is added in the third step to address this issue.