Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Tune leader election#69

Merged
mhmxs merged 2 commits intomainfrom
tune-leader-election
Jun 7, 2022
Merged

Tune leader election#69
mhmxs merged 2 commits intomainfrom
tune-leader-election

Conversation

@mhmxs
Copy link
Contributor

@mhmxs mhmxs commented Jun 3, 2022

Increase timeout, we have one instance at a time, so we don't have to renew the leader in every 5 seconds.
Removal of legacy multi-lock to lease lock only.
Command-line flag to set renewal seconds.

@mhmxs mhmxs requested a review from a team June 3, 2022 05:59
main.go Outdated
LeaderElectionID: "storageos-portal-manager-leader",
Scheme: scheme,
LeaderElectionID: "storageos-portal-manager-leader",
LeaderElectionResourceLock: "leases",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I believe you can use the constant k8s.io/client-go/tools/leaderelection/resourcelock. LeasesResourceLock

@mhmxs mhmxs merged commit 69ca74d into main Jun 7, 2022
@mhmxs mhmxs deleted the tune-leader-election branch June 7, 2022 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants