Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions custom-prometheus/prometheus-cluster-role-binding.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions custom-prometheus/prometheus-cluster-role.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions custom-prometheus/prometheus-service-account.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion custom-prometheus/prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
spec:
replicas: 1
version: v2.0.0-rc.3
serviceAccountName: prometheus
serviceAccountName: prometheus-custom
serviceMonitorSelector:
alerting:
alertmanagers:
Expand Down
48 changes: 48 additions & 0 deletions custom-prometheus/rbac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: prometheus-custom
namespace: monitoring
annotations:
manifest-origin: github.com/Yolean/kubernetes-monitoring
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: monitoring-by-prometheus-annotations
annotations:
manifest-origin: github.com/Yolean/kubernetes-monitoring
rules:
- apiGroups: [""]
resources:
- nodes
- services
- endpoints
- pods
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources:
- configmaps
verbs: ["get"]
- apiGroups: ["extensions"]
resources:
- ingresses
verbs: ["get", "list", "watch"]
- nonResourceURLs: ["/metrics"]
verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: monitoring-by-prometheus-annotations
annotations:
manifest-origin: github.com/Yolean/kubernetes-monitoring
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: monitoring-by-prometheus-annotations
subjects:
- kind: ServiceAccount
name: prometheus-custom
namespace: monitoring