|
42 | 42 | {{- $redisPort := .Values.redis.service.port | default 6379 }}
|
43 | 43 | {{- $pgAdminPort := .Values.pgadmin.service.port | default 80 }}
|
44 | 44 |
|
45 |
| -🎉 **{{ .Chart.Name }}** has been successfully deployed to namespace **{{ $ns }}**! |
| 45 | +{{- /* ─── Deployment context information ─────────────────── */}} |
| 46 | +{{- $timestamp := now | date "2006-01-02 15:04:05 UTC" }} |
| 47 | +{{- $k8sVersion := .Capabilities.KubeVersion.Version }} |
| 48 | +{{- $helmVersion := .Capabilities.HelmVersion.Version }} |
| 49 | + |
| 50 | +🎉 **{{ .Chart.Name }}** has been successfully deployed! |
| 51 | + |
| 52 | +═══════════════════════════════════════════════════════════════════════════════ |
| 53 | + |
| 54 | +📋 **Deployment Summary** |
| 55 | + • Release Name : {{ .Release.Name }} |
| 56 | + • Namespace : {{ $ns }} |
| 57 | + • Chart Version : {{ .Chart.Version }} |
| 58 | + • App Version : {{ .Chart.AppVersion }} |
| 59 | + • Deployed At : {{ $timestamp }} |
| 60 | + • Revision : {{ .Release.Revision }} |
| 61 | + • Kubernetes : {{ $k8sVersion }} |
| 62 | + • Helm Version : {{ $helmVersion }} |
| 63 | + {{- with .Values.global.nameOverride }} |
| 64 | + • Name Override : {{ . }} |
| 65 | + {{- end }} |
| 66 | + {{- with .Values.global.fullnameOverride }} |
| 67 | + • Full Override : {{ . }} |
| 68 | + {{- end }} |
| 69 | + |
| 70 | +🏗️ **Infrastructure Stack** |
| 71 | + • MCP Gateway : {{ .Values.mcpContextForge.replicaCount }} replica(s) - {{ .Values.mcpContextForge.image.repository }}:{{ .Values.mcpContextForge.image.tag }} |
| 72 | + {{- if .Values.mcpFastTimeServer.enabled }} |
| 73 | + • Fast Time Srv : {{ .Values.mcpFastTimeServer.replicaCount }} replica(s) - {{ .Values.mcpFastTimeServer.image.repository }}:{{ .Values.mcpFastTimeServer.image.tag }} |
| 74 | + {{- end }} |
| 75 | + {{- if .Values.postgres.enabled }} |
| 76 | + • PostgreSQL : {{ .Values.postgres.image.repository }}:{{ .Values.postgres.image.tag }} |
| 77 | + {{- if .Values.postgres.persistence.enabled }} ({{ .Values.postgres.persistence.size }} storage){{ end }} |
| 78 | + {{- end }} |
| 79 | + {{- if .Values.redis.enabled }} |
| 80 | + • Redis Cache : {{ .Values.redis.image.repository }}:{{ .Values.redis.image.tag }} |
| 81 | + {{- end }} |
| 82 | + {{- if .Values.pgadmin.enabled }} |
| 83 | + • PgAdmin UI : {{ .Values.pgadmin.image.repository }}:{{ .Values.pgadmin.image.tag }} |
| 84 | + {{- end }} |
| 85 | + {{- if .Values.redisCommander.enabled }} |
| 86 | + • Redis UI : {{ .Values.redisCommander.image.repository }}:{{ .Values.redisCommander.image.tag }} |
| 87 | + {{- end }} |
| 88 | + |
| 89 | +🔧 **Configuration** |
| 90 | + {{- if .Values.mcpContextForge.hpa.enabled }} |
| 91 | + • Auto-Scaling : {{ .Values.mcpContextForge.hpa.minReplicas }} - {{ .Values.mcpContextForge.hpa.maxReplicas }} replicas (CPU: {{ .Values.mcpContextForge.hpa.targetCPUUtilizationPercentage }}%) |
| 92 | + {{- end }} |
| 93 | + {{- if .Values.mcpContextForge.ingress.enabled }} |
| 94 | + • Ingress : {{ .Values.mcpContextForge.ingress.className }} @ {{ .Values.mcpContextForge.ingress.host }} |
| 95 | + {{- end }} |
| 96 | + • Migration : {{ if .Values.migration.enabled }}✅ Enabled{{ else }}❌ Disabled{{ end }} |
| 97 | + • Dev Mode : {{ if eq (.Values.mcpContextForge.config.DEV_MODE | default "false") "true" }}⚠️ ENABLED{{ else }}✅ Production{{ end }} |
| 98 | + |
| 99 | +═══════════════════════════════════════════════════════════════════════════════ |
| 100 | + |
| 101 | +{{- /* ════════════ Migration Status ════════════ */}} |
| 102 | +{{- if .Values.migration.enabled }} |
| 103 | +📊 **Database Migration** |
| 104 | + • Status : `kubectl get jobs -n {{ $ns }} -l app.kubernetes.io/component=migration` |
| 105 | + • Logs : `kubectl logs -n {{ $ns }} -l app.kubernetes.io/component=migration` |
| 106 | + • Job Details : `kubectl describe job -n {{ $ns }} {{ $fullName }}-migration` |
| 107 | + {{- with (lookup "batch/v1" "Job" $ns (printf "%s-migration" $fullName)) }} |
| 108 | + {{- if .status.conditions }} |
| 109 | + {{- range .status.conditions }} |
| 110 | + {{- if eq .type "Complete" }} |
| 111 | + {{- if eq .status "True" }} |
| 112 | + • ✅ Migration completed successfully at {{ .lastTransitionTime }} |
| 113 | + {{- else }} |
| 114 | + • ⏳ Migration in progress... |
| 115 | + {{- end }} |
| 116 | + {{- else if eq .type "Failed" }} |
| 117 | + {{- if eq .status "True" }} |
| 118 | + • ❌ Migration failed at {{ .lastTransitionTime }} - check logs above |
| 119 | + {{- end }} |
| 120 | + {{- end }} |
| 121 | + {{- end }} |
| 122 | + {{- else }} |
| 123 | + • ⏳ Migration job starting... |
| 124 | + {{- end }} |
| 125 | + {{- else }} |
| 126 | + • ⏳ Migration job not found - may still be creating... |
| 127 | + {{- end }} |
| 128 | + |
| 129 | +{{- else }} |
| 130 | +📊 **Database Migration** |
| 131 | + • Database migrations are **disabled** (migration.enabled=false) |
| 132 | + • To enable: `helm upgrade {{ .Release.Name }} --set migration.enabled=true -n {{ $ns }}` |
| 133 | +{{- end }} |
46 | 134 |
|
47 | 135 | {{- /* ════════════ MCP Gateway ════════════ */}}
|
48 | 136 | 🔗 **MCP Gateway**
|
49 | 137 | {{- if .Values.mcpContextForge.ingress.enabled }}
|
50 |
| - • Ingress URL : https://{{ .Values.mcpContextForge.ingress.host }}{{ .Values.mcpContextForge.ingress.path | default "/" }} |
| 138 | + • Primary URL : https://{{ .Values.mcpContextForge.ingress.host }}{{ .Values.mcpContextForge.ingress.path | default "/" }} |
| 139 | + • Health Check : https://{{ .Values.mcpContextForge.ingress.host }}/health |
51 | 140 | {{- else }}
|
52 |
| - • Service URL : http://{{ $gatewaySvc }}.{{ $ns }}.svc.cluster.local:{{ $gwPort }} |
| 141 | + • Service URL : http://{{ $gatewaySvc }}.{{ $ns }}.svc.cluster.local:{{ $gwPort }} |
| 142 | + • Health Check : http://{{ $gatewaySvc }}.{{ $ns }}.svc.cluster.local:{{ $gwPort }}/health |
53 | 143 | {{- end }}
|
54 | 144 | • Basic-Auth :
|
55 | 145 | user = {{ .Values.mcpContextForge.secret.BASIC_AUTH_USER }}
|
|
68 | 158 | • Port-forward : `kubectl -n {{ $ns }} port-forward svc/{{ $gatewaySvc }} 4444:{{ $gwPort }}`
|
69 | 159 |
|
70 | 160 | {{- /* ════════════ Fast-Time-Server ════════════ */}}
|
| 161 | +{{- if .Values.mcpFastTimeServer.enabled }} |
71 | 162 | 🔗 **Fast-Time-Server (SSE)**
|
72 | 163 | • Cluster URL : http://{{ $ftSvc }}.{{ $ns }}.svc.cluster.local
|
73 | 164 | • Via Gateway : {{- if .Values.mcpContextForge.ingress.enabled }} https://{{ .Values.mcpContextForge.ingress.host }}/fast-time {{- else }} http://localhost:4444/fast-time {{- end }}
|
| 165 | + • Port-forward : `kubectl -n {{ $ns }} port-forward svc/{{ $ftSvc }} 8080:80` |
| 166 | +{{- end }} |
74 | 167 |
|
75 | 168 | {{- /* ════════════ Datastores ════════════ */}}
|
76 |
| -💾 **Postgres** |
| 169 | +{{- if .Values.postgres.enabled }} |
| 170 | +💾 **PostgreSQL Database** |
77 | 171 | • Host / Port : {{ $postgresSvc }}.{{ $ns }}.svc.cluster.local:{{ $pgPort }}
|
78 |
| - • DB : {{ .Values.postgres.credentials.database }} |
79 |
| - • User : {{ .Values.postgres.credentials.user }} |
| 172 | + • Database : {{ .Values.postgres.credentials.database }} |
| 173 | + • Username : {{ .Values.postgres.credentials.user }} |
80 | 174 | {{- if $showSecrets }}
|
81 | 175 | • Password : {{ $pgPass | default "<secret-not-yet-created>" }}
|
82 | 176 | {{- else }}
|
83 | 177 | • Password : <hidden>
|
84 | 178 | {{- end }}
|
85 | 179 | (kubectl = `kubectl -n {{ $ns }} get secret {{ $pgSecret }} -o jsonpath="{.data.POSTGRES_PASSWORD}" | base64 -d`)
|
| 180 | + {{- if .Values.postgres.persistence.enabled }} |
| 181 | + • Storage : {{ .Values.postgres.persistence.size }} ({{ .Values.postgres.persistence.storageClassName }}) |
| 182 | + {{- end }} |
| 183 | + • Port-forward : `kubectl -n {{ $ns }} port-forward svc/{{ $postgresSvc }} 5432:{{ $pgPort }}` |
| 184 | +{{- end }} |
86 | 185 |
|
87 |
| -🔑 **Redis** |
| 186 | +{{- if .Values.redis.enabled }} |
| 187 | +🔑 **Redis Cache** |
88 | 188 | • Host / Port : {{ $redisSvc }}.{{ $ns }}.svc.cluster.local:{{ $redisPort }}
|
| 189 | + • Port-forward : `kubectl -n {{ $ns }} port-forward svc/{{ $redisSvc }} 6379:{{ $redisPort }}` |
| 190 | +{{- end }} |
| 191 | + |
| 192 | +{{- /* ════════════ Management UIs ════════════ */}} |
| 193 | +{{- if .Values.pgadmin.enabled }} |
| 194 | +📊 **PgAdmin (Database UI)** |
| 195 | + • Internal URL : http://{{ $pgadminSvc }}.{{ $ns }}.svc.cluster.local:{{ $pgAdminPort }} |
| 196 | + • Login Email : {{ .Values.pgadmin.env.email }} |
| 197 | + • Password : (same as PostgreSQL password above) |
| 198 | + • Port-forward : `kubectl -n {{ $ns }} port-forward svc/{{ $pgadminSvc }} 8080:{{ $pgAdminPort }}` |
| 199 | + • Local Access: http://localhost:8080 (after port-forward) |
| 200 | +{{- end }} |
89 | 201 |
|
90 |
| -📊 **PGAdmin** |
91 |
| - • URL : http://{{ $pgadminSvc }}.{{ $ns }}.svc.cluster.local:{{ $pgAdminPort }} |
92 |
| - • Login : {{ .Values.pgadmin.env.email }} / (same Postgres password) |
| 202 | +{{- if .Values.redisCommander.enabled }} |
| 203 | +📊 **Redis Commander (Cache UI)** |
| 204 | + • Internal URL : http://{{ $redisSvc }}-commander.{{ $ns }}.svc.cluster.local:8081 |
| 205 | + • Port-forward : `kubectl -n {{ $ns }} port-forward svc/{{ $fullName }}-redis-commander 8081:8081` |
| 206 | + • Local Access: http://localhost:8081 (after port-forward) |
| 207 | +{{- end }} |
| 208 | + |
| 209 | +{{- /* ════════════ Cluster Information ════════════ */}} |
| 210 | +🏢 **Cluster Context** |
| 211 | +```bash |
| 212 | +# Current cluster context |
| 213 | +kubectl config current-context |
| 214 | + |
| 215 | +# Verify deployment |
| 216 | +kubectl get all -n {{ $ns }} |
| 217 | +helm status {{ .Release.Name }} -n {{ $ns }} |
| 218 | + |
| 219 | +# Resource usage |
| 220 | +kubectl top pods -n {{ $ns }} |
| 221 | +kubectl get pvc -n {{ $ns }} |
| 222 | +``` |
| 223 | + |
| 224 | +{{- /* ════════════ Troubleshooting ════════════ */}} |
| 225 | +🔧 **Troubleshooting & Monitoring** |
| 226 | + |
| 227 | +```bash |
| 228 | +# === Resource Status === |
| 229 | +kubectl get all -n {{ $ns }} |
| 230 | +kubectl get pvc -n {{ $ns }} |
| 231 | +kubectl get secrets -n {{ $ns }} |
| 232 | + |
| 233 | +# === Migration Debugging === |
| 234 | +{{- if .Values.migration.enabled }} |
| 235 | +kubectl get jobs -n {{ $ns }} -l app.kubernetes.io/component=migration |
| 236 | +kubectl describe job -n {{ $ns }} {{ $fullName }}-migration |
| 237 | +kubectl logs -n {{ $ns }} -l app.kubernetes.io/component=migration --tail=50 |
| 238 | +{{- end }} |
| 239 | + |
| 240 | +# === Gateway Debugging === |
| 241 | +kubectl get pods -n {{ $ns }} -l app={{ $gatewaySvc }} |
| 242 | +kubectl describe deployment -n {{ $ns }} {{ $gatewaySvc }} |
| 243 | +kubectl logs -n {{ $ns }} -l app={{ $gatewaySvc }} --tail=50 |
| 244 | + |
| 245 | +# === Database Connectivity === |
| 246 | +kubectl exec -n {{ $ns }} deployment/{{ $gatewaySvc }} -- python /app/mcpgateway/utils/db_isready.py |
| 247 | +{{- if .Values.postgres.enabled }} |
| 248 | +kubectl exec -n {{ $ns }} deployment/{{ $postgresSvc }} -- pg_isready -U {{ .Values.postgres.credentials.user }} |
| 249 | +{{- end }} |
| 250 | + |
| 251 | +# === Performance Monitoring === |
| 252 | +kubectl top pods -n {{ $ns }} |
| 253 | +kubectl get hpa -n {{ $ns }} |
| 254 | +kubectl get events -n {{ $ns }} --sort-by='.lastTimestamp' --field-selector type!=Normal |
| 255 | + |
| 256 | +# === Port Forwarding for Local Access === |
| 257 | +kubectl -n {{ $ns }} port-forward svc/{{ $gatewaySvc }} 4444:{{ $gwPort }} |
| 258 | +{{- if .Values.pgadmin.enabled }} |
| 259 | +kubectl -n {{ $ns }} port-forward svc/{{ $pgadminSvc }} 8080:{{ $pgAdminPort }} |
| 260 | +{{- end }} |
| 261 | +{{- if .Values.postgres.enabled }} |
| 262 | +kubectl -n {{ $ns }} port-forward svc/{{ $postgresSvc }} 5432:{{ $pgPort }} |
| 263 | +{{- end }} |
| 264 | +``` |
93 | 265 |
|
94 | 266 | {{- /* ════════════ Quick-start ════════════ */}}
|
95 |
| -🚀 **Quick-start** |
| 267 | +🚀 **Quick-start Guide** |
96 | 268 |
|
97 | 269 | ```bash
|
98 |
| -# 1) Forward the Gateway locally (skip if using ingress): |
| 270 | +# 1) Verify deployment is ready |
| 271 | +kubectl get pods -n {{ $ns }} -w |
| 272 | + |
| 273 | +# 2) Forward the Gateway locally (skip if using ingress) |
99 | 274 | kubectl -n {{ $ns }} port-forward svc/{{ $gatewaySvc }} 4444:{{ $gwPort }} &
|
100 | 275 |
|
101 |
| -# 2) Obtain a JWT via Basic-Auth (requires 'jq'): |
| 276 | +# 3) Get credentials and obtain JWT |
102 | 277 | {{- if $showSecrets }}
|
103 | 278 | export GW_TOKEN=$(curl -s -u '{{ .Values.mcpContextForge.secret.BASIC_AUTH_USER }}:{{ $basicAuthPass }}' \
|
104 | 279 | -X POST http://localhost:4444/auth/login | jq -r '.access_token')
|
105 | 280 | {{- else }}
|
106 |
| -# export GW_TOKEN=(fetch after you retrieve the password with kubectl) |
| 281 | +export GW_PASS=$(kubectl -n {{ $ns }} get secret {{ $gwSecret }} -o jsonpath="{.data.BASIC_AUTH_PASSWORD}" | base64 -d) |
| 282 | +export GW_TOKEN=$(curl -s -u '{{ .Values.mcpContextForge.secret.BASIC_AUTH_USER }}:$GW_PASS' \ |
| 283 | + -X POST http://localhost:4444/auth/login | jq -r '.access_token') |
107 | 284 | {{- end }}
|
108 | 285 |
|
109 |
| -# 3) Register the Fast-Time-Server with the Gateway: |
| 286 | +# 4) Test the gateway health |
| 287 | +curl -s http://localhost:4444/health | jq . |
| 288 | + |
| 289 | +{{- if .Values.mcpFastTimeServer.enabled }} |
| 290 | +# 5) Register the Fast-Time-Server with the Gateway |
110 | 291 | curl -s -X POST \
|
111 | 292 | -H "Authorization: Bearer $GW_TOKEN" \
|
112 | 293 | -H "Content-Type: application/json" \
|
113 | 294 | -d '{"name":"local_time","url":"http://{{ $ftSvc }}.{{ $ns }}.svc.cluster.local/sse"}' \
|
114 | 295 | http://localhost:4444/gateways
|
| 296 | + |
| 297 | +# 6) Test the time server registration |
| 298 | +curl -s -H "Authorization: Bearer $GW_TOKEN" http://localhost:4444/gateways | jq . |
| 299 | +{{- end }} |
115 | 300 | ```
|
116 | 301 |
|
117 |
| -📚 **Further reading** |
118 |
| -* [https://ibm.github.io/mcp-context-forge/deployment/helm/](https://ibm.github.io/mcp-context-forge/deployment/helm/) |
119 |
| -* [https://ibm.github.io/mcp-context-forge/testing/basic/](https://ibm.github.io/mcp-context-forge/testing/basic/) |
| 302 | +═══════════════════════════════════════════════════════════════════════════════ |
| 303 | + |
| 304 | +📚 **Documentation & Support** |
| 305 | + • Helm Chart : https://github.com/IBM/mcp-context-forge/tree/main/charts/mcp-stack |
| 306 | + • Documentation : https://ibm.github.io/mcp-context-forge/deployment/helm/ |
| 307 | + • API Testing : https://ibm.github.io/mcp-context-forge/testing/basic/ |
| 308 | + • Issues : https://github.com/IBM/mcp-context-forge/issues |
| 309 | + |
| 310 | +📋 **Next Steps** |
| 311 | + 1. Verify all pods are Running: `kubectl get pods -n {{ $ns }}` |
| 312 | + 2. Check gateway health: `curl http://localhost:4444/health` (after port-forward) |
| 313 | + 3. Register MCP servers with the gateway using the API |
| 314 | + 4. Configure your MCP clients to use: {{ if .Values.mcpContextForge.ingress.enabled }}https://{{ .Values.mcpContextForge.ingress.host }}{{ else }}http://localhost:4444{{ end }} |
0 commit comments