Skip to content

Commit

Permalink
chore: increase time to fire NS alert log (#1023)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arvindthiru authored Jan 27, 2025
1 parent 3093c91 commit b1b25d8
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ 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
stuckErr = controller.NewUnexpectedBehaviorError(fmt.Errorf("the member cluster namespace %s has been deleting since %s", namespaceName, currentNS.DeletionTimestamp.Format(time.RFC3339)))
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("failed to delete the member cluster namespace %s, it has been deleting since %s", namespaceName, currentNS.DeletionTimestamp.Format(time.RFC3339)))
}
return runtime.Result{RequeueAfter: time.Second}, stuckErr
}
Expand Down

0 comments on commit b1b25d8

Please sign in to comment.