---
# Namespaced permissions the controller-manager needs for leader election
# (--leader-elect). The lease lock is created in the operator's own namespace.
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: autobackup-operator-leader-election
  namespace: autobackup-operator
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
