aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/namespaces/monitoring/prometheus/service-account.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/namespaces/monitoring/prometheus/service-account.yaml')
-rw-r--r--kubernetes/namespaces/monitoring/prometheus/service-account.yaml32
1 files changed, 32 insertions, 0 deletions
diff --git a/kubernetes/namespaces/monitoring/prometheus/service-account.yaml b/kubernetes/namespaces/monitoring/prometheus/service-account.yaml
new file mode 100644
index 0000000..00cf0c2
--- /dev/null
+++ b/kubernetes/namespaces/monitoring/prometheus/service-account.yaml
@@ -0,0 +1,32 @@
+---
+kind: ClusterRole
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+ name: prometheus
+rules:
+- apiGroups: ["*"]
+ resources: ["*"]
+ verbs: ["get", "list", "watch"]
+- nonResourceURLs:
+ - "/metrics"
+ verbs:
+ - get
+---
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: prometheus
+ namespace: monitoring
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+ name: prometheus
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: prometheus
+subjects:
+ - kind: ServiceAccount
+ name: prometheus
+ namespace: monitoring