Skip to content

Commit

Permalink
chore: Reduce log spam from garbage collection (#396)
Browse files Browse the repository at this point in the history
* Use loopback address to call knative readiness/liveness internally

* Reduce log spam from garbage collection
  • Loading branch information
jonathan-innis authored Jul 3, 2023
1 parent a11d05d commit 73d8b25
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 73d8b25

Please sign in to comment.