Skip to content

Commit

Permalink
Revert "Release leader election on manager exit (openshift#773)" (ope…
Browse files Browse the repository at this point in the history
…nshift#797)

This reverts commit 8f21a27.
  • Loading branch information
sdodson committed Sep 19, 2023
1 parent 8f21a27 commit c2ba801
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions cmd/cluster-node-tuning-operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,15 @@ func operatorRun() {
restConfig := ctrl.GetConfigOrDie()
le := util.GetLeaderElectionConfig(restConfig, enableLeaderElection)
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
NewCache: cache.MultiNamespacedCacheBuilder(namespaces),
Scheme: scheme,
LeaderElection: true,
LeaderElectionID: config.OperatorLockName,
LeaderElectionNamespace: ntoNamespace,
LeaderElectionReleaseOnCancel: true,
LeaseDuration: &le.LeaseDuration.Duration,
RetryPeriod: &le.RetryPeriod.Duration,
RenewDeadline: &le.RenewDeadline.Duration,
Namespace: ntoNamespace,
NewCache: cache.MultiNamespacedCacheBuilder(namespaces),
Scheme: scheme,
LeaderElection: true,
LeaderElectionID: config.OperatorLockName,
LeaderElectionNamespace: ntoNamespace,
LeaseDuration: &le.LeaseDuration.Duration,
RetryPeriod: &le.RetryPeriod.Duration,
RenewDeadline: &le.RenewDeadline.Duration,
Namespace: ntoNamespace,
})

if err != nil {
Expand Down

0 comments on commit c2ba801

Please sign in to comment.