64 lines
1.5 KiB
YAML
64 lines
1.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: lambda
|
|
namespace: eth
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: lambda
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: lambda
|
|
spec:
|
|
containers:
|
|
- name: lambda
|
|
image: eth-lambda
|
|
# The container runs the FastAPI runner (see runner.py + Dockerfile).
|
|
# The CMD comes from the Dockerfile (uvicorn). Container also stays
|
|
# exec-able for `bash ctrl/seed.sh` / `bash ctrl/invoke.sh` which
|
|
# spawn separate python processes alongside uvicorn.
|
|
workingDir: /app
|
|
ports:
|
|
- name: http
|
|
containerPort: 8000
|
|
envFrom:
|
|
- configMapRef:
|
|
name: eth-config
|
|
volumeMounts:
|
|
- name: documents
|
|
mountPath: /mnt/documents
|
|
readOnly: true
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8000
|
|
initialDelaySeconds: 3
|
|
periodSeconds: 5
|
|
resources:
|
|
requests:
|
|
memory: 128Mi
|
|
cpu: 100m
|
|
limits:
|
|
memory: 1Gi
|
|
volumes:
|
|
- name: documents
|
|
hostPath:
|
|
path: /mnt/documents
|
|
type: Directory
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: lambda
|
|
namespace: eth
|
|
spec:
|
|
selector:
|
|
app: lambda
|
|
ports:
|
|
- name: http
|
|
port: 8000
|
|
targetPort: 8000
|