# leader election rules
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
metadata:
  name: cert-manager-cainjector:leaderelection
  labels:
    app: cainjector
rules:
  # Used for leader election by the controller
  # TODO: refine the permission to *just* the leader election configmap
  - apiGroups: [""]
    resources: ["configmaps"]
    verbs: ["get", "create", "update", "patch"]

---

apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
metadata:
  name: cert-manager:leaderelection
  labels:
    app: cert-manager
rules:
  # Used for leader election by the controller
  # TODO: refine the permission to *just* the leader election configmap
  - apiGroups: [""]
    resources: ["configmaps"]
    verbs: ["get", "create", "update", "patch"]
