Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd: re-introduce --enable-leader-election #36

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ func main() {
var (
metricsAddr string
pprofAddr string
leaderElect bool
enableLeaderElection bool
probeAddr string
namespace string
Expand All @@ -61,9 +62,11 @@ func main() {
flag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.")
flag.StringVar(&pprofAddr, "pprof-addr", ":6060", "The address the pprof endpoint binds to.")
flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
flag.BoolVar(&enableLeaderElection, "leader-elect", false,
flag.BoolVar(&leaderElect, "leader-elect", false,
"Enable leader election for controller manager. "+
"Enabling this will ensure there is only one active controller manager.")
flag.BoolVar(&enableLeaderElection, "enable-leader-election", false,
"Old name for -leader-elect provided for backward compatibility.")
flag.StringVar(&namespace, "namespace", "hbase", "The namespace to watch for resource definitions.")
flag.StringVar(&zkQuorum, "zkquorum", "localhost:2181",
"Comma-separated list of zookeeper addresses.")
Expand Down Expand Up @@ -93,7 +96,7 @@ func main() {
},
HealthProbeBindAddress: probeAddr,
PprofBindAddress: pprofAddr,
LeaderElection: enableLeaderElection,
LeaderElection: leaderElect || enableLeaderElection,
LeaderElectionID: "52ea4f9c.elenskiy.co",
// LeaderElectionReleaseOnCancel defines if the leader should step down voluntarily
// when the Manager ends. This requires the binary to immediately end when the
Expand Down
Loading