feat: migrate leaderelection lock to leases (#8733)

* feat: migrate leaderelection lock to leases

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>

* Update RBAC

Co-authored-by: Shafeeque E S <shafeeque.e.s@sap.com>
This commit is contained in:
Jintao Zhang 2022-07-09 20:37:46 +08:00 committed by GitHub
parent e1a16f6e74
commit cf4dca8e43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 40 additions and 6 deletions

View file

@ -29,6 +29,13 @@ rules:
verbs:
- list
- watch
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- list
- watch
{{- if and .Values.controller.scope.enabled .Values.controller.scope.namespace }}
- apiGroups:
- ""

View file

@ -73,6 +73,21 @@ rules:
- configmaps
verbs:
- create
- apiGroups:
- coordination.k8s.io
resources:
- leases
resourceNames:
- {{ .Values.controller.electionID }}
verbs:
- get
- update
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- create
- apiGroups:
- ""
resources: