When a non-leader shuts down, leader election runnables are started #2719
Labels
kind/bug
Categorizes issue or PR as related to a bug.
priority/critical-urgent
Highest priority. Must be actively worked on as someone's top priority right now.
Milestone
Hi folks,
Noticed the following behavior.
When a non-leader manager shuts down, it starts leader election runnables.
In our project, we see the following in the logs
Note that after the start, the contexts passed to leader election runnables is closed shortly after, but there is enough time for those jobs to run. For example, to send an HTTP request.
Looking at the controller runtime code, this behavior occurs because when a runnable group is being StopAndWait, it always calls r.Start.
My understanding of the code is like this:
controller-runtime/pkg/manager/internal.go
Line 521 in 395cfc7
controller-runtime/pkg/manager/runnable_group.go
Line 277 in 395cfc7
I wonder if this behavior is considered a bug.
Used version:
The text was updated successfully, but these errors were encountered: