Skip to content

Commit 315335a

Browse files
authored
Merge pull request #79 from manavgup/feature/helm-chart
published Helm chart for Kubernetes deployment
2 parents bdcf18f + 6d5cc56 commit 315335a

File tree

7 files changed

+201
-0
lines changed

7 files changed

+201
-0
lines changed

charts/mcpgateway/Chart.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: v2
2+
name: mcpgateway
3+
description: A Helm chart for deploying MCP Gateway to Kubernetes
4+
type: application
5+
version: 0.1.0
6+
appVersion: "latest"
7+
keywords:
8+
- mcp
9+
- gateway
10+
- kubernetes
11+
- helm
12+
maintainers:
13+
- name: MCP Team
14+
15+
sources:
16+
- https://github.com/IBM/mcp-context-forge
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{{- define "mcpgateway.name" -}}
2+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
3+
{{- end }}
4+
5+
{{- define "mcpgateway.fullname" -}}
6+
{{- if .Values.fullnameOverride }}
7+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
8+
{{- else -}}
9+
{{- $name := default .Chart.Name .Values.nameOverride -}}
10+
{{- if contains $name .Release.Name -}}
11+
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
12+
{{- else -}}
13+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
14+
{{- end -}}
15+
{{- end -}}
16+
{{- end }}
17+
18+
{{- define "mcpgateway.chart" -}}
19+
{{- printf "%s-%s" .Chart.Name .Chart.Version -}}
20+
{{- end }}
21+
22+
{{- define "mcpgateway.labels" -}}
23+
app.kubernetes.io/name: {{ include "mcpgateway.name" . }}
24+
helm.sh/chart: {{ include "mcpgateway.chart" . }}
25+
app.kubernetes.io/managed-by: {{ .Release.Service }}
26+
app.kubernetes.io/instance: {{ .Release.Name }}
27+
app.kubernetes.io/version: {{ .Chart.AppVersion }}
28+
{{- end }}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: {{ include "mcpgateway.fullname" . }}-config
5+
labels:
6+
app: {{ include "mcpgateway.name" . }}
7+
chart: {{ include "mcpgateway.chart" . }}
8+
release: {{ .Release.Name }}
9+
heritage: {{ .Release.Service }}
10+
data:
11+
# Add any configuration data here as key-value pairs
12+
# Example:
13+
# config.yaml: |-
14+
# key: value
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: {{ include "mcpgateway.fullname" . }}
5+
labels:
6+
app: {{ include "mcpgateway.name" . }}
7+
chart: {{ include "mcpgateway.chart" . }}
8+
release: {{ .Release.Name }}
9+
heritage: {{ .Release.Service }}
10+
spec:
11+
replicas: 1
12+
selector:
13+
matchLabels:
14+
app: {{ include "mcpgateway.name" . }}
15+
release: {{ .Release.Name }}
16+
template:
17+
metadata:
18+
labels:
19+
app: {{ include "mcpgateway.name" . }}
20+
release: {{ .Release.Name }}
21+
spec:
22+
containers:
23+
- name: mcpgateway
24+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
25+
imagePullPolicy: {{ .Values.image.pullPolicy }}
26+
ports:
27+
- containerPort: {{ .Values.env.PORT | default 4444 | int }}
28+
env:
29+
{{- range $key, $value := .Values.env }}
30+
- name: {{ $key }}
31+
{{- if and (index $.Values.secrets $key) (not (empty (index $.Values.secrets $key))) }}
32+
valueFrom:
33+
secretKeyRef:
34+
name: {{ index $.Values.secrets $key }}
35+
key: {{ $key }}
36+
{{- else }}
37+
value: {{ $value | quote }}
38+
{{- end }}
39+
{{- end }}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{{- if .Values.ingress.enabled }}
2+
apiVersion: networking.k8s.io/v1
3+
kind: Ingress
4+
metadata:
5+
name: {{ include "mcpgateway.fullname" . }}
6+
labels:
7+
app: {{ include "mcpgateway.name" . }}
8+
chart: {{ include "mcpgateway.chart" . }}
9+
release: {{ .Release.Name }}
10+
heritage: {{ .Release.Service }}
11+
annotations:
12+
{{ toYaml .Values.ingress.annotations | indent 4 }}
13+
spec:
14+
rules:
15+
{{- range .Values.ingress.hosts }}
16+
- host: {{ .host }}
17+
http:
18+
paths:
19+
{{- range .paths }}
20+
- path: {{ .path }}
21+
pathType: {{ .pathType }}
22+
backend:
23+
service:
24+
name: {{ include "mcpgateway.fullname" $ }}
25+
port:
26+
number: {{ $.Values.service.port }}
27+
{{- end }}
28+
{{- end }}
29+
{{- if .Values.ingress.tls }}
30+
tls:
31+
{{ toYaml .Values.ingress.tls | indent 4 }}
32+
{{- end }}
33+
{{- end }}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: {{ include "mcpgateway.fullname" . }}
5+
labels:
6+
app: {{ include "mcpgateway.name" . }}
7+
chart: {{ include "mcpgateway.chart" . }}
8+
release: {{ .Release.Name }}
9+
heritage: {{ .Release.Service }}
10+
spec:
11+
type: {{ .Values.service.type }}
12+
ports:
13+
- port: {{ .Values.service.port }}
14+
targetPort: {{ .Values.env.PORT | default 4444 | int }}
15+
protocol: TCP
16+
name: http
17+
selector:
18+
app: {{ include "mcpgateway.name" . }}
19+
release: {{ .Release.Name }}

charts/mcpgateway/values.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Default values for mcpgateway Helm chart
2+
3+
image:
4+
repository: ghcr.io/ibm/mcp-context-forge
5+
tag: local-arm64
6+
pullPolicy: IfNotPresent
7+
8+
env:
9+
APP_NAME: "MCP_Gateway"
10+
HOST: "0.0.0.0"
11+
PORT: 4444
12+
DATABASE_URL: "sqlite:///./mcp.db"
13+
APP_ROOT_PATH: ""
14+
CACHE_TYPE: "database"
15+
REDIS_URL: "redis://redis:6379/0"
16+
CACHE_PREFIX: "mcpgw:"
17+
SESSION_TTL: 3600
18+
MESSAGE_TTL: 600
19+
BASIC_AUTH_USER: "admin"
20+
BASIC_AUTH_PASSWORD: "changeme"
21+
AUTH_REQUIRED: "true"
22+
JWT_SECRET_KEY: "my-test-key"
23+
JWT_ALGORITHM: "HS256"
24+
TOKEN_EXPIRY: 10080
25+
AUTH_ENCRYPTION_SECRET: "my-test-salt"
26+
MCPGATEWAY_UI_ENABLED: "true"
27+
MCPGATEWAY_ADMIN_API_ENABLED: "true"
28+
CORS_ENABLED: "true"
29+
ALLOWED_ORIGINS:
30+
- "http://localhost:3000"
31+
LOG_LEVEL: "INFO"
32+
LOG_FORMAT: "json"
33+
TRANSPORT_TYPE: "all"
34+
FEDERATION_ENABLED: "true"
35+
FEDERATION_DISCOVERY: "false"
36+
FEDERATION_PEERS: []
37+
38+
secrets: {}
39+
40+
service:
41+
type: ClusterIP
42+
port: 4444
43+
44+
ingress:
45+
enabled: false
46+
annotations: {}
47+
hosts:
48+
- host: gateway.example.com
49+
paths:
50+
- path: /
51+
pathType: Prefix
52+
tls: []

0 commit comments

Comments
 (0)