apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: federatorai-operator
rules:
# following is taken from Federatorai-operator CSV v0.0.1 clusterPermissions section
- apiGroups:
  - route.openshift.io
  resources:
  - "*"
  verbs:
  - "*"
- apiGroups:
  - federatorai.containers.ai
  resources:
  - "*"
  verbs:
  - "*"
- apiGroups:
  - autoscaling.containers.ai
  resources:
  - "*"
  verbs:
  - "*"
- apiGroups:
  - ""
  resources:
  - namespaces
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - ""
  resources:
  - nodes
  - persistentvolumeclaims
  - serviceaccounts
  verbs:
  - delete #[issue 150]for openshift v3.09
  - get
  - list
  - watch
  - create
- apiGroups:
  - ""
  resources:
  - endpoints
  - pods
  verbs:
  - get
  - list
  - watch
  - delete
  - patch
- apiGroups:
  - extensions
  - ""
  resources:
  - replicationcontrollers
  - ingresses
  verbs:
  - "*"
- apiGroups:
  - ""
  resources:
  - serviceaccounts
  verbs:
  - create
  - delete
  - update
- apiGroups:
  - ""
  resources:
  - secrets
  verbs:
  - delete #[issue 150]for openshift v3.09
  - create
  - list
  - watch
- apiGroups:
  - ""
  resources:
  - configmaps
  verbs:
  - delete #[issue 150]for openshift v3.09
  - create
  - list
  - update
  - watch
  - get
- apiGroups:
  - ""
  resources:
  - services
  verbs:
  - create
  - list
  - update
  - watch
  - delete
- apiGroups:
  - rbac.authorization.k8s.io
  resources:
  - clusterroles
  - clusterrolebindings
  verbs:
  - delete #[issue 150]for openshift v3.09
  - create
  - list
  - watch
  - update
- apiGroups:
  - extensions
  - apps
  resources:
  - deployments
  - statefulsets
  verbs:
  - "*"
- apiGroups:
  - extensions
  - apps
  resources:
  - replicasets
  verbs:
  - "*"
- apiGroups:
  - apiextensions.k8s.io
  resources:
  - customresourcedefinitions
  verbs:
  - create
  - delete
  - get
  - update
- apiGroups:
  - admissionregistration.k8s.io
  resources:
  - mutatingwebhookconfigurations
  - validatingwebhookconfigurations
  verbs:
  - create
  - get
  - list
  - update
  - watch
  - delete
- apiGroups:
  - apps.openshift.io
  resources:
  - deploymentconfigs
  verbs:
  - "*"
- apiGroups:
  - autoscaling
  resources:
  - horizontalpodautoscalers
  verbs:
  - list
- 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:
  - daemonsets
  - deployments
  - deployments/scale
  verbs:
  - get
  - list
  - watch
  - create
  - delete
  - update
- apiGroups:
  - extensions
  resources:
  - deployments/scale
  verbs:
  - update
- apiGroups:
  - storage.k8s.io
  resources:
  - storageclasses
  verbs:
  - list
  - watch
- apiGroups:
  - extensions
  resources:
  - podsecuritypolicies
  verbs:
  - "*"
- apiGroups:
  - extensions
  resourceNames:
  - federatorai-alameda-weave-scope
  resources:
  - podsecuritypolicies
  verbs:
  - use
- apiGroups:
  - volumesnapshot.external-storage.k8s.io
  resources:
  - volumesnapshots
  - volumesnapshotdatas
  verbs:
  - list
  - watch
- apiGroups:
  - security.openshift.io 
  resources:
  - securitycontextconstraints 
  verbs:
  - create
  - get
  - list
  - watch
  - update
  - delete
