feat(metrics): Add prometheus scraping

This commit is contained in:
Tanguy Herbron 2023-07-27 10:10:08 +02:00
parent dc0ee8d343
commit 8736eb62ab
4 changed files with 18 additions and 2 deletions

View File

@ -18,8 +18,7 @@ spec:
- 0
containers:
- name: grafana
image: grafana/grafana:10.0.1
imagePullPolicy: IfNotPresent
image: grafana/grafana:10.0.3
ports:
- containerPort: 3000
readinessProbe:

View File

@ -5,6 +5,7 @@ resources:
- pvc.yaml
- service.yaml
- ingress.yaml
- servicemonitor.yaml
- database.yaml
- datasources.yaml
- deployment.yaml

View File

@ -3,6 +3,8 @@ kind: Service
metadata:
name: grafana-svc
namespace: monitoring
labels:
app.kubernetes.io/name: grafana
spec:
ports:
- name: http

View File

@ -0,0 +1,14 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: grafana
namespace: monitoring
labels:
team: core
spec:
selector:
matchLabels:
app.kubernetes.io/name: grafana
endpoints:
- port: http
path: /metrics