# Copyright Contributors to the Open Cluster Management project

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  labels:
    rbac.authorization.k8s.io/aggregate-to-ocm-cluster-manager-admin: "true"
  name: multicluster-engine:cluster-lifecycle:cluster-manager-admin-aggregate
rules:
- apiGroups: ["cluster.open-cluster-management.io"]
  resources: ["managedclusters", "managedclusters/accept","managedclusters/status", "clustercurators"]
  verbs: ["create","get", "list", "watch", "update", "delete", "deletecollection", "patch"]
- apiGroups: ["cluster.open-cluster-management.io"]
  resources: ["managedclustersets", "managedclustersets/bind","managedclustersets/join","managedclustersets/status","managedclustersetbindings"]
  verbs: ["create","get", "list", "watch", "update", "delete", "deletecollection", "patch"]
- apiGroups: [ "clusterview.open-cluster-management.io" ]
  resources: [ "managedclusters","managedclustersets" ]
  verbs: [ "list","get","watch" ]
- apiGroups: ["addon.open-cluster-management.io"]
  resources: ["managedclusteraddons", "managedclusteraddons/status", "clustermanagementaddons"]
  verbs: ["create", "get", "list", "watch", "update", "delete", "deletecollection", "patch"]
- apiGroups: ["cluster.open-cluster-management.io"]
  resources: ["placements", "placements/status", "placementdecisions", "placementdecisions/status"]
  verbs: ["create","get", "list", "watch", "update", "delete", "deletecollection", "patch"]
- apiGroups: ["cluster.open-cluster-management.io"]
  resources: ["addonplacementscores"]
  verbs: ["create","get", "list", "watch", "update", "delete", "deletecollection", "patch"]
- apiGroups: [ "imageregistry.open-cluster-management.io" ]
  resources: [ "managedclusterimageregistries","managedclusterimageregistries/status" ]
  verbs: ["create", "get", "list", "watch", "update", "delete", "deletecollection", "patch"]
- apiGroups: [ "extensions.hive.openshift.io" ]
  resources: [ "agentclusterinstalls" ]
  verbs: ["create", "get", "list", "watch", "update", "delete", "deletecollection", "patch"]
- apiGroups: ["proxy.open-cluster-management.io"]
  resources: ["managedproxyconfigurations"]
  verbs: ["create","get", "list", "watch", "update", "delete", "deletecollection", "patch"]
