Skip to content

Commit

Permalink
Enable leader election in the operator
Browse files Browse the repository at this point in the history
The operator no longer runs leader-for-life election so enable
leader-with-lease via the CLI arg in the pod spec.

Signed-off-by: Tom Pantelis <[email protected]>
  • Loading branch information
tpantelis committed Dec 13, 2024
1 parent c0e1ee4 commit 0e2e31a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions submariner-operator/templates/operator-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ spec:
name: {{ template "submariner.fullname" . }}
spec:
containers:
- command:
- submariner-operator
- args:
- --leader-elect
env:
- name: WATCH_NAMESPACE
valueFrom:
Expand Down
11 changes: 11 additions & 0 deletions submariner-operator/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,17 @@ rules:
- servicediscoveries/finalizers
verbs:
- update
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- delete
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
Expand Down

0 comments on commit 0e2e31a

Please sign in to comment.