Skip to content
This repository was archived by the owner on Apr 16, 2024. It is now read-only.

Commit 916e7f8

Browse files
authored
disable leader election by default DK-2475 (#5)
* disable leader election by default * Update README.md * set default false
1 parent 2c4a815 commit 916e7f8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Available env variables:
4747
|-------|-------------| --------|
4848
| `METRICS_ADDR` | The address of the metric endpoint binds to. | `:9556` |
4949
| `PROBE_ADDR` | The address of the probe endpoints binds to. | `:9557` |
50-
| `ENABLE_LEADER_ELECTION` | Enable leader election for controller manager. | `true` |
50+
| `ENABLE_LEADER_ELECTION` | Enable leader election for controller manager. | `false` |
5151
| `LEADER_ELECTION_NAMESPACE` | Change the leader election namespace. This is by default the same where the controller is deployed. | `` |
5252
| `NAMESPACES` | The controller listens by default for all namespaces. This may be limited to a comma delimited list of dedicated namespaces. | `` |
5353
| `CONCURRENT` | The number of concurrent reconcile workers. | `4` |

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ var (
4444
var (
4545
metricsAddr = ":9556"
4646
probesAddr = ":9557"
47-
enableLeaderElection = true
47+
enableLeaderElection = false
4848
leaderElectionNamespace = ""
4949
namespaces = ""
5050
concurrent = 4
@@ -60,7 +60,7 @@ func init() {
6060
func main() {
6161
flag.StringVar(&metricsAddr, "metrics-addr", ":9556", "The address of the metric endpoint binds to.")
6262
flag.StringVar(&probesAddr, "probe-addr", ":9557", "The address of the probe endpoints bind to.")
63-
flag.BoolVar(&enableLeaderElection, "enable-leader-election", true,
63+
flag.BoolVar(&enableLeaderElection, "enable-leader-election", false,
6464
"Enable leader election for controller manager. "+
6565
"Enabling this will ensure there is only one active controller manager.")
6666
flag.StringVar(&leaderElectionNamespace, "leader-election-namespace", "",

0 commit comments

Comments
 (0)