# 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: open-cluster-management: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: ["discovery.open-cluster-management.io"]
  resources: ["discoveryconfigs", "discoveredclusters"]
  verbs: ["create","get", "list", "watch", "update", "delete", "deletecollection", "patch"]
- apiGroups: [""]
  resources: ["namespaces"]
  verbs: ["create","get", "list", "watch", "update", "delete", "deletecollection", "patch"]
- apiGroups: ["certificates.k8s.io"]
  resources: ["certificatesigningrequests"]
  verbs: ["create","get", "list", "watch"]
- apiGroups: ["certificates.k8s.io"]
  resources: ["certificatesigningrequests/approval"]
  verbs: ["update"]
- apiGroups: ["certificates.k8s.io"]
  resources: ["signers"]
  verbs: ["approve"]
- apiGroups: ["register.open-cluster-management.io"]
  resources: ["managedclusters/accept"]
  verbs: ["update"]
- apiGroups: [""]
  resources: ["configmaps","endpoints","secrets","serviceaccounts","services","pods","pods/log"]
  verbs: ["create", "get", "list", "watch", "update", "delete", "deletecollection", "patch"]
- apiGroups: ["apps"]
  resources: ["daemonsets","deployments","replicasets","statefulsets"]
  verbs: ["create","get", "list", "watch", "update", "delete", "deletecollection", "patch"]
- apiGroups: ["rbac.authorization.k8s.io"]
  resources: ["clusterroles","clusterrolebindings","roles","rolebindings"]
  verbs: ["create","get", "list", "watch", "update", "delete", "deletecollection", "patch"]
- apiGroups: ["observability.open-cluster-management.io"]
  resources: ["multiclusterobservabilities", "multiclusterobservabilities/status"]
  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: ["search.open-cluster-management.io"]
  resources: ["searchcustomizations"]
  verbs: ["create","get", "list", "watch", "update", "delete", "deletecollection", "patch"]
- apiGroups: [ "clusterview.open-cluster-management.io" ]
  resources: [ "managedclusters","managedclustersets" ]
  verbs: [ "list","get","watch" ]
- apiGroups: ["wgpolicyk8s.io"]
  resources: ["policyreports"]
  verbs: ["get", "list", "watch"]
- apiGroups: ["submarineraddon.open-cluster-management.io"]
  resources: ["submarinerconfigs", "submarinerconfigs/status"]
  verbs: ["create","get", "list", "watch", "update", "delete", "deletecollection", "patch"]
- 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"]
