Skip to content

Commit dc21f4e

Browse files
committed
kubes
1 parent 59b3e21 commit dc21f4e

4 files changed

Lines changed: 29 additions & 11 deletions

File tree

deploy/kubernetes/deploy.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,22 @@ show_status() {
162162
fi
163163
}
164164

165+
166+
# Patch images to the chosen registry:tag and refresh jobs
167+
set_images() {
168+
local full="${IMAGE_REGISTRY}:${IMAGE_TAG}"
169+
log_info "Setting images to ${full}"
170+
kubectl set image deployment/mcp-memory mcp-memory="${full}" -n "$NAMESPACE" || true
171+
kubectl set image deployment/mcp-indexer mcp-indexer="${full}" -n "$NAMESPACE" || true
172+
kubectl set image deployment/mcp-memory-http mcp-memory-http="${full}" -n "$NAMESPACE" || true
173+
kubectl set image deployment/mcp-indexer-http mcp-indexer-http="${full}" -n "$NAMESPACE" || true
174+
kubectl set image deployment/watcher watcher="${full}" -n "$NAMESPACE" || true
175+
# Refresh Jobs so they pick up the new image
176+
kubectl delete job indexer-job init-payload -n "$NAMESPACE" --ignore-not-found=true
177+
kubectl apply -f indexer-services.yaml
178+
log_success "Images set to ${full} and jobs refreshed"
179+
}
180+
165181
# Main deployment function
166182
main() {
167183
log_info "Starting Context-Engine Kubernetes deployment"
@@ -178,6 +194,7 @@ main() {
178194
deploy_indexer_services
179195
deploy_llamacpp
180196
deploy_ingress
197+
set_images
181198

182199
# Show status
183200
show_status

deploy/kubernetes/indexer-services.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ spec:
2626
image: context-engine:latest
2727
imagePullPolicy: IfNotPresent
2828
command: ["python", "/app/scripts/watch_index.py"]
29-
workingDir: /repos
29+
workingDir: /work
3030
env:
3131
- name: QDRANT_URL
3232
valueFrom:
@@ -109,7 +109,7 @@ spec:
109109
image: context-engine:latest
110110
imagePullPolicy: IfNotPresent
111111
command: ["python", "/app/scripts/ingest_code.py"]
112-
workingDir: /repos
112+
workingDir: /work
113113
env:
114114
- name: QDRANT_URL
115115
valueFrom:
@@ -166,7 +166,7 @@ spec:
166166
image: context-engine:latest
167167
imagePullPolicy: IfNotPresent
168168
command: ["python", "/app/scripts/create_indexes.py"]
169-
workingDir: /repos
169+
workingDir: /work
170170
env:
171171
- name: QDRANT_URL
172172
valueFrom:

deploy/kubernetes/ingress.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ metadata:
1010
app: context-engine
1111
annotations:
1212
# Nginx Ingress annotations
13+
nginx.ingress.kubernetes.io/use-regex: "true"
1314
nginx.ingress.kubernetes.io/rewrite-target: /$2
1415
nginx.ingress.kubernetes.io/ssl-redirect: "true"
1516
# Increase timeouts for SSE connections
@@ -26,7 +27,7 @@ spec:
2627
paths:
2728
# Qdrant
2829
- path: /qdrant(/|$)(.*)
29-
pathType: Prefix
30+
pathType: ImplementationSpecific
3031
backend:
3132
service:
3233
name: qdrant
@@ -35,7 +36,7 @@ spec:
3536

3637
# MCP Memory (SSE)
3738
- path: /mcp/memory(/|$)(.*)
38-
pathType: Prefix
39+
pathType: ImplementationSpecific
3940
backend:
4041
service:
4142
name: mcp-memory
@@ -44,7 +45,7 @@ spec:
4445

4546
# MCP Indexer (SSE)
4647
- path: /mcp/indexer(/|$)(.*)
47-
pathType: Prefix
48+
pathType: ImplementationSpecific
4849
backend:
4950
service:
5051
name: mcp-indexer
@@ -53,7 +54,7 @@ spec:
5354

5455
# MCP Memory HTTP
5556
- path: /mcp-http/memory(/|$)(.*)
56-
pathType: Prefix
57+
pathType: ImplementationSpecific
5758
backend:
5859
service:
5960
name: mcp-memory-http
@@ -62,7 +63,7 @@ spec:
6263

6364
# MCP Indexer HTTP
6465
- path: /mcp-http/indexer(/|$)(.*)
65-
pathType: Prefix
66+
pathType: ImplementationSpecific
6667
backend:
6768
service:
6869
name: mcp-indexer-http
@@ -71,7 +72,7 @@ spec:
7172

7273
# Llama.cpp (optional)
7374
- path: /llamacpp(/|$)(.*)
74-
pathType: Prefix
75+
pathType: ImplementationSpecific
7576
backend:
7677
service:
7778
name: llamacpp

deploy/kubernetes/qdrant.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ spec:
4949
mountPath: /qdrant/storage
5050
livenessProbe:
5151
httpGet:
52-
path: /
52+
path: /healthz
5353
port: http
5454
initialDelaySeconds: 30
5555
periodSeconds: 10
5656
readinessProbe:
5757
httpGet:
58-
path: /
58+
path: /readyz
5959
port: http
6060
initialDelaySeconds: 5
6161
periodSeconds: 5

0 commit comments

Comments
 (0)