# Copyright Contributors to the Open Cluster Management project

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  labels:
    rbac.authorization.k8s.io/aggregate-to-admin: "true"
    rbac.authorization.k8s.io/aggregate-to-ocm-cluster-manager-admin: "true"
  name: multicluster-engine:cluster-lifecycle:admin-aggregate
rules:
- apiGroups: ["cluster.open-cluster-management.io"]
  resources: ["managedclusters", "managedclusters/status"]
  verbs: ["get", "list", "watch", "update","delete", "deletecollection", "patch"]
- apiGroups: ["cluster.open-cluster-management.io"]
  resources: ["managedclustersets"]
  verbs: ["get", "list", "watch", "update", "patch"]
- apiGroups: ["cluster.open-cluster-management.io"]
  resources: ["clustercurators"]
  verbs: ["create", "get", "list", "watch", "update","delete", "deletecollection", "patch"]
- apiGroups: ["work.open-cluster-management.io"]
  resources: ["manifestworks", "manifestworks/status"]
  verbs: ["create", "get", "list", "watch", "update", "delete", "deletecollection", "patch"]
- apiGroups: ["action.open-cluster-management.io"]
  resources: ["managedclusteractions", "managedclusteractions/status"]
  verbs: ["create", "get", "list", "watch", "update", "delete", "deletecollection", "patch"]
- apiGroups: ["view.open-cluster-management.io"]
  resources: ["managedclusterviews", "managedclusterviews/status"]
  verbs: ["create", "get", "list", "watch", "update", "delete", "deletecollection", "patch"]
- apiGroups: ["internal.open-cluster-management.io"]
  resources: ["managedclusterinfos", "managedclusterinfos/status"]
  verbs: ["create", "get", "list", "watch", "update", "delete", "deletecollection", "patch"]
- apiGroups: ["hive.openshift.io"]
  resources: ["clusterdeployments", "clusterpools", "clusterclaims", "machinepools"]
  verbs: ["create", "get", "list", "watch", "update", "delete", "deletecollection", "patch"]
- apiGroups: ["config.openshift.io"]
  resources: ["clusterversions"]
  verbs: ["create", "get", "list", "watch", "update", "delete", "deletecollection", "patch"]
- apiGroups: ["inventory.open-cluster-management.io"]
  resources: ["baremetalassets"]
  verbs: ["create", "get", "list", "watch", "update", "delete", "deletecollection", "patch"]
- apiGroups: ["proxy.open-cluster-management.io"]
  resources: ["clusterstatuses/log"]
  verbs: ["get"]
- apiGroups: ["addon.open-cluster-management.io"]
  resources: ["managedclusteraddons","managedclusteraddons/status"]
  verbs: ["create", "get", "list", "watch", "update", "delete", "deletecollection", "patch"]
- apiGroups: ["addon.open-cluster-management.io"]
  resources: ["clustermanagementaddons"]
  verbs: ["get", "list", "watch"]
- apiGroups: ["clusterview.open-cluster-management.io"]
  resources: ["managedclusters","managedclustersets"]
  verbs: ["list","get","watch"]
- apiGroups: ["cluster.open-cluster-management.io"]
  resources: ["managedclustersetbindings"]
  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"]
