feat: 开发测试接口

This commit is contained in:
plf
2026-05-01 09:29:08 +08:00
parent 0994da75fe
commit 5828b6c268
13 changed files with 303 additions and 0 deletions

53
k8s/deployment.yaml Normal file
View File

@@ -0,0 +1,53 @@
apiVersion: v1
kind: Namespace
metadata:
name: fastapi-demo
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: fastapi-app
namespace: fastapi-demo
spec:
replicas: 2
selector:
matchLabels:
app: fastapi-app
template:
metadata:
labels:
app: fastapi-app
spec:
containers:
- name: app
image: registry.plfai.cn/fastapi-demo:latest
ports:
- containerPort: 8000
readinessProbe:
httpGet:
path: /health
port: 8000
initialDelaySeconds: 5
periodSeconds: 5
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 200m
memory: 256Mi
---
apiVersion: v1
kind: Service
metadata:
name: fastapi-app
namespace: fastapi-demo
spec:
type: ClusterIP
selector:
app: fastapi-app
ports:
- port: 80
targetPort: 8000