apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: tf-operator
rules:
- apiGroups:
  - ""
  resources:
  - configmaps
  - endpoints
  - events
  - namespaces
  - nodes
  - persistentvolumeclaims
  - pods
  - secrets
  - serviceaccounts
  - services
  - services/finalizers
  verbs:
  - create
  - delete
  - get
  - list
  - patch
  - update
  - watch
- apiGroups:
  - extensions
  resources:
  - ingresses
  - networkpolicies
  verbs:
  - get
  - list
  - patch
  - update
  - watch
- apiGroups:
  - networking.k8s.io
  resources:
  - networkpolicies
  verbs:
  - get
  - list
  - patch
  - update
  - watch
# used to create network-attachment-definitions.k8s.cni.cncf.io
- apiGroups:
  - apiextensions.k8s.io
  resources:
  - customresourcedefinitions
  verbs:
  - create
  - get
- apiGroups:
  - k8s.cni.cncf.io
  resources:
  - network-attachment-definitions
  verbs:
  - '*'
# used to give privileged access to datapath components
- apiGroups: ["security.openshift.io"]
  resources:
  - securitycontextconstraints
  verbs:
  - use
  resourceNames:
  - privileged
- apiGroups: ["config.openshift.io"]
  resources:
  - networks
  verbs:
  - get
  - list
  - patch
  - update
  - watch
- apiGroups: ["operator.openshift.io"]
  resources:
  - networks
  verbs:
  - get
  - list
  - watch
- apiGroups: [""]
  resources:
  - networks
  verbs:
  - get
  - patch
  - update
- apiGroups:
  - rbac.authorization.k8s.io
  resources:
  - clusterrolebindings
  - clusterroles
  verbs:
  - create
  - delete
  - get
  - list
  - patch
  - update
  - watch
- apiGroups:
  - apps
  resources:
  - deployments
  - daemonsets
  - replicasets
  - statefulsets
  verbs:
  - create
  - delete
  - get
  - list
  - patch
  - update
  - watch
- apiGroups:
  - monitoring.coreos.com
  resources:
  - servicemonitors
  verbs:
  - get
  - create
- apiGroups:
  - apps
  resourceNames:
  - tf-operator
  resources:
  - deployments/finalizers
  verbs:
  - update
- apiGroups:
  - tungsten.atsgen.com
  resources:
  - '*'
  verbs:
  - create
  - delete
  - get
  - list
  - patch
  - update
  - watch
