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

Commit

Permalink
Add ratelimiter to boshdeployment controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario Manno committed May 25, 2021
1 parent f7abba5 commit b052aab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/kube/controllers/boshdeployment/bpm_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"code.cloudfoundry.org/quarks-utils/pkg/meltdown"
"code.cloudfoundry.org/quarks-utils/pkg/monitorednamespace"
"code.cloudfoundry.org/quarks-utils/pkg/names"
"code.cloudfoundry.org/quarks-utils/pkg/ratelimiter"
vss "code.cloudfoundry.org/quarks-utils/pkg/versionedsecretstore"
)

Expand All @@ -43,6 +44,7 @@ func AddBPM(ctx context.Context, config *config.Config, mgr manager.Manager) err
c, err := controller.New("bpm-controller", mgr, controller.Options{
Reconciler: r,
MaxConcurrentReconciles: config.MaxBoshDeploymentWorkers,
RateLimiter: ratelimiter.New(),
})
if err != nil {
return errors.Wrap(err, "Adding BPM controller to manager failed.")
Expand Down
2 changes: 2 additions & 0 deletions pkg/kube/controllers/boshdeployment/deployment_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"code.cloudfoundry.org/quarks-utils/pkg/config"
"code.cloudfoundry.org/quarks-utils/pkg/ctxlog"
"code.cloudfoundry.org/quarks-utils/pkg/monitorednamespace"
"code.cloudfoundry.org/quarks-utils/pkg/ratelimiter"
"code.cloudfoundry.org/quarks-utils/pkg/skip"
)

Expand All @@ -51,6 +52,7 @@ func AddDeployment(ctx context.Context, config *config.Config, mgr manager.Manag
c, err := controller.New("boshdeployment-controller", mgr, controller.Options{
Reconciler: r,
MaxConcurrentReconciles: config.MaxBoshDeploymentWorkers,
RateLimiter: ratelimiter.New(),
})
if err != nil {
return errors.Wrap(err, "Adding Bosh deployment controller to manager failed.")
Expand Down
2 changes: 2 additions & 0 deletions pkg/kube/controllers/boshdeployment/withops_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"code.cloudfoundry.org/quarks-utils/pkg/ctxlog"
"code.cloudfoundry.org/quarks-utils/pkg/monitorednamespace"
"code.cloudfoundry.org/quarks-utils/pkg/names"
"code.cloudfoundry.org/quarks-utils/pkg/ratelimiter"
"code.cloudfoundry.org/quarks-utils/pkg/skip"
)

Expand All @@ -50,6 +51,7 @@ func AddWithOps(ctx context.Context, config *config.Config, mgr manager.Manager)
c, err := controller.New("withops-controller", mgr, controller.Options{
Reconciler: r,
MaxConcurrentReconciles: config.MaxBoshDeploymentWorkers,
RateLimiter: ratelimiter.New(),
})
if err != nil {
return errors.Wrap(err, "Adding withops controller to manager failed.")
Expand Down

0 comments on commit b052aab

Please sign in to comment.