Skip to content

Commit 1c8ccd5

Browse files
authored
Merge pull request #180 from IBM/helm-cleanup
Cleanup helm charts
2 parents 297da7d + ed3cdde commit 1c8ccd5

8 files changed

+92
-67
lines changed

charts/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ You can use the `helm template` and `yq` and check your templates. Example:
228228
```bash
229229
helm lint .
230230
helm template . | yq '.spec.template.spec.containers[0] | {readinessProbe,livenessProbe}'
231+
helm template mcp-stack . -f my-values.yaml > /tmp/all.yaml
231232
```
232233

233234
---

charts/mcp-stack/templates/deployment-mcp-fast-time-server.yaml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
1+
{{- /* -------------------------------------------------------------------
2+
DEPLOYMENT — mcp-fast-time-server
3+
• Uses helper so the name follows <release>-mcp-stack-* convention.
4+
• Includes probes and resource limits already defined in values.yaml.
5+
------------------------------------------------------------------- */}}
6+
17
{{- if .Values.mcpFastTimeServer.enabled }}
28
apiVersion: apps/v1
39
kind: Deployment
410
metadata:
5-
name: mcp-fast-time-server
11+
# <release>-mcp-stack-mcp-fast-time-server
12+
name: {{ include "mcp-stack.fullname" . }}-mcp-fast-time-server
13+
labels:
14+
{{- include "mcp-stack.labels" . | nindent 4 }}
15+
app: {{ include "mcp-stack.fullname" . }}-mcp-fast-time-server
616
spec:
717
replicas: {{ .Values.mcpFastTimeServer.replicaCount }}
818
selector:
919
matchLabels:
10-
app: mcp-fast-time-server
20+
app: {{ include "mcp-stack.fullname" . }}-mcp-fast-time-server
1121
template:
1222
metadata:
1323
labels:
14-
app: mcp-fast-time-server
24+
app: {{ include "mcp-stack.fullname" . }}-mcp-fast-time-server
1525
spec:
1626
containers:
1727
- name: mcp-fast-time-server

charts/mcp-stack/templates/deployment-mcpgateway.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ spec:
8888
################################################################
8989
# HEALTH & READINESS PROBES
9090
################################################################
91+
{{- with .Values.mcpContextForge.probes.startup }}
92+
startupProbe:
93+
{{- include "helpers.renderProbe" (dict "probe" . "root" $) | nindent 12 }}
94+
{{- end }}
95+
9196
{{- with .Values.mcpContextForge.probes.readiness }}
9297
readinessProbe:
9398
{{- include "helpers.renderProbe" (dict "probe" . "root" $) | nindent 12 }}

charts/mcp-stack/templates/deployment-redis-commander.yaml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,32 @@ spec:
2525
- name: redis-commander
2626
image: "{{ .Values.redisCommander.image.repository }}:{{ .Values.redisCommander.image.tag }}"
2727
imagePullPolicy: {{ .Values.redisCommander.image.pullPolicy }}
28+
29+
# Expose HTTP port inside the pod
2830
ports:
2931
- name: http
3032
containerPort: {{ .Values.redisCommander.service.port }}
33+
34+
# ─── Readiness probe ───
35+
{{- with .Values.redisCommander.probes.readiness }}
36+
readinessProbe:
37+
{{- include "helpers.renderProbe" (dict "probe" . "root" $) | nindent 12 }}
38+
{{- end }}
39+
40+
# ─── Liveness probe ───
41+
{{- with .Values.redisCommander.probes.liveness }}
42+
livenessProbe:
43+
{{- include "helpers.renderProbe" (dict "probe" . "root" $) | nindent 12 }}
44+
{{- end }}
45+
46+
# Point Redis-Commander at the in-cluster Redis service
3147
env:
32-
# Format: alias:host:port
33-
- name: REDIS_HOSTS
34-
value: "local:{{ .Values.mcpContextForge.env.redis.host }}:{{ .Values.mcpContextForge.env.redis.port }}"
48+
- name: REDIS_HOST
49+
value: {{ printf "%s-redis" (include "mcp-stack.fullname" .) }}
50+
- name: REDIS_PORT
51+
value: "{{ .Values.redis.service.port }}"
52+
53+
# ─── Resource limits & requests ───
3554
{{- with .Values.redisCommander.resources }}
3655
resources: {{- toYaml . | nindent 12 }}
3756
{{- end }}

