Skip to content

Commit f8cc708

Browse files
committed
move to a new chart
Signed-off-by: AvivGuiser <[email protected]>
1 parent 1a3d516 commit f8cc708

File tree

13 files changed

+794
-0
lines changed

13 files changed

+794
-0
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@
1919
/charts/synthetic-monitoring-agent/ @torstenwalter @zanhsieh
2020
/charts/agent-operator/ @grafana/grafana-agent-maintainers
2121
/charts/cloudcost-exporter/ @grafana/platform-monitoring
22+
/charts/grafana-mcp/ @jkroepke @Sheikh-Abubaker

charts/grafana-mcp/.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+
*~
18+
# Various IDEs
19+
.vscode
20+
.project
21+
.idea/
22+
*.tmproj
23+
OWNERS

charts/grafana-mcp/Chart.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
apiVersion: v2
2+
name: grafana-mcp
3+
version: 1.0.0
4+
appVersion: 1.0.0
5+
kubeVersion: "^1.8.0-0"
6+
description: MCP server for Grafana.
7+
home: https://grafana.com
8+
icon: https://artifacthub.io/image/b4fed1a7-6c8f-4945-b99d-096efa3e4116
9+
sources:
10+
- https://github.com/grafana/mcp-grafana
11+
- https://github.com/grafana/helm-charts
12+
annotations:
13+
"artifacthub.io/license": Apache-2.0
14+
"artifacthub.io/links": |
15+
- name: Chart Source
16+
url: https://github.com/grafana/helm-charts
17+
- name: Upstream Project
18+
url: https://github.com/grafana/mcp-grafana
19+
maintainers:
20+
- name: Sheikh-Abubaker
21+
22+
- name: jkroepke
23+
24+
type: application
25+
keywords:
26+
- monitoring
27+
- mcp

