From 1f575c2dcd2ac458a06bd453100daca996298a13 Mon Sep 17 00:00:00 2001 From: Lionel Villard Date: Mon, 9 Nov 2020 09:24:09 -0500 Subject: [PATCH] disable leader election (#173) (#1663) --- kafka/channel/cmd/channel_dispatcher/main.go | 3 +++ .../channel/config/roles/dispatcher-clusterrole.yaml | 11 ----------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/kafka/channel/cmd/channel_dispatcher/main.go b/kafka/channel/cmd/channel_dispatcher/main.go index d74869935d..1808d922ef 100644 --- a/kafka/channel/cmd/channel_dispatcher/main.go +++ b/kafka/channel/cmd/channel_dispatcher/main.go @@ -35,5 +35,8 @@ func main() { ctx = injection.WithNamespaceScope(ctx, ns) } + // Do not run the dispatcher in leader-election mode + ctx = sharedmain.WithHADisabled(ctx) + sharedmain.MainWithContext(ctx, component, controller.NewController) } diff --git a/kafka/channel/config/roles/dispatcher-clusterrole.yaml b/kafka/channel/config/roles/dispatcher-clusterrole.yaml index 2d2fd231bf..bfe23095cc 100644 --- a/kafka/channel/config/roles/dispatcher-clusterrole.yaml +++ b/kafka/channel/config/roles/dispatcher-clusterrole.yaml @@ -68,14 +68,3 @@ rules: verbs: - create - patch - - apiGroups: - - "coordination.k8s.io" - resources: - - leases - verbs: - - get - - list - - watch - - create - - patch - - update