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 {
60
60
// Defaults to true, which means the controller will use leader election.
61
61
NeedLeaderElection * bool
62
62
63
- // EnableWarmup indicates whether the controller needs to use warm up.
63
+ // NeedWarmup indicates whether the controller needs to use warm up.
64
64
// Defaults to false, which means the controller will not use warm up.
65
65
NeedWarmup * bool
66
66
Original file line number Diff line number Diff line change @@ -94,10 +94,11 @@ type TypedOptions[request comparable] struct {
94
94
// Note: This flag is disabled by default until a future version. It's currently in beta.
95
95
UsePriorityQueue * bool
96
96
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.
101
102
NeedWarmup * bool
102
103
}
103
104
Original file line number Diff line number Diff line change @@ -314,9 +314,11 @@ type LeaderElectionRunnable interface {
314
314
NeedLeaderElection () bool
315
315
}
316
316
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.
318
320
type 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 .
320
322
Warmup (context.Context ) error
321
323
}
322
324
You can’t perform that action at this time.
0 commit comments