Skip to content

Commit

Permalink
change alert log for deletion stuck NS from 5 -> 15 mins
Browse files Browse the repository at this point in the history
  • Loading branch information
Arvind Thirumurugan committed Jan 24, 2025
1 parent 9f4a632 commit 19f1cd4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ func (r *Reconciler) handleDelete(ctx context.Context, mc *clusterv1beta1.Member
if !currentNS.DeletionTimestamp.IsZero() {
klog.V(2).InfoS("The member cluster namespace is still being deleted", "memberCluster", mcObjRef, "deleteTimestamp", currentNS.DeletionTimestamp)
var stuckErr error
if time.Now().After(currentNS.DeletionTimestamp.Add(5 * time.Minute)) {
// alert if the namespace is stuck in deleting for more than 5 minutes
if time.Now().After(currentNS.DeletionTimestamp.Add(15 * time.Minute)) {
// alert if the namespace is stuck in deleting for more than 15 minutes
stuckErr = controller.NewUnexpectedBehaviorError(fmt.Errorf("the member cluster namespace %s has been deleting since %s", namespaceName, currentNS.DeletionTimestamp.Format(time.RFC3339)))
}
return runtime.Result{RequeueAfter: time.Second}, stuckErr
Expand Down

0 comments on commit 19f1cd4

Please sign in to comment.