add custom metric

This commit is contained in:
2026-02-06 22:02:22 +04:00
parent 55b8e51279
commit c3a29e2a16
2 changed files with 33 additions and 2 deletions

View File

@@ -16,7 +16,8 @@ spec:
- name: fastapi-app-container
image: igit.danilkolesnikov.ru/danil/playground_app
ports:
- containerPort: 8000
- name: web
containerPort: 8000
---
apiVersion: v1
@@ -30,3 +31,14 @@ spec:
- protocol: TCP
port: 8000
targetPort: 8000
---
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: fastapi-app-pod-monitor
spec:
selector:
matchLabels:
app: fastapi-app
podMetricsEndpoints:
- port: web