Skip to content

Commit

Permalink
Add HA support to endpoints controller (#479)
Browse files Browse the repository at this point in the history
* Support HA for the endpoints controller

- 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 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
thisisnotashwin authored Apr 8, 2021
1 parent a3dd749 commit 2d8fb8c
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 2d8fb8c

Please sign in to comment.