Skip to content

Commit

Permalink
Reduce log spam from garbage collection
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis committed Jul 3, 2023
1 parent a11d05d commit bacfa54
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/controllers/machine/garbagecollection/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ func (c *Controller) Reconcile(ctx context.Context, _ reconcile.Request) (reconc
})...)
machines := lo.Filter(lo.ToSlicePtr(machineList.Items), func(m *v1alpha5.Machine, _ int) bool {
return m.StatusConditions().GetCondition(v1alpha5.MachineLaunched).IsTrue() &&
m.DeletionTimestamp.IsZero() &&
c.clock.Since(m.StatusConditions().GetCondition(v1alpha5.MachineLaunched).LastTransitionTime.Inner.Time) > time.Second*10 &&
!cloudProviderProviderIDs.Has(m.Status.ProviderID)
})
Expand Down

0 comments on commit bacfa54

Please sign in to comment.