apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: kt-channel-dispatcher
rules:
  - apiGroups:
      - messaging.optum.dev
    resources:
      - kafkatopicchannels
    verbs:
      - get
      - list
      - watch
      - patch
  - apiGroups:
      - messaging.optum.dev
    resources:
      - kafkatopicchannels/status
    verbs:
      - get
      - update
      - patch
  - apiGroups:
      - "" # Core API group.
    resources:
      - events
    verbs:
      - create
      - patch
      - update
  - apiGroups:
      - messaging.optum.dev
    resources:
      - kafkatopicchannels
    verbs:
      - get
      - list
      - watch
      - patch
  - apiGroups:
      - ""
    resources:
      - configmaps
      - secrets
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - "" # Core API Group.
    resources:
      - events
    verbs:
      - create
      - patch
  - apiGroups:
      - coordination.k8s.io
    resources:
      - leases
    verbs:
      - get
      - list
      - watch
      - create
      - patch
      - update
