Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyelei committed Sep 20, 2024
1 parent 04cc902 commit 605f641
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controllers/operations/opsrequest_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ func (r *OpsRequestReconciler) handleDeletion(reqCtx intctrlutil.RequestCtx, ops
return nil, nil
}
if opsRes.Cluster.IsDeleting() && opsRes.OpsRequest.DeletionTimestamp.IsZero() {
// delete the ops when the cluster is Deleting but opsRequest is not deleted.
// cluster will always be deleting if temporary pods created by opsRequest mount the instance's PVC.
// so we should delete the ops when the cluster is Deleting.
if err := r.Client.Delete(reqCtx.Ctx, opsRes.OpsRequest); err != nil {
return intctrlutil.ResultToP(intctrlutil.CheckedRequeueWithError(err, reqCtx.Log, ""))
}
Expand Down

0 comments on commit 605f641

Please sign in to comment.