Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: increase time to fire NS alert log #1023

Merged
merged 2 commits into from
Jan 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading