Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #39 from everpeace/dont-use-api-directly-in-reconc…
Browse files Browse the repository at this point in the history
…iler

Fix: reconciliation loop is heavily throttled in a large cluster
  • Loading branch information
everpeace authored Oct 18, 2021
2 parents e6fda14 + 961b9f6 commit 211b034
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/controllers/clusterthrottle_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (c *ClusterThrottleController) reconcile(key string) error {
return err
}

thr, err := c.scheduleClientset.ScheduleV1alpha1().ClusterThrottles().Get(ctx, name, metav1.GetOptions{})
thr, err := c.clusterthrottleInformer.Lister().Get(name)
if err != nil {
if apierrors.IsNotFound(err) {
return nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/throttle_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (c *ThrottleController) reconcile(key string) error {
return err
}

thr, err := c.scheduleClientset.ScheduleV1alpha1().Throttles(namespace).Get(ctx, name, metav1.GetOptions{})
thr, err := c.throttleInformer.Lister().Throttles(namespace).Get(name)
if err != nil {
if apierrors.IsNotFound(err) {
return nil
Expand Down

0 comments on commit 211b034

Please sign in to comment.