apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: argo-events-role
rules:
  - apiGroups:
      - argoproj.io
    verbs:
      - create
      - delete
      - deletecollection
      - get
      - list
      - patch
      - update
      - watch
    resources:
      - workflows
      - workflows/finalizers
      - workflowtemplates
      - workflowtemplates/finalizers
      - gateways
      - gateways/finalizers
      - sensors
      - sensors/finalizers
      - eventsources
      - eventsources/finalizers
      - eventbus
      - eventbus/finalizers
  - apiGroups:
      - ""
    resources:
      - pods
      - pods/exec
      - configmaps
      - secrets
      - services
      - events
      - persistentvolumeclaims
    verbs:
      - create
      - get
      - list
      - watch
      - update
      - patch
      - delete
  - apiGroups:
      - "batch"
    resources:
      - jobs
    verbs:
      - create
      - get
      - list
      - watch
      - update
      - patch
      - delete
  - apiGroups:
      - "apps"
    resources:
      - deployments
      - statefulsets
    verbs:
      - create
      - get
      - list
      - watch
      - update
      - patch
      - delete
