apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: apicurio-registry-kube-sync
rules:
  - apiGroups:
      - apiextensions.k8s.io
    resources:
      # the Java operator SDK seems to need listing CRDs
      - customresourcedefinitions
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - artifact.apicur.io
    resources:
      # operator main custom resources
      - artifacts
      - artifacts/status
    verbs:
      - get
      - list
      - watch
      - create
      - delete
      - patch
      - update