We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7fa750f commit c034f1fCopy full SHA for c034f1f
pkg/manager/internal.go
@@ -162,6 +162,9 @@ func (cm *controllerManager) Start(stop <-chan struct{}) error {
162
Callbacks: leaderelection.LeaderCallbacks{
163
OnStartedLeading: cm.start,
164
OnStoppedLeading: func() {
165
+ // Most implementations of leader election log.Fatal() here.
166
+ // Since Start is wrapped in log.Fatal when called, we can just return
167
+ // an error here which will cause the program to exit.
168
cm.errChan <- fmt.Errorf("leader election lost")
169
},
170
0 commit comments