feat(prometheus): Add metric aggregator

This commit is contained in:
Tanguy Herbron 2023-07-05 15:38:34 +02:00
parent 441a1d7235
commit 65c12b4f95
8 changed files with 39687 additions and 2 deletions

View File

@ -16,6 +16,6 @@ data:
- name: Prometheus - name: Prometheus
type: prometheus type: prometheus
access: proxy access: proxy
url: "http://prometheus-operator:9090" url: "http://prometheus-operated:9090"
version: 1 version: 1
isDefault: false isDefault: false

View File

@ -3,6 +3,7 @@ kind: Kustomization
resources: resources:
- namespace.yaml - namespace.yaml
- grafana
- promtail - promtail
- loki - loki
- prometheus
- grafana

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,26 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: prometheus
namespace: monitoring
rules:
- apiGroups: [""]
resources:
- nodes
- nodes/metrics
- services
- endpoints
- pods
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources:
- configmaps
verbs: ["get"]
- apiGroups:
- networking.k8s.io
resources:
- ingresses
verbs: ["get", "list", "watch"]
- nonResourceURLs: ["/metrics"]
verbs: ["get"]

View File

@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: prometheus
namespace: monitoring
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: prometheus
subjects:
- kind: ServiceAccount
name: prometheus
namespace: monitoring

View File

@ -0,0 +1,6 @@
resources:
- bundle.yaml
- serviceaccount.yaml
- clusterrole.yaml
- clusterrolebinding.yaml
- prometheus.yaml

View File

@ -0,0 +1,11 @@
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
name: prometheus
namespace: monitoring
spec:
serviceAccountName: prometheus
serviceMonitorSelector: {}
resources:
requests:
memory: 300Mi

View File

@ -0,0 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: prometheus
namespace: monitoring