charts/grafana-mcp/README.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# grafana-mcp
2+
3+
![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)
4+
5+
MCP server for Grafana.
6+
7+
## Source Code
8+
9+
* <https://github.com/grafana/mcp-grafana>
10+
* <https://github.com/grafana/helm-charts>
11+
12+
## Requirements
13+
14+
Kubernetes: `^1.8.0-0`
15+
16+
## Chart Repo
17+
18+
Add the following repo to use the chart:
19+
20+
```console
21+
helm repo add grafana https://grafana.github.io/helm-charts
22+
```
23+
24+
## Installing the Chart
25+
26+
To install the chart with the release name `my-release`:
27+
28+
```console
29+
helm install my-release grafana/grafana-mcp
30+
```
31+
32+
## Uninstalling the Chart
33+
34+
To uninstall/delete the my-release deployment:
35+
36+
```console
37+
helm delete my-release
38+
```
39+
40+
The command removes all the Kubernetes components associated with the chart and deletes the release.
41+
42+
## Values
43+
44+
| Key | Type | Default | Description |
45+
|-----|------|---------|-------------|
46+
| mcpServer | object | `{"affinity":{},"annotations":{},"automountServiceAccountToken":true,"containerSecurityContext":{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsGroup":1000,"runAsNonRoot":true,"runAsUser":1000},"debug":false,"deploymentStrategy":{"rollingUpdate":{"maxSurge":"25%","maxUnavailable":"25%"},"type":"RollingUpdate"},"disabledCategories":[],"dnsConfig":{},"dnsPolicy":"","enabled":false,"env":{},"envFrom":[],"envValueFrom":{},"extraArgs":[],"extraContainers":[],"extraInitContainers":[],"grafana":{"apiKeySecret":{"key":"api-key","name":"grafana-mcp-api-key"},"url":"http://grafana:3000"},"hostAliases":[],"image":{"pullPolicy":"IfNotPresent","registry":"docker.io","repository":"mcp/grafana","tag":"latest"},"imagePullSecrets":[],"ingress":{"annotations":{},"className":"","enabled":false,"hosts":[{"host":"mcp-grafana.local","paths":[{"path":"/","pathType":"Prefix"}]}],"labels":{},"tls":[]},"initContainers":[],"labels":{},"lifecycle":{},"nodeSelector":{},"podAnnotations":{},"podLabels":{},"priorityClassName":"","replicas":1,"resources":{},"runtimeClassName":"","schedulerName":"","securityContext":{"fsGroup":1000,"runAsGroup":1000,"runAsNonRoot":true,"runAsUser":1000},"service":{"annotations":{},"clusterIP":"","enabled":true,"externalIPs":[],"externalName":"","extraPorts":[],"labels":{},"loadBalancerIP":"","loadBalancerSourceRanges":[],"nodePort":"","port":8000,"sessionAffinity":"","sessionAffinityConfig":{},"type":"ClusterIP"},"tolerations":[],"topologySpreadConstraints":[],"volumeMounts":[],"volumes":[]}` | Enable the Grafana MCP server deployment |
47+
| mcpServer.affinity | object | `{}` | Affinity |
48+
| mcpServer.annotations | object | `{}` | Deployment annotations |
49+
| mcpServer.automountServiceAccountToken | bool | `true` | Automount service account token |
50+
| mcpServer.containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsGroup":1000,"runAsNonRoot":true,"runAsUser":1000}` | Container security context |
51+
| mcpServer.debug | bool | `false` | Enable debug mode |
52+
| mcpServer.deploymentStrategy | object | `{"rollingUpdate":{"maxSurge":"25%","maxUnavailable":"25%"},"type":"RollingUpdate"}` | Deployment strategy |
53+
| mcpServer.disabledCategories | list | `[]` | Categories to disable (e.g., oncall, incident, sift) |
54+
| mcpServer.dnsConfig | object | `{}` | DNS config |
55+
| mcpServer.dnsPolicy | string | `""` | DNS policy |
56+
| mcpServer.enabled | bool | `false` | Enable the MCP server |
57+
| mcpServer.env | object | `{}` | Environment variables |
58+
| mcpServer.envFrom | list | `[]` | Environment variables from ConfigMaps or Secrets |
59+
| mcpServer.envValueFrom | object | `{}` | Environment variables from other sources |
60+
| mcpServer.extraArgs | list | `[]` | Additional command line arguments |
61+
| mcpServer.extraContainers | list | `[]` | Extra containers |
62+
| mcpServer.extraInitContainers | list | `[]` | Extra init containers |
63+
| mcpServer.grafana | object | `{"apiKeySecret":{"key":"api-key","name":"grafana-mcp-api-key"},"url":"http://grafana:3000"}` | Grafana connection configuration |
64+
| mcpServer.grafana.apiKeySecret | object | `{"key":"api-key","name":"grafana-mcp-api-key"}` | Secret containing the Grafana API key |
65+
| mcpServer.grafana.apiKeySecret.key | string | `"api-key"` | Key within the secret that contains the API key |
66+
| mcpServer.grafana.apiKeySecret.name | string | `"grafana-mcp-api-key"` | Name of the secret containing the API key |
67+
| mcpServer.grafana.url | string | `"http://grafana:3000"` | Grafana URL (should point to the main Grafana service) |
68+
| mcpServer.hostAliases | list | `[]` | Host aliases |
69+
| mcpServer.image | object | `{"pullPolicy":"IfNotPresent","registry":"docker.io","repository":"mcp/grafana","tag":"latest"}` | Image configuration |
70+
| mcpServer.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
71+
| mcpServer.image.registry | string | `"docker.io"` | The Docker registry |
72+
| mcpServer.image.repository | string | `"mcp/grafana"` | The Docker repository |
73+
| mcpServer.image.tag | string | `"latest"` | Image tag |
74+
| mcpServer.imagePullSecrets | list | `[]` | Image pull secrets |
75+
| mcpServer.ingress | object | `{"annotations":{},"className":"","enabled":false,"hosts":[{"host":"mcp-grafana.local","paths":[{"path":"/","pathType":"Prefix"}]}],"labels":{},"tls":[]}` | Ingress configuration |
76+
| mcpServer.ingress.annotations | object | `{}` | Ingress annotations |
77+
| mcpServer.ingress.className | string | `""` | Ingress class name |
78+
| mcpServer.ingress.enabled | bool | `false` | Enable ingress |
79+
| mcpServer.ingress.hosts | list | `[{"host":"mcp-grafana.local","paths":[{"path":"/","pathType":"Prefix"}]}]` | Ingress hosts |
80+
| mcpServer.ingress.labels | object | `{}` | Ingress labels |
81+
| mcpServer.ingress.tls | list | `[]` | Ingress TLS configuration |
82+
| mcpServer.initContainers | list | `[]` | Init containers |
83+
| mcpServer.labels | object | `{}` | Deployment labels |
84+
| mcpServer.lifecycle | object | `{}` | Lifecycle hooks |
85+
| mcpServer.nodeSelector | object | `{}` | Node selector |
86+
| mcpServer.podAnnotations | object | `{}` | Pod annotations |
87+
| mcpServer.podLabels | object | `{}` | Pod labels |
88+
| mcpServer.priorityClassName | string | `""` | Priority class name |
89+
| mcpServer.replicas | int | `1` | Number of replicas for the MCP server |
90+
| mcpServer.resources | object | `{}` | Resource requests and limits |
91+
| mcpServer.runtimeClassName | string | `""` | Runtime class name |
92+
| mcpServer.schedulerName | string | `""` | Scheduler name |
93+
| mcpServer.securityContext | object | `{"fsGroup":1000,"runAsGroup":1000,"runAsNonRoot":true,"runAsUser":1000}` | Pod security context |
94+
| mcpServer.service | object | `{"annotations":{},"clusterIP":"","enabled":true,"externalIPs":[],"externalName":"","extraPorts":[],"labels":{},"loadBalancerIP":"","loadBalancerSourceRanges":[],"nodePort":"","port":8000,"sessionAffinity":"","sessionAffinityConfig":{},"type":"ClusterIP"}` | Service configuration |
95+
| mcpServer.service.annotations | object | `{}` | Service annotations |
96+
| mcpServer.service.clusterIP | string | `""` | Cluster IP (if type is ClusterIP) |
97+
| mcpServer.service.enabled | bool | `true` | Enable service |
98+
| mcpServer.service.externalIPs | list | `[]` | External IPs |
99+
| mcpServer.service.externalName | string | `""` | External name (if type is ExternalName) |
100+
| mcpServer.service.extraPorts | list | `[]` | Extra ports |
101+
| mcpServer.service.labels | object | `{}` | Service labels |
102+
| mcpServer.service.loadBalancerIP | string | `""` | Load balancer IP |
103+
| mcpServer.service.loadBalancerSourceRanges | list | `[]` | Load balancer source ranges |
104+
| mcpServer.service.nodePort | string | `""` | Node port (if type is NodePort or LoadBalancer) |
105+
| mcpServer.service.port | int | `8000` | Service port |
106+
| mcpServer.service.sessionAffinity | string | `""` | Session affinity |
107+
| mcpServer.service.sessionAffinityConfig | object | `{}` | Session affinity config |
108+
| mcpServer.service.type | string | `"ClusterIP"` | Service type |
109+
| mcpServer.tolerations | list | `[]` | Tolerations |
110+
| mcpServer.topologySpreadConstraints | list | `[]` | Topology spread constraints |
111+
| mcpServer.volumeMounts | list | `[]` | Volume mounts |
112+
| mcpServer.volumes | list | `[]` | Volumes |
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{{ template "chart.header" . }}
2+
3+
{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}
4+
5+
{{ template "chart.description" . }}
6+
7+
{{ template "chart.sourcesSection" . }}
8+
9+
{{ template "chart.requirementsSection" . }}
10+
11+
## Chart Repo
12+
13+
Add the following repo to use the chart:
14+
15+
```console
16+
helm repo add grafana https://grafana.github.io/helm-charts
17+
```
18+
19+
## Installing the Chart
20+
21+
To install the chart with the release name `my-release`:
22+
23+
```console
24+
helm install my-release grafana/grafana-mcp
25+
```
26+
27+
28+
## Uninstalling the Chart
29+
30+
To uninstall/delete the my-release deployment:
31+
32+
```console
33+
helm delete my-release
34+
```
35+
36+
The command removes all the Kubernetes components associated with the chart and deletes the release.
37+
38+
{{ template "chart.valuesSection" . }}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Leave this file empty to ensure that CI runs builds against the default configuration in values.yaml.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
affinity:
2+
podAntiAffinity:
3+
preferredDuringSchedulingIgnoredDuringExecution:
4+
- podAffinityTerm:
5+
labelSelector:
6+
matchLabels:
7+
app.kubernetes.io/instance: grafana-test
8+
app.kubernetes.io/name: grafana
9+
topologyKey: failure-domain.beta.kubernetes.io/zone
10+
weight: 100
11+
requiredDuringSchedulingIgnoredDuringExecution:
12+
- labelSelector:
13+
matchLabels:
14+
app.kubernetes.io/instance: grafana-test
15+
app.kubernetes.io/name: grafana
16+
topologyKey: kubernetes.io/hostname
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{{/* vim: set filetype=mustache: */}}
2+
{{/*
3+
Expand the name of the chart.
4+
*/}}
5+
{{- define "grafana-mcp.name" -}}
6+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
7+
{{- end }}
8+
9+
{{/*
10+
Create a default fully qualified app name.
11+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12+
If release name contains chart name it will be used as a full name.
13+
*/}}
14+
{{- define "grafana-mcp.fullname" -}}
15+
{{- if .Values.fullnameOverride }}
16+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
17+
{{- else }}
18+
{{- $name := default .Chart.Name .Values.nameOverride }}
19+
{{- if contains $name .Release.Name }}
20+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
21+
{{- else }}
22+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
23+
{{- end }}
24+
{{- end }}
25+
{{- end }}
26+
27+
{{/*
28+
Create chart name and version as used by the chart label.
29+
*/}}
30+
{{- define "grafana-mcp.chart" -}}
31+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
32+
{{- end }}
33+
34+
{{/*
35+
Create the name of the service account
36+
*/}}
37+
{{- define "grafana-mcp.serviceAccountName" -}}
38+
{{- if .Values.serviceAccount.create }}
39+
{{- default (include "grafana-mcp.fullname" .) .Values.serviceAccount.name }}
40+
{{- else }}
41+
{{- default "default" .Values.serviceAccount.name }}
42+
{{- end }}
43+
{{- end }}
44+
{{/*
45+
Allow the release namespace to be overridden for multi-namespace deployments in combined charts
46+
*/}}
47+
{{- define "grafana-mcp.namespace" -}}
48+
{{- if .Values.namespaceOverride }}
49+
{{- .Values.namespaceOverride }}
50+
{{- else }}
51+
{{- .Release.Namespace }}
52+
{{- end }}
53+
{{- end }}
54+
55+
{{/*
56+
Common labels
57+
*/}}
58+
{{- define "grafana-mcp.labels" -}}
59+
helm.sh/chart: {{ include "grafana-mcp.chart" . }}
60+
{{ include "grafana-mcp.selectorLabels" . }}
61+
{{- if or .Chart.AppVersion .Values.image.tag }}
62+
app.kubernetes.io/version: {{ mustRegexReplaceAllLiteral "@sha.*" .Values.image.tag "" | default .Chart.AppVersion | trunc 63 | trimSuffix "-" | quote }}
63+
{{- end }}
64+
{{- with .Values.extraLabels }}
65+
{{ toYaml . }}
66+
{{- end }}
67+
{{- end }}
68+
69+
{{/*
70+
Selector labels
71+
*/}}
72+
{{- define "grafana-mcp.selectorLabels" -}}
73+
app.kubernetes.io/name: {{ include "grafana-mcp.name" . }}
74+
app.kubernetes.io/instance: {{ .Release.Name }}
75+
{{- end }}
76+
77+
78+
{{/*
79+
Formats imagePullSecrets. Input is (dict "root" . "imagePullSecrets" .{specific imagePullSecrets})
80+
*/}}
81+
{{- define "grafana.imagePullSecrets" -}}
82+
{{- $root := .root }}
83+
{{- range (concat .root.Values.global.imagePullSecrets .imagePullSecrets) }}
84+
{{- if eq (typeOf .) "map[string]interface {}" }}
85+
- {{ toYaml (dict "name" (tpl .name $root)) | trim }}
86+
{{- else }}
87+
- name: {{ tpl . $root }}
88+
{{- end }}
89+
{{- end }}
90+
{{- end }}

0 commit comments

Comments
 (0)