Skip to content

Commit 95aeb47

Browse files
committed
add helm chart
1 parent 14a2829 commit 95aeb47

16 files changed

Lines changed: 888 additions & 0 deletions

helm/kmcp/.helmignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

helm/kmcp/Chart.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: v2
2+
name: kmcp
3+
description: A Helm chart for KMCP (Kubernetes MCP Server Controller)
4+
type: application
5+
version: 0.1.0
6+
appVersion: "0.1.0"
7+
home: https://github.com/kagent-dev/kmcp
8+
sources:
9+
- https://github.com/kagent-dev/kmcp
10+
maintainers:
11+
- name: kmcp-maintainers
12+
email: maintainers@kagent.dev
13+
keywords:
14+
- mcp
15+
- kubernetes
16+
- controller
17+
- server
18+
annotations:
19+
category: Infrastructure

helm/kmcp/README.md

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# KMCP Helm Chart
2+
3+
A Helm chart for deploying the KMCP (Kubernetes MCP Server Controller) to Kubernetes clusters.
4+
5+
## Overview
6+
7+
KMCP is a Kubernetes controller that manages MCP (Model Context Protocol) servers. It provides a declarative way to deploy and manage MCP servers in your Kubernetes environment.
8+
9+
## Prerequisites
10+
11+
- Kubernetes 1.11.3+
12+
- Helm 3.0+
13+
14+
## Installation
15+
16+
### Add the Helm Repository
17+
18+
```bash
19+
# Add the repository (once available)
20+
helm repo add kmcp https://charts.kagent.dev
21+
helm repo update
22+
```
23+
24+
### Install the Chart
25+
26+
```bash
27+
# Install with default values
28+
helm install kmcp kmcp/kmcp
29+
30+
# Install in a specific namespace
31+
helm install kmcp kmcp/kmcp --namespace kmcp-system --create-namespace
32+
33+
# Install with custom values
34+
helm install kmcp kmcp/kmcp --values values.yaml
35+
```
36+
37+
## Configuration
38+
39+
The following table lists the configurable parameters of the KMCP chart and their default values.
40+
41+
### Image Configuration
42+
43+
| Parameter | Description | Default |
44+
|-----------|-------------|---------|
45+
| `image.repository` | Container image repository | `controller` |
46+
| `image.tag` | Container image tag | `""` (uses appVersion) |
47+
| `image.pullPolicy` | Container image pull policy | `IfNotPresent` |
48+
| `imagePullSecrets` | Image pull secrets | `[]` |
49+
50+
### Controller Configuration
51+
52+
| Parameter | Description | Default |
53+
|-----------|-------------|---------|
54+
| `controller.replicaCount` | Number of controller replicas | `1` |
55+
| `controller.leaderElection.enabled` | Enable leader election | `true` |
56+
| `controller.healthProbe.bindAddress` | Health probe bind address | `:8081` |
57+
| `controller.metrics.enabled` | Enable metrics endpoint | `true` |
58+
| `controller.metrics.bindAddress` | Metrics bind address | `:8443` |
59+
60+
### RBAC Configuration
61+
62+
| Parameter | Description | Default |
63+
|-----------|-------------|---------|
64+
| `rbac.create` | Create RBAC resources | `true` |
65+
| `serviceAccount.create` | Create service account | `true` |
66+
| `serviceAccount.name` | Service account name | `""` (generated) |
67+
| `serviceAccount.annotations` | Service account annotations | `{}` |
68+
69+
### Resource Configuration
70+
71+
| Parameter | Description | Default |
72+
|-----------|-------------|---------|
73+
| `resources.limits.cpu` | CPU limit | `500m` |
74+
| `resources.limits.memory` | Memory limit | `128Mi` |
75+
| `resources.requests.cpu` | CPU request | `10m` |
76+
| `resources.requests.memory` | Memory request | `64Mi` |
77+
78+
### Security Configuration
79+
80+
| Parameter | Description | Default |
81+
|-----------|-------------|---------|
82+
| `podSecurityContext.runAsNonRoot` | Run as non-root user | `true` |
83+
| `podSecurityContext.seccompProfile.type` | Seccomp profile type | `RuntimeDefault` |
84+
| `securityContext.allowPrivilegeEscalation` | Allow privilege escalation | `false` |
85+
| `securityContext.capabilities.drop` | Capabilities to drop | `["ALL"]` |
86+
87+
### Service Configuration
88+
89+
| Parameter | Description | Default |
90+
|-----------|-------------|---------|
91+
| `service.type` | Service type | `ClusterIP` |
92+
| `service.port` | Service port | `8443` |
93+
| `service.targetPort` | Service target port | `8443` |
94+
95+
### Custom Resource Definition
96+
97+
| Parameter | Description | Default |
98+
|-----------|-------------|---------|
99+
| `crd.create` | Create CRDs | `true` |
100+
101+
## Usage
102+
103+
After installation, you can create MCP servers using the `MCPServer` custom resource:
104+
105+
```yaml
106+
apiVersion: kagent.dev/v1alpha1
107+
kind: MCPServer
108+
metadata:
109+
name: my-mcp-server
110+
spec:
111+
transportType: http
112+
deployment:
113+
image: my-mcp-server:latest
114+
port: 8080
115+
httpTransport:
116+
targetPort: 8080
117+
```
118+
119+
## Monitoring
120+
121+
The controller exposes metrics on port 8443 by default. These metrics can be scraped by Prometheus or other monitoring systems.
122+
123+
## Upgrading
124+
125+
To upgrade the chart:
126+
127+
```bash
128+
helm upgrade kmcp kmcp/kmcp
129+
```
130+
131+
## Uninstalling
132+
133+
To uninstall the chart:
134+
135+
```bash
136+
helm uninstall kmcp
137+
```
138+
139+
**Note**: This will remove all the Kubernetes resources associated with the chart and delete the release.
140+
141+
## Contributing
142+
143+
For information on contributing to this project, please see the [main repository](https://github.com/kagent-dev/kmcp).
144+
145+
## License
146+
147+
This project is licensed under the terms specified in the main repository.

helm/kmcp/templates/_helpers.tpl

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "kmcp.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "kmcp.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "kmcp.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "kmcp.labels" -}}
37+
helm.sh/chart: {{ include "kmcp.chart" . }}
38+
{{ include "kmcp.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "kmcp.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "kmcp.name" . }}
50+
app.kubernetes.io/instance: {{ .Release.Name }}
51+
control-plane: controller-manager
52+
{{- end }}
53+
54+
{{/*
55+
Create the name of the service account to use
56+
*/}}
57+
{{- define "kmcp.serviceAccountName" -}}
58+
{{- if .Values.serviceAccount.create }}
59+
{{- default (printf "%s-controller-manager" (include "kmcp.fullname" .)) .Values.serviceAccount.name }}
60+
{{- else }}
61+
{{- default "default" .Values.serviceAccount.name }}
62+
{{- end }}
63+
{{- end }}
64+
65+
{{/*
66+
Create the namespace to use
67+
*/}}
68+
{{- define "kmcp.namespace" -}}
69+
{{- if .Values.namespace }}
70+
{{- .Values.namespace }}
71+
{{- else }}
72+
{{- .Release.Namespace }}
73+
{{- end }}
74+
{{- end }}
75+
76+
{{/*
77+
Create the image reference
78+
*/}}
79+
{{- define "kmcp.image" -}}
80+
{{- $tag := .Values.image.tag | default .Chart.AppVersion }}
81+
{{- printf "%s:%s" .Values.image.repository $tag }}
82+
{{- end }}
83+
84+
{{/*
85+
Create controller manager container args
86+
*/}}
87+
{{- define "kmcp.controllerArgs" -}}
88+
{{- $args := list }}
89+
{{- if .Values.controller.leaderElection.enabled }}
90+
{{- $args = append $args "--leader-elect" }}
91+
{{- end }}
92+
{{- if .Values.controller.healthProbe.bindAddress }}
93+
{{- $args = append $args (printf "--health-probe-bind-address=%s" .Values.controller.healthProbe.bindAddress) }}
94+
{{- end }}
95+
{{- if .Values.controller.metrics.enabled }}
96+
{{- $args = append $args (printf "--metrics-bind-address=%s" .Values.controller.metrics.bindAddress) }}
97+
{{- end }}
98+
{{- toYaml $args }}
99+
{{- end }}

0 commit comments

Comments
 (0)