Skip to content

Commit

Permalink
Change limiter of cr-syncer to ItemFastSlowRateLimieter
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-goetz committed Jan 28, 2021
1 parent 6990b46 commit a9def91
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/go/cmd/cr-syncer/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"log"
"net/http"
"strconv"
"time"

"go.opencensus.io/stats"
"go.opencensus.io/stats/view"
Expand Down Expand Up @@ -171,8 +172,8 @@ func newCRSyncer(
subtree: annotations[annotationStatusSubtree],
upstream: remote.Resource(gvr).Namespace(ns),
downstream: local.Resource(gvr).Namespace(ns),
upstreamQueue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "upstream"),
downstreamQueue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "downstream"),
upstreamQueue: workqueue.NewNamedRateLimitingQueue(workqueue.NewItemFastSlowRateLimiter(time.Millisecond*500, time.Second*5, 5), "upstream"),
downstreamQueue: workqueue.NewNamedRateLimitingQueue(workqueue.NewItemFastSlowRateLimiter(time.Millisecond*500, time.Second*5, 5), "downstream"),
done: make(chan struct{}),
}
switch src := annotations[annotationSpecSource]; src {
Expand Down

0 comments on commit a9def91

Please sign in to comment.