|
| 1 | +{{- /* |
| 2 | + NOTES.txt for the "mcp-stack" Helm chart |
| 3 | + • Rendered after every install/upgrade. |
| 4 | + • Surfaces endpoints, credentials and helper commands so you can |
| 5 | + start interacting with the stack right away. |
| 6 | + • Set showSecrets to show secrets. |
| 7 | +*/ -}} |
| 8 | + |
| 9 | +{{- $ns := .Release.Namespace }} |
| 10 | +{{- $fullName := include "mcp-stack.fullname" . }} |
| 11 | + |
| 12 | +{{- /* ─── show / hide secrets ───────────────────────────── */}} |
| 13 | +{{- $showSecrets := false }} {{/* set to true to reveal passwords & keys */}} |
| 14 | + |
| 15 | +{{- /* ─── Resource names (keep in sync with _helpers.tpl) ─ */}} |
| 16 | +{{- $gatewaySvc := printf "%s-mcpgateway" $fullName }} |
| 17 | +{{- $ftSvc := printf "%s-mcp-fast-time-server" $fullName }} |
| 18 | +{{- $postgresSvc := printf "%s-postgres" $fullName }} |
| 19 | +{{- $redisSvc := printf "%s-redis" $fullName }} |
| 20 | +{{- $pgadminSvc := printf "%s-pgadmin" $fullName }} |
| 21 | + |
| 22 | +{{- $gwSecret := printf "%s-gateway-secret" $fullName }} |
| 23 | +{{- $pgSecret := include "mcp-stack.postgresSecretName" . }} |
| 24 | + |
| 25 | +{{- /* ─── Secret look-ups (only used when $showSecrets=true) */}} |
| 26 | +{{- $basicAuthPass := "" }} |
| 27 | +{{- $jwtKey := "" }} |
| 28 | +{{- $pgPass := "" }} |
| 29 | +{{- if $showSecrets }} |
| 30 | + {{- with (lookup "v1" "Secret" $ns $gwSecret) }} |
| 31 | + {{- $basicAuthPass = index .data "BASIC_AUTH_PASSWORD" | b64dec }} |
| 32 | + {{- $jwtKey = index .data "JWT_SECRET_KEY" | b64dec }} |
| 33 | + {{- end }} |
| 34 | + {{- with (lookup "v1" "Secret" $ns $pgSecret) }} |
| 35 | + {{- $pgPass = index .data "POSTGRES_PASSWORD" | b64dec }} |
| 36 | + {{- end }} |
| 37 | +{{- end }} |
| 38 | + |
| 39 | +{{- /* ─── Convenience ports ─────────────────────────────── */}} |
| 40 | +{{- $gwPort := .Values.mcpContextForge.service.port | default 80 }} |
| 41 | +{{- $pgPort := .Values.postgres.service.port | default 5432 }} |
| 42 | +{{- $redisPort := .Values.redis.service.port | default 6379 }} |
| 43 | +{{- $pgAdminPort := .Values.pgadmin.service.port | default 80 }} |
| 44 | + |
| 45 | +🎉 **{{ .Chart.Name }}** has been successfully deployed to namespace **{{ $ns }}**! |
| 46 | + |
| 47 | +{{- /* ════════════ MCP Gateway ════════════ */}} |
| 48 | +🔗 **MCP Gateway** |
| 49 | +{{- if .Values.mcpContextForge.ingress.enabled }} |
| 50 | + • Ingress URL : https://{{ .Values.mcpContextForge.ingress.host }}{{ .Values.mcpContextForge.ingress.path | default "/" }} |
| 51 | +{{- else }} |
| 52 | + • Service URL : http://{{ $gatewaySvc }}.{{ $ns }}.svc.cluster.local:{{ $gwPort }} |
| 53 | +{{- end }} |
| 54 | + • Basic-Auth : |
| 55 | + user = {{ .Values.mcpContextForge.secret.BASIC_AUTH_USER }} |
| 56 | +{{- if $showSecrets }} |
| 57 | + password = {{ $basicAuthPass }} |
| 58 | +{{- else }} |
| 59 | + password : <hidden> |
| 60 | +{{- end }} |
| 61 | + (kubectl = `kubectl -n {{ $ns }} get secret {{ $gwSecret }} -o jsonpath="{.data.BASIC_AUTH_PASSWORD}" | base64 -d`) |
| 62 | +{{- if $showSecrets }} |
| 63 | + • JWT signing key (JWT_SECRET_KEY) = {{ $jwtKey }} |
| 64 | +{{- else }} |
| 65 | + • JWT signing key (JWT_SECRET_KEY) : <hidden> |
| 66 | +{{- end }} |
| 67 | + (kubectl = `kubectl -n {{ $ns }} get secret {{ $gwSecret }} -o jsonpath="{.data.JWT_SECRET_KEY}" | base64 -d`) |
| 68 | + • Port-forward : `kubectl -n {{ $ns }} port-forward svc/{{ $gatewaySvc }} 4444:{{ $gwPort }}` |
| 69 | + |
| 70 | +{{- /* ════════════ Fast-Time-Server ════════════ */}} |
| 71 | +🔗 **Fast-Time-Server (SSE)** |
| 72 | + • Cluster URL : http://{{ $ftSvc }}.{{ $ns }}.svc.cluster.local |
| 73 | + • Via Gateway : {{- if .Values.mcpContextForge.ingress.enabled }} https://{{ .Values.mcpContextForge.ingress.host }}/fast-time {{- else }} http://localhost:4444/fast-time {{- end }} |
| 74 | + |
| 75 | +{{- /* ════════════ Datastores ════════════ */}} |
| 76 | +💾 **Postgres** |
| 77 | + • Host / Port : {{ $postgresSvc }}.{{ $ns }}.svc.cluster.local:{{ $pgPort }} |
| 78 | + • DB : {{ .Values.postgres.credentials.database }} |
| 79 | + • User : {{ .Values.postgres.credentials.user }} |
| 80 | +{{- if $showSecrets }} |
| 81 | + • Password : {{ $pgPass | default "<secret-not-yet-created>" }} |
| 82 | +{{- else }} |
| 83 | + • Password : <hidden> |
| 84 | +{{- end }} |
| 85 | + (kubectl = `kubectl -n {{ $ns }} get secret {{ $pgSecret }} -o jsonpath="{.data.POSTGRES_PASSWORD}" | base64 -d`) |
| 86 | + |
| 87 | +🔑 **Redis** |
| 88 | + • Host / Port : {{ $redisSvc }}.{{ $ns }}.svc.cluster.local:{{ $redisPort }} |
| 89 | + |
| 90 | +📊 **PGAdmin** |
| 91 | + • URL : http://{{ $pgadminSvc }}.{{ $ns }}.svc.cluster.local:{{ $pgAdminPort }} |
| 92 | + • Login : {{ .Values.pgadmin.env.email }} / (same Postgres password) |
| 93 | + |
| 94 | +{{- /* ════════════ Quick-start ════════════ */}} |
| 95 | +🚀 **Quick-start** |
| 96 | + |
| 97 | +```bash |
| 98 | +# 1) Forward the Gateway locally (skip if using ingress): |
| 99 | +kubectl -n {{ $ns }} port-forward svc/{{ $gatewaySvc }} 4444:{{ $gwPort }} & |
| 100 | + |
| 101 | +# 2) Obtain a JWT via Basic-Auth (requires 'jq'): |
| 102 | +{{- if $showSecrets }} |
| 103 | +export GW_TOKEN=$(curl -s -u '{{ .Values.mcpContextForge.secret.BASIC_AUTH_USER }}:{{ $basicAuthPass }}' \ |
| 104 | + -X POST http://localhost:4444/auth/login | jq -r '.access_token') |
| 105 | +{{- else }} |
| 106 | +# export GW_TOKEN=(fetch after you retrieve the password with kubectl) |
| 107 | +{{- end }} |
| 108 | + |
| 109 | +# 3) Register the Fast-Time-Server with the Gateway: |
| 110 | +curl -s -X POST \ |
| 111 | + -H "Authorization: Bearer $GW_TOKEN" \ |
| 112 | + -H "Content-Type: application/json" \ |
| 113 | + -d '{"name":"local_time","url":"http://{{ $ftSvc }}.{{ $ns }}.svc.cluster.local/sse"}' \ |
| 114 | + http://localhost:4444/gateways |
| 115 | +``` |
| 116 | + |
| 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/) |
0 commit comments