feat(metrics): add basic prometheus metrics, cluster scraping

This commit is contained in:
2025-10-30 14:42:11 +01:00
parent 7f8dd2e846
commit 2d0d309d2b
2 changed files with 4 additions and 3 deletions

View File

@@ -3,12 +3,12 @@ kind: ServiceMonitor
metadata:
name: fastapi-servicemonitor
labels:
release: prometheus
release: kube-prometheus-stack
spec:
selector:
matchLabels:
app: {{ .Values.app.name }}
endpoints:
- port: "8000"
- port: http
path: /metrics
interval: 15s

View File

@@ -4,7 +4,8 @@ metadata:
name: {{ .Values.app.name }}
spec:
ports:
- port: {{ .Values.service.port }}
- name: http
port: {{ .Values.service.port }}
targetPort: {{ .Values.app.port }}
selector:
app: {{ .Values.app.name }}