Skip to content

Commit

Permalink
fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
britaniar committed Mar 15, 2024
1 parent 25352af commit 50cbb19
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/hubagent/workload/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func SetupControllers(ctx context.Context, wg *sync.WaitGroup, mgr ctrl.Manager,
if err := (&rollout.Reconciler{
Client: mgr.GetClient(),
UncachedReader: mgr.GetAPIReader(),
MaxConcurrentReconciles: int(math.Ceil(float64(opts.MaxFleetSizeSupported)/30) * math.Ceil(float64(opts.ConcurrentClusterPlacementSyncs)/10)),
MaxConcurrentReconciles: int(math.Ceil(float64(opts.MaxFleetSizeSupported)/30) * math.Ceil(float64(opts.MaxConcurrentClusterPlacement)/10)),
}).SetupWithManager(mgr); err != nil {
klog.ErrorS(err, "Unable to set up rollout controller")
return err
Expand All @@ -217,7 +217,7 @@ func SetupControllers(ctx context.Context, wg *sync.WaitGroup, mgr ctrl.Manager,
klog.Info("Setting up work generator")
if err := (&workgenerator.Reconciler{
Client: mgr.GetClient(),
MaxConcurrentReconciles: int(math.Ceil(float64(opts.MaxFleetSizeSupported)/10) * math.Ceil(float64(opts.ConcurrentClusterPlacementSyncs)/10)),
MaxConcurrentReconciles: int(math.Ceil(float64(opts.MaxFleetSizeSupported)/10) * math.Ceil(float64(opts.MaxConcurrentClusterPlacement)/10)),
}).SetupWithManager(mgr); err != nil {
klog.ErrorS(err, "Unable to set up work generator")
return err
Expand All @@ -232,7 +232,7 @@ func SetupControllers(ctx context.Context, wg *sync.WaitGroup, mgr ctrl.Manager,
)
// we use one scheduler for every 10 concurrent placement
defaultScheduler := scheduler.NewScheduler("DefaultScheduler", defaultFramework, defaultSchedulingQueue, mgr,
int(math.Ceil(float64(opts.MaxFleetSizeSupported)/50)*math.Ceil(float64(opts.ConcurrentClusterPlacementSyncs)/10)))
int(math.Ceil(float64(opts.MaxFleetSizeSupported)/50)*math.Ceil(float64(opts.MaxConcurrentClusterPlacement)/10)))
klog.Info("Starting the scheduler")
// Scheduler must run in a separate goroutine as Run() is a blocking call.
wg.Add(1)
Expand Down Expand Up @@ -286,7 +286,7 @@ func SetupControllers(ctx context.Context, wg *sync.WaitGroup, mgr ctrl.Manager,
InformerManager: dynamicInformerManager,
ResourceConfig: resourceConfig,
SkippedNamespaces: skippedNamespaces,
ConcurrentClusterPlacementWorker: int(math.Ceil(float64(MaxConcurrentClusterPlacement) / 10)),
ConcurrentClusterPlacementWorker: int(math.Ceil(float64(opts.MaxConcurrentClusterPlacement) / 10)),
ConcurrentResourceChangeWorker: opts.ConcurrentResourceChangeSyncs,
}

Expand Down

0 comments on commit 50cbb19

Please sign in to comment.