# Source: cert-manager/templates/webhook-rbac.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: cert-manager-webhook:dynamic-serving
  namespace: "cert-manager"
  labels:
    app: webhook
    app.kubernetes.io/name: webhook
    app.kubernetes.io/instance: cert-manager
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/component: "webhook"
    helm.sh/chart: cert-manager-v1.1.0
    gitops.jenkins-x.io/pipeline: 'namespaces'
rules:
  - apiGroups: [""]
    resources: ["secrets"]
    resourceNames:
      - 'cert-manager-webhook-ca'
    verbs: ["get", "list", "watch", "update"]
  # It's not possible to grant CREATE permission on a single resourceName.
  - apiGroups: [""]
    resources: ["secrets"]
    verbs: ["create"]
