-
Notifications
You must be signed in to change notification settings - Fork 89
Expand file tree
/
Copy pathmcp-server-deployment.yaml
More file actions
80 lines (80 loc) · 2.66 KB
/
mcp-server-deployment.yaml
File metadata and controls
80 lines (80 loc) · 2.66 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
{{- if .Values.clpConfig.mcp_server }}
apiVersion: "apps/v1"
kind: "Deployment"
metadata:
name: {{ include "clp.fullname" . }}-mcp-server
labels:
{{- include "clp.labels" . | nindent 4 }}
app.kubernetes.io/component: "mcp-server"
spec:
replicas: 1
selector:
matchLabels:
{{- include "clp.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: "mcp-server"
template:
metadata:
labels:
{{- include "clp.labels" . | nindent 8 }}
app.kubernetes.io/component: "mcp-server"
spec:
serviceAccountName: {{ include "clp.fullname" . }}-job-watcher
terminationGracePeriodSeconds: 60
initContainers:
- {{- include "clp.waitFor" (dict
"root" .
"type" "job"
"name" "db-table-creator"
) | nindent 10 }}
- {{- include "clp.waitFor" (dict
"root" .
"type" "job"
"name" "results-cache-indices-creator"
) | nindent 10 }}
containers:
- name: "mcp-server"
image: "{{ include "clp.image.ref" . }}"
imagePullPolicy: "{{ .Values.image.clpPackage.pullPolicy }}"
env:
- name: "CLP_DB_PASS"
valueFrom:
secretKeyRef:
name: {{ include "clp.fullname" . }}-database
key: "password"
- name: "CLP_DB_USER"
valueFrom:
secretKeyRef:
name: {{ include "clp.fullname" . }}-database
key: "username"
- name: "CLP_LOGGING_LEVEL"
value: {{ .Values.clpConfig.mcp_server.logging_level | quote }}
- name: "PYTHONPATH"
value: "/opt/clp/lib/python3/site-packages"
ports:
- name: "mcp-server"
containerPort: 8000
volumeMounts:
- name: "config"
mountPath: "/etc/clp-config.yaml"
subPath: "clp-config.yaml"
readOnly: true
command: [
"python3", "-u",
"-m", "clp_mcp_server.clp_mcp_server",
"--host", "0.0.0.0",
"--port", "8000",
"--config-path", "/etc/clp-config.yaml"
]
readinessProbe:
{{- include "clp.readinessProbeTimings" . | nindent 12 }}
httpGet: &mcp-server-health-check
path: "/health"
port: "mcp-server"
livenessProbe:
{{- include "clp.livenessProbeTimings" . | nindent 12 }}
httpGet: *mcp-server-health-check
volumes:
- name: "config"
configMap:
name: {{ include "clp.fullname" . }}-config
{{- end }}