---
# Source: prometheus-operator/templates/prometheus/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: agent-prometheus-prometheus
  labels:
    app: prometheus-operator-prometheus
    
    chart: prometheus-operator-8.12.15
    release: "agent-prometheus"
    heritage: "Helm"
rules:
- apiGroups:
  - ""
  resources:
  - nodes/metrics
  verbs:
  - get
  - list
  - watch
# This permission are not in the prometheus-operator repo
# they're grabbed from https://github.com/prometheus/prometheus/blob/master/documentation/examples/rbac-setup.yml
- apiGroups: [""]
  resources:
  - nodes
  - nodes/proxy
  - services
  - endpoints
  - pods
  verbs: ["get", "list", "watch"]
- apiGroups:
  - extensions
  - "networking.k8s.io"
  resources:
  - ingresses
  verbs: ["get", "list", "watch"]
- nonResourceURLs: ["/metrics"]
  verbs: ["get"]
