forked from getzep/zep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zep-k8-deployment.yaml
196 lines (196 loc) · 4.67 KB
/
zep-k8-deployment.yaml
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
## Kubernetes Deployment Configuration YAML
# Zep Server
# Note: This is designed for development/test deployments
# Will need to be customized and hardened with additional security, deployment configurations for production use cases
##
apiVersion: apps/v1
kind: Deployment
metadata:
name: zep-postgres
namespace: zep
spec:
replicas: 1
selector:
matchLabels:
app: zep-postgres
template:
metadata:
labels:
app: zep-postgres
spec:
containers:
- name: zep-postgres
image: ghcr.io/getzep/postgres:latest
ports:
- name: postgres-port
containerPort: 5432
env:
- name: POSTGRES_USER
value: postgres
- name: POSTGRES_PASSWORD
value: postgres
resources:
requests:
memory: "1Gi"
cpu: "500m"
limits:
memory: "1Gi"
cpu: "2"
readinessProbe:
exec:
command:
- pg_isready
- -q
- -d
- postgres
- -U
- postgres
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: zep-nlp
namespace: zep
spec:
replicas: 1
selector:
matchLabels:
app: zep-nlp
template:
metadata:
labels:
app: zep-nlp
spec:
containers:
- name: zep-nlp
image: ghcr.io/getzep/zep-nlp-server:latest
readinessProbe:
httpGet:
port: 5557
path: /healthz
initialDelaySeconds: 20
periodSeconds: 10
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3
resources:
requests:
memory: "1Gi"
cpu: "500m"
limits:
memory: "2Gi"
cpu: "2"
ports:
- containerPort: 5557
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: zep
namespace: zep
spec:
replicas: 1
selector:
matchLabels:
app: zep
template:
metadata:
labels:
app: zep
spec:
containers:
- name: zep
image: ghcr.io/getzep/zep-cloud:latest
ports:
- containerPort: 8000
envFrom:
# To create a config map from your local config.yaml file, run:
# kubectl create configmap zep-config --from-file=config.yaml -n zep
- configMapRef:
name: zep-config
# To create a config map from your local .env file, run:
# kubectl create configmap dotenv --from-file=.env -n zep
- configMapRef:
name: dotenv
# Uncomment to enable pulling config from the configmap
# env:
# - name: ZEP_STORE_POSTGRES_DSN
# value: postgres://postgres:postgres@zep-postgres:5432/postgres?sslmode=disable
# - name: ZEP_NLP_SERVER_URL
# value: http://zep-nlp:5557
# - name: ZEP_OPENAI_API_KEY
# valueFrom:
# secretKeyRef:
# name: zep-openai-api-key
# key: ZEP_OPENAI_API_KEY
# - name: AZURE_OPENAI_SUBSCRIPTION_KEY
# valueFrom:
# secretKeyRef:
# name: azure-openai-secret
# key: subscription-key
# - name: AZURE_OPENAI_ENDPOINT
# valueFrom:
# secretKeyRef:
# name: azure-openai-secret
# key: endpoint
readinessProbe:
httpGet:
port: 8000
path: /healthz
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 10
successThreshold: 1
failureThreshold: 3
resources:
requests:
memory: "1Gi"
cpu: "500m"
limits:
memory: "1Gi"
cpu: "1"
---
apiVersion: v1
kind: Service
metadata:
name: zep-postgres
namespace: zep
spec:
selector:
app: zep-postgres
ports:
- protocol: TCP
port: 5432
targetPort: 5432
---
apiVersion: v1
kind: Service
metadata:
name: zep-nlp
namespace: zep
spec:
selector:
app: zep-nlp
ports:
- protocol: TCP
port: 5557
targetPort: 5557
---
apiVersion: v1
kind: Service
metadata:
name: zep
namespace: zep
spec:
type: LoadBalancer
selector:
app: zep
ports:
- protocol: TCP
port: 8000
targetPort: 8000