Files
nixos/manifests/monitoring/cluster-role.yaml
T

154 lines
2.9 KiB
YAML
Raw Normal View History

2025-11-23 01:12:20 -06:00
# This doesn't seem to make enough of the things
# visible, still, and will still generate
# a 403 error when hitting the kubelet and
# cadvisor endpoints, so we use
# cluster-admin down farther
2025-11-22 20:14:55 -06:00
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
2025-11-23 01:12:20 -06:00
labels:
app.kubernetes.io/component: exporter
app.kubernetes.io/name: kube-state-metrics
app.kubernetes.io/part-of: kube-prometheus
app.kubernetes.io/version: 2.17.0
name: kube-state-metrics
2025-11-22 20:14:55 -06:00
rules:
2025-11-23 01:12:20 -06:00
- apiGroups:
- ""
2025-11-22 20:14:55 -06:00
resources:
2025-11-23 01:12:20 -06:00
- configmaps
- secrets
2025-11-22 20:14:55 -06:00
- nodes
- pods
2025-11-23 01:12:20 -06:00
- services
- serviceaccounts
- resourcequotas
- replicationcontrollers
- limitranges
- persistentvolumeclaims
- persistentvolumes
- namespaces
- endpoints
2025-11-22 20:14:55 -06:00
verbs:
- list
- watch
- apiGroups:
2025-11-23 01:12:20 -06:00
- apps
2025-11-22 20:14:55 -06:00
resources:
2025-11-23 01:12:20 -06:00
- statefulsets
- daemonsets
- deployments
- replicasets
verbs:
- list
- watch
- apiGroups:
- batch
resources:
- cronjobs
- jobs
verbs:
- list
- watch
- apiGroups:
- autoscaling
resources:
- horizontalpodautoscalers
verbs:
- list
- watch
- apiGroups:
- authentication.k8s.io
resources:
- tokenreviews
verbs:
- create
- apiGroups:
- authorization.k8s.io
resources:
- subjectaccessreviews
verbs:
- create
- apiGroups:
- policy
resources:
- poddisruptionbudgets
verbs:
- list
- watch
- apiGroups:
- certificates.k8s.io
resources:
- certificatesigningrequests
verbs:
- list
- watch
- apiGroups:
- discovery.k8s.io
resources:
- endpointslices
verbs:
- list
- watch
- apiGroups:
- storage.k8s.io
resources:
- storageclasses
- volumeattachments
verbs:
- list
- watch
- apiGroups:
- admissionregistration.k8s.io
resources:
- mutatingwebhookconfigurations
- validatingwebhookconfigurations
verbs:
- list
- watch
- apiGroups:
- networking.k8s.io
resources:
- networkpolicies
- ingressclasses
2025-11-22 20:14:55 -06:00
- ingresses
verbs:
2025-11-23 01:12:20 -06:00
- list
- watch
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- list
- watch
- apiGroups:
- rbac.authorization.k8s.io
resources:
- clusterrolebindings
- clusterroles
- rolebindings
- roles
verbs:
2025-11-22 20:14:55 -06:00
- list
- watch
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: prometheus
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: prometheus
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
2025-11-23 01:12:20 -06:00
name: cluster-admin
#name: prometheus
2025-11-22 20:14:55 -06:00
subjects:
- kind: ServiceAccount
name: prometheus
namespace: monitoring