feat(loki): Add prometheus scraping

This commit is contained in:
Tanguy Herbron 2023-07-29 09:39:51 +02:00
parent a51063e828
commit 13c3b5962f
4 changed files with 18 additions and 0 deletions

View File

@ -22,6 +22,7 @@ spec:
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3100
name: http
volumeMounts:
- name: loki-pv
mountPath: /loki

View File

@ -5,4 +5,5 @@ resources:
- pvc.yaml
- configmap.yaml
- service.yaml
- servicemonitor.yaml
- deployment.yaml

View File

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

View File

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