apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: open-cluster-management:policy-framework-hub
rules:
# Rules for maintaining the lease on the hub
- apiGroups:
  - coordination.k8s.io
  resources:
  - leases
  resourceNames:
  - policy-framework
  verbs:
  - get
  - list
  - patch
  - update
  - watch
- apiGroups:
  - coordination.k8s.io
  resources:
  - leases
  verbs:
  - create
# Rules for synchronizing policies
- apiGroups:
  - policy.open-cluster-management.io
  resources:
  - policies
  verbs:
  - create
  - delete
  - get
  - list
  - patch
  - update
  - watch
- apiGroups:
  - policy.open-cluster-management.io
  resources:
  - policies/finalizers
  verbs:
  - update
- apiGroups:
  - policy.open-cluster-management.io
  resources:
  - policies/status
  verbs:
  - get
  - patch
  - update