charts/mcp-stack/templates/ingress.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
{{- /*
2+
Ingress
3+
• Routes:
4+
- / → mcp-context-forge (Gateway)
5+
- /fast-time → mcp-fast-time-server (optional)
6+
• All service names use the same helper so they follow the
7+
<release>-mcp-stack-* naming convention.
8+
*/ -}}
19
{{- if .Values.mcpContextForge.ingress.enabled }}
210
apiVersion: networking.k8s.io/v1
311
kind: Ingress
@@ -13,19 +21,22 @@ spec:
1321
- host: {{ .Values.mcpContextForge.ingress.host }}
1422
http:
1523
paths:
24+
# ─── Gateway root ───
1625
- path: {{ .Values.mcpContextForge.ingress.path }}
1726
pathType: {{ .Values.mcpContextForge.ingress.pathType }}
1827
backend:
1928
service:
2029
name: {{ include "mcp-stack.fullname" . }}-mcpgateway
2130
port:
2231
number: {{ .Values.mcpContextForge.service.port }}
32+
33+
# ─── Fast-Time-Server (optional) ───
2334
{{- if and .Values.mcpFastTimeServer.enabled .Values.mcpFastTimeServer.ingress.enabled }}
2435
- path: {{ .Values.mcpFastTimeServer.ingress.path }}
2536
pathType: {{ .Values.mcpFastTimeServer.ingress.pathType }}
2637
backend:
2738
service:
28-
name: mcp-fast-time-server
39+
name: {{ include "mcp-stack.fullname" . }}-mcp-fast-time-server
2940
port:
3041
number: {{ .Values.mcpFastTimeServer.ingress.servicePort }}
3142
{{- end }}

charts/mcp-stack/templates/service-mcp-fast-time-server.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@
22
apiVersion: v1
33
kind: Service
44
metadata:
5-
name: mcp-fast-time-server
5+
# <release>-mcp-stack-mcp-fast-time-server
6+
name: {{ include "mcp-stack.fullname" . }}-mcp-fast-time-server
7+
labels:
8+
{{- include "mcp-stack.labels" . | nindent 4 }}
9+
app: {{ include "mcp-stack.fullname" . }}-mcp-fast-time-server
610
spec:
11+
type: ClusterIP
712
selector:
8-
app: mcp-fast-time-server
13+
app: {{ include "mcp-stack.fullname" . }}-mcp-fast-time-server
914
ports:
10-
- protocol: TCP
11-
port: 80
12-
targetPort: {{ .Values.mcpFastTimeServer.port }}
15+
- name: http
16+
protocol: TCP
17+
port: 80 # stable service port
18+
targetPort: {{ .Values.mcpFastTimeServer.port }} # containerPort (8080)
1319
{{- end }}
Lines changed: 11 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,22 @@
11
{{- /*
2-
Redis-Commander Deployment
2+
Redis-Commander Service
33
*/ -}}
44
{{- if .Values.redisCommander.enabled }}
5-
apiVersion: apps/v1
6-
kind: Deployment
5+
apiVersion: v1
6+
kind: Service
77
metadata:
8+
# <release>-mcp-stack-redis-commander
89
name: {{ include "mcp-stack.fullname" . }}-redis-commander
910
labels:
1011
{{- include "mcp-stack.labels" . | nindent 4 }}
1112
app: redis-commander
1213
spec:
13-
replicas: 1
14+
type: {{ .Values.redisCommander.service.type }} # ClusterIP / NodePort / LoadBalancer
1415
selector:
15-
matchLabels:
16-
app: redis-commander
17-
release: {{ .Release.Name }}
18-
template:
19-
metadata:
20-
labels:
21-
app: redis-commander
22-
release: {{ .Release.Name }}
23-
spec:
24-
containers:
25-
- name: redis-commander
26-
image: "{{ .Values.redisCommander.image.repository }}:{{ .Values.redisCommander.image.tag }}"
27-
imagePullPolicy: {{ .Values.redisCommander.image.pullPolicy }}
28-
29-
# Expose HTTP port inside the pod
30-
ports:
31-
- name: http
32-
containerPort: {{ .Values.redisCommander.service.port }}
33-
34-
# ─── Readiness probe ───
35-
{{- with .Values.redisCommander.probes.readiness }}
36-
readinessProbe:
37-
{{- include "helpers.renderProbe" (dict "probe" . "root" $) | nindent 12 }}
38-
{{- end }}
39-
40-
# ─── Liveness probe ───
41-
{{- with .Values.redisCommander.probes.liveness }}
42-
livenessProbe:
43-
{{- include "helpers.renderProbe" (dict "probe" . "root" $) | nindent 12 }}
44-
{{- end }}
45-
46-
# Point Redis-Commander at the in-cluster Redis service
47-
env:
48-
- name: REDIS_HOST
49-
value: {{ printf "%s-redis" (include "mcp-stack.fullname" .) }}
50-
- name: REDIS_PORT
51-
value: "{{ .Values.redis.service.port }}"
52-
53-
# ─── Resource limits & requests ───
54-
{{- with .Values.redisCommander.resources }}
55-
resources: {{- toYaml . | nindent 12 }}
56-
{{- end }}
16+
app: redis-commander
17+
release: {{ .Release.Name }}
18+
ports:
19+
- name: http
20+
port: {{ .Values.redisCommander.service.port }} # external service port (8081 by default)
21+
targetPort: http # containerPort named "http" in the Deployment
5722
{{- end }}

