apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: px-prometheus
  namespace: kube-test
rules:
  - apiGroups: [""]
    resources:
      - nodes
      - services
      - endpoints
      - pods
    verbs: ["get", "list", "watch"]
  - apiGroups: [""]
    resources:
      - configmaps
    verbs: ["get"]
  - nonResourceURLs: ["/metrics", "/federate"]
    verbs: ["get"]
  - apiGroups: ["policy"]
    resources: ["podsecuritypolicies"]
    resourceNames: ["px-restricted"]
    verbs: ["use"]
