apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: grafana-operator
rules:
  - apiGroups:
      - ""
    resources:
      - pods
      - services
      - endpoints
      - persistentvolumeclaims
      - configmaps
      - secrets
      - serviceaccounts
      - configmaps
    verbs:
      - get
      - list
      - create
      - update
      - delete
      - deletecollection
      - watch
  - apiGroups:
      - ""
    resources:
      - events
    verbs:
      - get
      - list
      - watch
      - create
      - delete
      - update
      - patch
  - apiGroups:
      - apps
    resources:
      - deployments
      - deployments/finalizers
      - daemonsets
      - replicasets
      - statefulsets
    verbs:
      - get
      - list
      - create
      - update
      - delete
      - deletecollection
      - watch
  - apiGroups:
      - route.openshift.io
    resources:
      - routes
      - routes/custom-host
    verbs:
      - get
      - list
      - create
      - update
      - delete
      - deletecollection
      - watch
      - create
  - apiGroups:
      - extensions
    resources:
      - ingresses
    verbs:
      - get
      - list
      - create
      - update
      - delete
      - deletecollection
      - watch
  - apiGroups:
      - monitor.kun
    resources:
      - grafanas
      - grafanas/status
      - grafanas/finalizers
      - grafanadashboards
      - grafanadatasources
      - grafanadatasources/status
    verbs:
      - get
      - list
      - create
      - update
      - delete
      - deletecollection
      - watch
