Skip to content

Commit

Permalink
🐛 Use leader config for election events
Browse files Browse the repository at this point in the history
Fixes: #1798

Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
  • Loading branch information
JustinKuli committed Feb 14, 2022
1 parent 273e608 commit 84bd552
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/manager/manager.go
Expand Up @@ -339,7 +339,13 @@ func New(config *rest.Config, options Options) (Manager, error) {
if leaderConfig == nil {
leaderConfig = rest.CopyConfig(config)
}
resourceLock, err := options.newResourceLock(leaderConfig, recorderProvider, leaderelection.Options{

leaderRecorderProvider, err := options.newRecorderProvider(leaderConfig, cluster.GetScheme(), options.Logger.WithName("events"), options.makeBroadcaster)
if err != nil {
return nil, err
}

resourceLock, err := options.newResourceLock(leaderConfig, leaderRecorderProvider, leaderelection.Options{
LeaderElection: options.LeaderElection,
LeaderElectionResourceLock: options.LeaderElectionResourceLock,
LeaderElectionID: options.LeaderElectionID,
Expand Down

0 comments on commit 84bd552

Please sign in to comment.