apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  labels:
     {{- include "nexus-operator.labels" . | nindent 4 }}
  name: edp-{{ .Values.name }}-leader-election-role
rules:
  - apiGroups:
      - ""
    resources:
      - configmaps
    verbs:
      - get
      - list
      - watch
      - create
      - update
      - patch
      - delete
  - apiGroups:
      - coordination.k8s.io
    resources:
      - leases
    verbs:
      - get
      - list
      - watch
      - create
      - update
      - patch
      - delete
  - apiGroups:
      - ""
    resources:
      - events
    verbs:
      - create
      - patch
