Skip to content

Commit

Permalink
Merge pull request #281 from odvarkadaniel/release-leader-election
Browse files Browse the repository at this point in the history
OCPBUGS-18278: Address long acquire times during upgrade
  • Loading branch information
openshift-merge-robot committed Sep 6, 2023
2 parents b57f5a9 + 371f9b1 commit 67a8bf1
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions pkg/operator/operator.go
Expand Up @@ -48,14 +48,15 @@ func New(cfg *Config) (*Operator, error) {

// Create the controller-manager.
managerOptions := manager.Options{
Namespace: cfg.WatchNamespace,
LeaderElection: cfg.LeaderElection,
LeaderElectionNamespace: cfg.LeaderElectionNamespace,
LeaderElectionID: cfg.LeaderElectionID,
LeaseDuration: &le.LeaseDuration.Duration,
RenewDeadline: &le.RenewDeadline.Duration,
RetryPeriod: &le.RetryPeriod.Duration,
MetricsBindAddress: fmt.Sprintf("127.0.0.1:%d", cfg.MetricsPort),
Namespace: cfg.WatchNamespace,
LeaderElection: cfg.LeaderElection,
LeaderElectionNamespace: cfg.LeaderElectionNamespace,
LeaderElectionID: cfg.LeaderElectionID,
LeaderElectionReleaseOnCancel: true,
LeaseDuration: &le.LeaseDuration.Duration,
RenewDeadline: &le.RenewDeadline.Duration,
RetryPeriod: &le.RetryPeriod.Duration,
MetricsBindAddress: fmt.Sprintf("127.0.0.1:%d", cfg.MetricsPort),
}

operator.manager, err = manager.New(clientConfig, managerOptions)
Expand Down

0 comments on commit 67a8bf1

Please sign in to comment.