---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: storageos-operator
  labels:
    app: storageoscluster-operator
rules:
- apiGroups:
  - storageos.com
  resources:
  - storageosclusters
  - storageosupgrades
  - jobs
  verbs:
  - "*"
- apiGroups:
  - apps
  resources:
  - statefulsets
  - daemonsets
  - deployments
  verbs:
  - "*"
- apiGroups:
  - ""
  resources:
  - nodes
  verbs:
  - list
  - watch
  - get
  - update
- apiGroups:
  - ""
  resources:
  - pods
  verbs:
  - list
  - watch
  - get
  - update
  - patch
  - delete
- apiGroups:
  - ""
  resources:
  - events
  - namespaces
  - serviceaccounts
  - secrets
  - services
  - persistentvolumeclaims
  - persistentvolumes
  verbs:
  - create
  - patch
  - get
  - list
  - delete
  - watch
  - update
- apiGroups:
  - rbac.authorization.k8s.io
  resources:
  - roles
  - rolebindings
  - clusterroles
  - clusterrolebindings
  verbs:
  - create
  - delete
- apiGroups:
  - storage.k8s.io
  resources:
  - storageclasses
  - volumeattachments
  - csinodeinfos
  verbs:
  - create
  - delete
  - watch
  - list
  - get
  - update
- apiGroups:
  - apiextensions.k8s.io
  resources:
  - customresourcedefinitions
  verbs:
  - create
  - delete
- apiGroups:
  - csi.storage.k8s.io
  resources:
  - csidrivers
  verbs:
  - create
  - delete
# OpenShift specific rule.
- apiGroups:
  - security.openshift.io
  resources:
  - securitycontextconstraints
  verbs:
  - create
  - delete
  - update
  - get
  - use
  resourceNames:
  - privileged
