apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: neuron-dra-driver-clusterrole
rules:
# Required for DRA device plugin to manage ResourceSlices
- apiGroups: ["resource.k8s.io"]
  resources: ["resourceslices"]
  verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
# Required for DRA device plugin to read ResourceClaims
- apiGroups: ["resource.k8s.io"]
  resources: ["resourceclaims"]
  verbs: ["get", "list", "watch"]
# Required for DRA device plugin to read DeviceClasses
- apiGroups: ["resource.k8s.io"]
  resources: ["deviceclasses"]
  verbs: ["get", "list", "watch"]
  # Required to read and modify node information
- apiGroups: [""]
  resources: ["nodes"]
  verbs: ["get", "list", "watch", "patch", "update"]
  # Required to modify node status
- apiGroups: [""]
  resources: ["nodes/status"]
  verbs: ["patch"]
