Enable leader election in the operator

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 <tompantelis@gmail.com>
This commit is contained in:
Tom Pantelis
2024-12-13 01:08:54 -05:00
committed by Thomas Pantelis
parent c0e1ee4c37
commit 0e2e31ae73
2 changed files with 13 additions and 2 deletions
@@ -27,8 +27,8 @@ spec:
name: {{ template "submariner.fullname" . }} name: {{ template "submariner.fullname" . }}
spec: spec:
containers: containers:
- command: - args:
- submariner-operator - --leader-elect
env: env:
- name: WATCH_NAMESPACE - name: WATCH_NAMESPACE
valueFrom: valueFrom:
+11
View File
@@ -87,6 +87,17 @@ rules:
- servicediscoveries/finalizers - servicediscoveries/finalizers
verbs: verbs:
- update - update
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- delete
--- ---
kind: RoleBinding kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1