# Source: kube-prometheus-stack/templates/prometheus-operator/admission-webhooks/job-patch/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: monitoring-kube-prometheus-admission
  annotations:
    "helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade
    "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
    meta.helm.sh/release-name: 'monitoring'
  labels:
    app: kube-prometheus-stack-admission
    chart: kube-prometheus-stack-10.3.3
    release: "monitoring"
    heritage: "Helm"
    gitops.jenkins-x.io/pipeline: 'cluster'
rules:
  - apiGroups:
      - admissionregistration.k8s.io
    resources:
      - validatingwebhookconfigurations
      - mutatingwebhookconfigurations
    verbs:
      - get
      - update
  - apiGroups: ['policy']
    resources: ['podsecuritypolicies']
    verbs: ['use']
    resourceNames:
      - monitoring-kube-prometheus-admission
