mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-10 21:50:05 +00:00
Fixes exited messages when leaderelection lost
This commit is contained in:
@@ -277,7 +277,8 @@ func Run(c *config.CompletedConfig, stopCh <-chan struct{}) error {
|
||||
run(ctx, startSATokenController, initializersFunc)
|
||||
},
|
||||
OnStoppedLeading: func() {
|
||||
klog.Fatalf("leaderelection lost")
|
||||
klog.ErrorS(nil, "leaderelection lost")
|
||||
klog.FlushAndExit(klog.ExitFlushTimeout, 1)
|
||||
},
|
||||
})
|
||||
|
||||
@@ -300,7 +301,8 @@ func Run(c *config.CompletedConfig, stopCh <-chan struct{}) error {
|
||||
run(ctx, nil, createInitializersFunc(leaderMigrator.FilterFunc, leadermigration.ControllerMigrated))
|
||||
},
|
||||
OnStoppedLeading: func() {
|
||||
klog.Fatalf("migration leaderelection lost")
|
||||
klog.ErrorS(nil, "migration leaderelection lost")
|
||||
klog.FlushAndExit(klog.ExitFlushTimeout, 1)
|
||||
},
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user