add custom metric
This commit is contained in:
14
k8s/app.yaml
14
k8s/app.yaml
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user