diff --git a/pkg/hub/lease/controller.go b/pkg/hub/lease/controller.go index 20f846890..2d074e577 100644 --- a/pkg/hub/lease/controller.go +++ b/pkg/hub/lease/controller.go @@ -108,11 +108,10 @@ func (c *leaseController) sync(ctx context.Context, syncCtx factory.SyncContext) // the lease is not constantly updated, update it to unknown conditionUpdateFn := helpers.UpdateManagedClusterConditionFn(metav1.Condition{ - Type: clusterv1.ManagedClusterConditionAvailable, - Status: metav1.ConditionUnknown, - Reason: "ManagedClusterLeaseUpdateStopped", - Message: fmt.Sprintf("Registration agent stopped updating its lease within %.0f minutes.", - now.Sub(observedLease.Spec.RenewTime.Time).Minutes()), + Type: clusterv1.ManagedClusterConditionAvailable, + Status: metav1.ConditionUnknown, + Reason: "ManagedClusterLeaseUpdateStopped", + Message: fmt.Sprintf("Registration agent stopped updating its lease."), }) _, updated, err := helpers.UpdateManagedClusterStatus(ctx, c.clusterClient, cluster.Name, conditionUpdateFn) if err != nil { diff --git a/pkg/hub/lease/controller_test.go b/pkg/hub/lease/controller_test.go index e38b45456..b26329940 100644 --- a/pkg/hub/lease/controller_test.go +++ b/pkg/hub/lease/controller_test.go @@ -53,7 +53,7 @@ func TestSync(t *testing.T) { Type: clusterv1.ManagedClusterConditionAvailable, Status: metav1.ConditionUnknown, Reason: "ManagedClusterLeaseUpdateStopped", - Message: "Registration agent stopped updating its lease within 5 minutes.", + Message: "Registration agent stopped updating its lease.", } testinghelpers.AssertActions(t, clusterActions, "get", "update") actual := clusterActions[1].(clienttesting.UpdateActionImpl).Object