apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: external-secrets-leaderelection
  labels:
    app.kubernetes.io/name: external-secrets
    app.kubernetes.io/instance: external-secrets
rules:
  - apiGroups:
    - ""
    resources:
    - configmaps
    resourceNames:
    - external-secrets-controller
    verbs:
    - get
    - update
    - patch
  - apiGroups:
    - ""
    resources:
    - configmaps
    verbs:
    - create
  - apiGroups:
    - coordination.k8s.io
    resources:
    - leases
    verbs:
    - get
    - create
    - update
    - patch
