apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: maestro-agent:agent-{{ .Release.Name }}
rules:
- apiGroups:
  - work.open-cluster-management.io
  resources:
  - appliedmanifestworks
  verbs:
  - get
  - list
  - watch
  - create
  - update
  - patch
  - delete
- apiGroups:
  - work.open-cluster-management.io
  resources:
  - appliedmanifestworks/status
  verbs:
  - patch
  - update
- apiGroups:
  - work.open-cluster-management.io
  resources:
  - appliedmanifestworks/finalizers
  verbs:
  - update
- apiGroups:
  - authorization.k8s.io
  resources:
  - subjectaccessreviews
  verbs:
  - create
- apiGroups:
  - ""
  resources:
  - serviceaccounts
  verbs:
  - impersonate
