apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: kafka-broker-controller
  labels:
    contrib.eventing.knative.dev/release: devel
rules:
  - apiGroups:
      - "*"
    resources:
      - configmaps
    verbs:
      - get
      - list
      - watch
      - update
  - apiGroups:
      - "*"
    resources:
      - pods
    verbs:
      - list
      - update
      - get
      - watch
  - apiGroups:
      - "*"
    resources:
      - events
    verbs:
      - patch
      - create
  - apiGroups:
      - "coordination.k8s.io"
    resources:
      - "leases"
    verbs:
      - get
      - list
      - create
      - update
      - delete
      - patch
      - watch

  # Eventing resources and statuses we care about
  - apiGroups:
      - "eventing.knative.dev"
    resources:
      - "brokers"
      - "brokers/status"
      - "triggers"
      - "triggers/status"
    verbs:
      - list
      - get
      - watch
      - patch
      - update

  # Eventing resources and finalizers we care about.
  - apiGroups:
      - "eventing.knative.dev"
    resources:
      - "brokers/finalizers"
      - "triggers/finalizers"
    verbs:
      - update
