apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: grafana-configuration-role
rules:
- apiGroups:
  - grafana.extension.oam.dev
  resources:
  - datasourceregistrations
  - datasourceregistrationdeprecateds
  verbs:
  - create
  - delete
  - get
  - list
  - patch
  - update
  - watch
- apiGroups:
  - grafana.extension.oam.dev
  resources:
  - datasourceregistrations/status
  verbs:
  - get
  - patch
  - update

- apiGroups:
    - ""
  resources:
    - secrets
    - services
  verbs:
    - create
    - delete
    - get
    - list
    - patch
    - update
    - watch

- apiGroups:
    - grafana.extension.oam.dev
  resources:
    - importdashboards
  verbs:
    - create
    - delete
    - get
    - list
    - patch
    - update
    - watch
- apiGroups:
    - grafana.extension.oam.dev
  resources:
    - importdashboards/status
  verbs:
    - get