forked from imDarshanGK/AI-dev-assistant
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeployment.example.yaml
More file actions
89 lines (89 loc) · 2.58 KB
/
Copy pathdeployment.example.yaml
File metadata and controls
89 lines (89 loc) · 2.58 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Example Kubernetes Deployment + Service for QyverixAI.
#
# This manifest is illustrative — it shows how to wire the new probes and the
# /metrics endpoint into a typical cluster. Adjust resources, replicas and
# image references for your environment.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: qyverixai
labels:
app: qyverixai
spec:
replicas: 2
selector:
matchLabels:
app: qyverixai
template:
metadata:
labels:
app: qyverixai
annotations:
# Tell Prometheus' Kubernetes service-discovery to scrape this pod.
# (Only relevant if you use the prometheus.io/* annotation style. If
# you scrape via a ServiceMonitor / PodMonitor CRD instead, drop these.)
prometheus.io/scrape: "true"
prometheus.io/port: "8000"
prometheus.io/path: "/metrics"
spec:
containers:
- name: qyverixai
image: ghcr.io/imdarshangk/ai-dev-assistant:latest
ports:
- name: http
containerPort: 8000
env:
- name: METRICS_ENABLED
value: "true"
- name: RATE_LIMIT_PER_MINUTE
value: "120"
# Liveness — restarts the container when the process can no longer
# respond. Must NOT depend on external services.
livenessProbe:
httpGet:
path: /healthz/live
port: http
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 3
# Readiness — pulls the pod out of the Service load balancer when a
# critical dependency is down, but does NOT restart it.
readinessProbe:
httpGet:
path: /healthz/ready
port: http
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 3
# Startup probe gives slow boots room to breathe before liveness
# takes over. Useful when scheduler / DB migrations run on start.
startupProbe:
httpGet:
path: /healthz/live
port: http
periodSeconds: 5
failureThreshold: 30 # up to 150s of warm-up
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 500m
memory: 512Mi
---
apiVersion: v1
kind: Service
metadata:
name: qyverixai
labels:
app: qyverixai
spec:
selector:
app: qyverixai
ports:
- name: http
port: 80
targetPort: http