Skip to content

Commit

Permalink
Support HA for the endpoints controller
Browse files Browse the repository at this point in the history
- The controller manager allows for multiple instances of the controller
  to run using leader election. By configuring leader election, one of
the instances of the controller (the leader) will run the
reconciler. All instances can serve the webhook though, but only on of
the instances will inject the containers per request.

This requires additional priveleges from an RBAC perspective that will
be a part of a helm commit.
  • Loading branch information
Ashwin Venkatesh committed Apr 8, 2021
1 parent ecf4c2e commit e638afb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion subcommand/inject-connect/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,8 @@ func (c *Command) Run(args []string) int {

mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
LeaderElection: false,
LeaderElection: true,
LeaderElectionID: "consul-controller-lock",
Host: listenSplits[0],
Port: port,
Logger: zapLogger,
Expand Down

0 comments on commit e638afb

Please sign in to comment.