Repository navigation
Expand file tree
/
Copy pathapi.yaml
More file actions
55 lines (55 loc) · 1.3 KB
/
Copy pathapi.yaml
File metadata and controls
55 lines (55 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
apiVersion: v1
kind: Service
metadata:
name: api
spec:
selector:
app: api
ports:
- port: 8000
targetPort: 8000
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: api
spec:
replicas: 1
selector:
matchLabels:
app: api
template:
metadata:
labels:
app: api
spec:
containers:
- name: api
image: fastapi-api:latest
imagePullPolicy: IfNotPresent
command: ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
ports:
- containerPort: 8000
envFrom:
- configMapRef:
name: api-config
- secretRef:
name: assistant-llm
optional: true
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef: {name: catalog-db, key: DATABASE_URL}
startupProbe:
httpGet: {path: /healthz, port: 8000}
periodSeconds: 2
failureThreshold: 60
livenessProbe:
httpGet: {path: /healthz, port: 8000}
periodSeconds: 10
readinessProbe:
httpGet: {path: /healthz, port: 8000}
periodSeconds: 5
resources:
requests: {cpu: 100m, memory: 512Mi}
limits: {memory: 1Gi}