apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: federatorai-operator
  namespace: federatorai
rules:
# following is taken from Federatorai-operator CSV v0.0.1 permissions section
- apiGroups:
  - ""
  resources:
  - configmaps
  - events
  - endpoints
  - persistentvolumeclaims
  - pods
  - secrets
  - services
  verbs:
  - "*"
- apiGroups:
  - apps
  resources:
  - daemonsets
  - statefulsets
  verbs:
  - "*"
- apiGroups:
  - apps
  resources:
  - deployments/finalizers
  verbs:
  - update
- apiGroups:
  - monitoring.coreos.com
  resources:
  - servicemonitors
  verbs:
  - create
  - get
- apiGroups:
  - ""
  resources:
  - pods/log
  - replicationcontrollers
  - services
  - nodes
  - persistentvolumes
  - persistentvolumeclaims
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - batch
  resources:
  - cronjobs
  - jobs
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - extensions
  - apps
  resources:
  - deployments
  - deployments/scale
  - replicasets
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - extensions
  resources:
  - deployments/scale
  verbs:
  - update
- apiGroups:
  - storage.k8s.io
  resources:
  - storageclasses
  verbs:
  - list
  - watch
- apiGroups:
  - extensions
  resources:
  - podsecuritypolicies
  verbs:
  - "*"
- apiGroups:
  - volumesnapshot.external-storage.k8s.io
  resources:
  - volumesnapshots
  - volumesnapshotdatas
  verbs:
  - list
  - watch
