leader election needs to operate configmaps and leases (#261)

Signed-off-by: haoqing0110 <qhao@redhat.com>
This commit is contained in:
Qing Hao
2022-07-06 00:10:11 +08:00
committed by GitHub
parent f758ff586c
commit 84012648dc

View File

@@ -6,6 +6,14 @@ metadata:
name: open-cluster-management:registration-agent
namespace: open-cluster-management-agent
rules:
# leader election needs to operate configmaps and leases
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "list", "watch", "create", "delete", "update", "patch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["create", "get", "list", "update", "watch", "patch"]
# create hub-kubeconfig and external-managed-registration/work secrets
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list", "watch", "create", "delete", "update", "patch"]