Skip to content

How to lower resource consumption on startup #4806

Discussion options

You must be logged in to vote

I think you need to do something like

lim := workqueue.NewMaxOfRateLimiter(
  workqueue.NewItemExponentialFailureRateLimiter(15*time.Second, 100*time.Second),
  workqueue.NewBucketRateLimiter(10, 100),
)

ctrl.NewControllerManagedBy(mgr).
  For(&myv1.MyKind{}).
  WithOptions(controller.Options{
    RateLimiter:             lim,
    MaxConcurrentReconciles: 1,
  }).
  Complete(myReconciler)

Give a look at: https://github.com/search?q=repo%3Akubernetes-sigs%2Fcontroller-runtime+RateLimiter&type=code

I hope that helps out

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by camilamacedo86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
2 participants