Skip to content

Commit 4492185

Browse files
committed
update: Update 2 non-requeue log messages
Update the messages in cluster_controller.go to be consistent with the empty Result returned. Signed-off-by: Lin Lin <[email protected]>
1 parent 401521b commit 4492185

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

internal/controllers/cluster/cluster_controller.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,9 @@ func (r *Reconciler) reconcileDelete(ctx context.Context, s *scope) (reconcile.R
454454
s.deletingReason = clusterv1.ClusterDeletingWaitingForControlPlaneDeletionV1Beta2Reason
455455
s.deletingMessage = fmt.Sprintf("Waiting for %s to be deleted", cluster.Spec.ControlPlaneRef.Kind)
456456

457-
log.Info("Cluster still has descendants - need to requeue", "controlPlaneRef", cluster.Spec.ControlPlaneRef.Name)
457+
// We are watching it, will try again when it is deleted.
458+
ref := cluster.Spec.ControlPlaneRef
459+
log.Info("Cluster still has descendants - waiting for control plane deletion", ref.Kind, klog.KRef(ref.Namespace, ref.Name))
458460
return ctrl.Result{}, nil
459461
}
460462
}
@@ -492,7 +494,9 @@ func (r *Reconciler) reconcileDelete(ctx context.Context, s *scope) (reconcile.R
492494
s.deletingReason = clusterv1.ClusterDeletingWaitingForInfrastructureDeletionV1Beta2Reason
493495
s.deletingMessage = fmt.Sprintf("Waiting for %s to be deleted", cluster.Spec.InfrastructureRef.Kind)
494496

495-
log.Info("Cluster still has descendants - need to requeue", "infrastructureRef", cluster.Spec.InfrastructureRef.Name)
497+
// We are watching it, will try again when it is deleted.
498+
ref := cluster.Spec.InfrastructureRef
499+
log.Info("Cluster still has descendants - waiting for infrastructure cluster deletion", ref.Kind, klog.KRef(ref.Namespace, ref.Name))
496500
return ctrl.Result{}, nil
497501
}
498502
}

0 commit comments

Comments
 (0)