phase 2
This commit is contained in:
48
ctrl/k8s/base/fastapi.yaml
Normal file
48
ctrl/k8s/base/fastapi.yaml
Normal file
@@ -0,0 +1,48 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: fastapi
|
||||
namespace: mpr
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: fastapi
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: fastapi
|
||||
spec:
|
||||
containers:
|
||||
- name: fastapi
|
||||
image: mpr-fastapi
|
||||
command: ["sh", "-c", "uvicorn core.api.main:app --host 0.0.0.0 --port $FASTAPI_PORT --reload"]
|
||||
ports:
|
||||
- containerPort: 8702
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: mpr-config
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8702
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
resources:
|
||||
requests:
|
||||
memory: 128Mi
|
||||
cpu: 100m
|
||||
limits:
|
||||
memory: 512Mi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: fastapi
|
||||
namespace: mpr
|
||||
spec:
|
||||
selector:
|
||||
app: fastapi
|
||||
ports:
|
||||
- port: 8702
|
||||
targetPort: 8702
|
||||
Reference in New Issue
Block a user