File tree Expand file tree Collapse file tree 1 file changed +40
-1
lines changed
02-path-working-with-clusters/201-cluster-monitoring/templates/prometheus Expand file tree Collapse file tree 1 file changed +40
-1
lines changed Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ metadata:
225
225
spec :
226
226
replicas : 2
227
227
version : v2.0.0-rc.1
228
- serviceAccountName : prometheus-operator
228
+ serviceAccountName : prometheus
229
229
serviceMonitorSelector :
230
230
matchExpressions :
231
231
- {key: k8s-app, operator: Exists}
@@ -246,6 +246,45 @@ spec:
246
246
name : alertmanager-main
247
247
port : web
248
248
---
249
+ apiVersion : rbac.authorization.k8s.io/v1beta1
250
+ kind : ClusterRole
251
+ metadata :
252
+ name : prometheus
253
+ namespace : monitoring
254
+ rules :
255
+ - apiGroups : [""]
256
+ resources :
257
+ - nodes
258
+ - services
259
+ - endpoints
260
+ - pods
261
+ verbs : ["get", "list", "watch"]
262
+ - apiGroups : [""]
263
+ resources :
264
+ - configmaps
265
+ verbs : ["get"]
266
+ - nonResourceURLs : ["/metrics"]
267
+ verbs : ["get"]
268
+ ---
269
+ apiVersion : v1
270
+ kind : ServiceAccount
271
+ metadata :
272
+ name : prometheus
273
+ namespace : monitoring
274
+ ---
275
+ apiVersion : rbac.authorization.k8s.io/v1beta1
276
+ kind : ClusterRoleBinding
277
+ metadata :
278
+ name : prometheus
279
+ roleRef :
280
+ apiGroup : rbac.authorization.k8s.io
281
+ kind : ClusterRole
282
+ name : prometheus
283
+ subjects :
284
+ - kind : ServiceAccount
285
+ name : prometheus
286
+ namespace : monitoring
287
+ ---
249
288
apiVersion : monitoring.coreos.com/v1
250
289
kind : ServiceMonitor
251
290
metadata :
You can’t perform that action at this time.
0 commit comments