charts/mcp-stack/values.yaml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,29 @@ mcpContextForge:
2727

2828
# Health & readiness probes
2929
probes:
30+
startup:
31+
# Uncomment to enable sleep startup probe; useful for long-running initializations
32+
type: exec
33+
command: ["sh", "-c", "sleep 10"]
34+
timeoutSeconds: 15 # must exceed the 10-second sleep
35+
periodSeconds: 5
36+
failureThreshold: 1
37+
3038
readiness:
3139
type: http
3240
path: /ready
3341
port: 4444
34-
initialDelaySeconds: 5 # wait 5 s after container start
35-
periodSeconds: 10 # check every 10 s
36-
timeoutSeconds: 2 # fail if no response in 2 s
37-
successThreshold: 1 # one success flips it back to healthy
38-
failureThreshold: 3 # three failures mark pod un-ready
42+
initialDelaySeconds: 15 # wait 15 s after container start
43+
periodSeconds: 10 # check every 10 s
44+
timeoutSeconds: 2 # fail if no response in 2 s
45+
successThreshold: 1 # one success flips it back to healthy
46+
failureThreshold: 3 # three failures mark pod un-ready
3947

4048
liveness:
4149
type: http
4250
path: /health
4351
port: 4444
44-
initialDelaySeconds: 5
52+
initialDelaySeconds: 10 # wait 10 s after container start
4553
periodSeconds: 15
4654
timeoutSeconds: 2
4755
successThreshold: 1
@@ -289,7 +297,7 @@ redis:
289297
readiness:
290298
type: exec
291299
command: ["redis-cli", "PING"]
292-
initialDelaySeconds: 3
300+
initialDelaySeconds: 10
293301
periodSeconds: 10
294302
timeoutSeconds: 2
295303
successThreshold: 1
@@ -338,7 +346,7 @@ pgadmin:
338346
type: http
339347
path: /misc/ping # lightweight endpoint
340348
port: 80
341-
initialDelaySeconds: 5
349+
initialDelaySeconds: 15
342350
periodSeconds: 10
343351
timeoutSeconds: 2
344352
successThreshold: 1
@@ -384,7 +392,7 @@ redisCommander:
384392
type: http
385393
path: / # root returns 200 OK
386394
port: 8081
387-
initialDelaySeconds: 5
395+
initialDelaySeconds: 15
388396
periodSeconds: 10
389397
timeoutSeconds: 2
390398
successThreshold: 1

0 commit comments

Comments
 (0)