apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: external-secrets-leaderelection
  namespace: external-secrets
  labels:
    helm.sh/chart: external-secrets-1.2.1
    app.kubernetes.io/name: external-secrets
    app.kubernetes.io/instance: external-secrets
    app.kubernetes.io/version: "v1.2.1"
    app.kubernetes.io/managed-by: Helm
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"
