kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: csi-rhm-cos-csi-cluster-role
  namespace: ${NAMESPACE}
rules:
  - apiGroups: [""]
    resources: ["persistentvolumes"]
    verbs: ["get", "list", "watch", "patch", "create", "update", "delete"]
  - apiGroups: [""]
    resources: ["persistentvolumeclaims"]
    verbs: ["get", "list", "watch", "update"]
  - apiGroups: ["storage.k8s.io"]
    resources: ["storageclasses"]
    verbs: ["get", "list", "watch"]
  - apiGroups: [""]
    resources: ["nodes"]
    verbs: ["get", "list", "watch"]
  - apiGroups: ["storage.k8s.io"]
    resources: ["csinodes"]
    verbs: ["get", "list", "watch"]
  - apiGroups: [""]
    resources: ["events"]
    verbs: ["list", "watch", "create", "update", "patch"]
  - apiGroups: ["storage.k8s.io"]
    resources: ["volumeattachments"]
    verbs: ["get", "list", "watch", "patch"]
  - apiGroups: [ "security.openshift.io" ]
    resourceNames: [ "privileged" ]
    resources: [ "securitycontextconstraints" ]
    verbs: [ "use" ]
  - apiGroups: [ "" ]
    resources: [ "pods" ]
    verbs: [ "get", "list", "patch" ]
  - apiGroups: [ "" ]
    resources: [ "pods/status" ]
    verbs: [ "update" ]
  - apiGroups: ["marketplace.redhat.com"]
    resources: ["marketplacedriverhealthchecks"]
    verbs: ["get", "watch", "list"]
  - apiGroups: [ "marketplace.redhat.com" ]
    resources: [ "marketplacedriverhealthchecks/status" ]
    verbs: [ "get", "update" ]
  - apiGroups: ["marketplace.redhat.com"]
    resources: ["marketplacedatasets"]
    verbs: ["get", "watch", "list"]
