File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ type Controller struct {
6060 // Defaults to true, which means the controller will use leader election.
6161 NeedLeaderElection * bool
6262
63- // EnableWarmup indicates whether the controller needs to use warm up.
63+ // NeedWarmup indicates whether the controller needs to use warm up.
6464 // Defaults to false, which means the controller will not use warm up.
6565 NeedWarmup * bool
6666
Original file line number Diff line number Diff line change @@ -94,10 +94,11 @@ type TypedOptions[request comparable] struct {
9494 // Note: This flag is disabled by default until a future version. It's currently in beta.
9595 UsePriorityQueue * bool
9696
97- // NeedWarmup specifies whether the controller should start its sources
98- // when the manager is not the leader.
99- // Defaults to false, which means that the controller will wait for leader election to start
100- // before starting sources.
97+ // NeedWarmup specifies whether the controller should start its sources when the manager is not
98+ // the leader. When set to true, the controller will not restart its sources when/if it
99+ // transitions to be leader.
100+ //
101+ // Defaults to false.
101102 NeedWarmup * bool
102103}
103104
Original file line number Diff line number Diff line change @@ -314,9 +314,11 @@ type LeaderElectionRunnable interface {
314314 NeedLeaderElection () bool
315315}
316316
317- // WarmupRunnable knows if a Runnable should be a warmup runnable.
317+ // WarmupRunnable knows if a Runnable should be a warmup runnable. A warmup runnable is a runnable
318+ // that should be run when the manager is started, but before the leader election is acquired.
319+ // The expectation is that it will block startup until the warmup runnables have completed.
318320type WarmupRunnable interface {
319- // Warmup returns true if the Runnable should be run as warmup .
321+ // Warmup is called when the manager is started, but before the leader election is acquired .
320322 Warmup (context.Context ) error
321323}
322324
You can’t perform that action at this time.
0 commit comments