Skip to content

Commit d761273

Browse files
authored
Merge branch 'main' into sidecar
2 parents 34ab234 + e3fec0d commit d761273

File tree

14 files changed

+860
-0
lines changed

14 files changed

+860
-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 @KyriosGN0

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: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
apiVersion: v2
2+
name: grafana-mcp
3+
version: 0.1.0
4+
appVersion: latest
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+
- name: KyriosGN0
25+
26+
type: application
27+
keywords:
28+
- monitoring
29+
- mcp

charts/grafana-mcp/README.md

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# grafana-mcp
2+
3+
MCP server for Grafana.
4+
5+
## Source Code
6+
7+
* <https://github.com/grafana/mcp-grafana>
8+
* <https://github.com/grafana/helm-charts>
9+
10+
## Requirements
11+
12+
Kubernetes: `^1.8.0-0`
13+
14+
## Chart Repo
15+
16+
Add the following repo to use the chart:
17+
18+
```console
19+
helm repo add grafana https://grafana.github.io/helm-charts
20+
```
21+
22+
## Installing the Chart
23+
24+
To install the chart with the release name `my-release`:
25+
26+
```console
27+
helm install --set grafana.apiKey=<Grafana_ApiKey> my-release grafana/grafana-mcp
28+
```
29+
30+
## Uninstalling the Chart
31+
32+
To uninstall/delete the my-release deployment:
33+
34+
```console
35+
helm delete my-release
36+
```
37+
38+
The command removes all the Kubernetes components associated with the chart and deletes the release.
39+
40+
## Values
41+
42+
| Key | Type | Default | Description |
43+
|-----|------|---------|-------------|
44+
| affinity | object | `{}` | Affinity |
45+
| annotations | object | `{}` | Deployment annotations |
46+
| automountServiceAccountToken | bool | `true` | Automount service account token |
47+
| containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsGroup":1000,"runAsNonRoot":true,"runAsUser":1000}` | Container security context |
48+
| debug | bool | `false` | Enable debug mode |
49+
| deploymentStrategy | object | `{"rollingUpdate":{"maxSurge":"25%","maxUnavailable":"25%"},"type":"RollingUpdate"}` | Deployment strategy |
50+
| disabledCategories | list | `[]` | Categories to disable (e.g., oncall, incident, sift) |
51+
| dnsConfig | object | `{}` | DNS config |
52+
| dnsPolicy | string | `""` | DNS policy |
53+
| env | object | `{}` | Environment variables |
54+
| envFrom | list | `[]` | Environment variables from ConfigMaps or Secrets |
55+
| envValueFrom | object | `{}` | Environment variables from other sources |
56+
| extraArgs | list | `[]` | Additional command line arguments |
57+
| extraContainers | list | `[]` | Extra containers |
58+
| extraInitContainers | list | `[]` | Extra init containers |
59+
| grafana | object | `{"apiKey":"","apiKeySecret":{"key":"","name":""},"url":"http://grafana:3000"}` | Grafana connection configuration |
60+
| grafana.apiKey | string | `""` | Grafana ApiKey (if not using a secret) |
61+
| grafana.apiKeySecret | object | `{"key":"","name":""}` | Secret containing the Grafana API key |
62+
| grafana.apiKeySecret.key | string | `""` | Key within the secret that contains the API key |
63+
| grafana.apiKeySecret.name | string | `""` | Name of the secret containing the API key |
64+
| grafana.url | string | `"http://grafana:3000"` | Grafana URL (should point to the main Grafana service) |
65+
| hostAliases | list | `[]` | Host aliases |
66+
| image | object | `{"pullPolicy":"IfNotPresent","registry":"docker.io","repository":"mcp/grafana","tag":"latest"}` | Image configuration |
67+
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
68+
| image.registry | string | `"docker.io"` | The Docker registry |
69+
| image.repository | string | `"mcp/grafana"` | The Docker repository |
70+
| image.tag | string | `"latest"` | Image tag |
71+
| imagePullSecrets | list | `[]` | Image pull secrets |
72+
| ingress | object | `{"annotations":{},"className":"","enabled":false,"hosts":[{"host":"mcp-grafana.local","paths":[{"path":"/","pathType":"Prefix"}]}],"labels":{},"tls":[]}` | Ingress configuration |
73+
| ingress.annotations | object | `{}` | Ingress annotations |
74+
| ingress.className | string | `""` | Ingress class name |
75+
| ingress.enabled | bool | `false` | Enable ingress |
76+
| ingress.hosts | list | `[{"host":"mcp-grafana.local","paths":[{"path":"/","pathType":"Prefix"}]}]` | Ingress hosts |
77+
| ingress.labels | object | `{}` | Ingress labels |
78+
| ingress.tls | list | `[]` | Ingress TLS configuration |
79+
| initContainers | list | `[]` | Init containers |
80+
| labels | object | `{}` | Deployment labels |
81+
| lifecycle | object | `{}` | Lifecycle hooks |
82+
| livenessProbe | object | `{}` | MCP server Liveness probe configuration |
83+
| nodeSelector | object | `{}` | Node selector |
84+
| podAnnotations | object | `{}` | Pod annotations |
85+
| podLabels | object | `{}` | Pod labels |
86+
| priorityClassName | string | `""` | Priority class name |
87+
| readinessProbe | object | `{}` | MCP server Readiness probe configuration |
88+
| replicas | int | `1` | Number of replicas for the MCP server |
89+
| resources | object | `{}` | Resource requests and limits |
90+
| runtimeClassName | string | `""` | Runtime class name |
91+
| schedulerName | string | `""` | Scheduler name |
92+
| securityContext | object | `{"fsGroup":1000,"runAsGroup":1000,"runAsNonRoot":true,"runAsUser":1000}` | Pod security context |
93+
| service | object | `{"annotations":{},"clusterIP":"","enabled":true,"externalIPs":[],"externalName":"","extraPorts":[],"labels":{},"loadBalancerIP":"","loadBalancerSourceRanges":[],"nodePort":"","port":8000,"sessionAffinity":"","sessionAffinityConfig":{},"type":"ClusterIP"}` | Service configuration |
94+
| service.annotations | object | `{}` | Service annotations |
95+
| service.clusterIP | string | `""` | Cluster IP (if type is ClusterIP) |
96+
| service.enabled | bool | `true` | Enable service |
97+
| service.externalIPs | list | `[]` | External IPs |
98+
| service.externalName | string | `""` | External name (if type is ExternalName) |
99+
| service.extraPorts | list | `[]` | Extra ports |
100+
| service.labels | object | `{}` | Service labels |
101+
| service.loadBalancerIP | string | `""` | Load balancer IP |
102+
| service.loadBalancerSourceRanges | list | `[]` | Load balancer source ranges |
103+
| service.nodePort | string | `""` | Node port (if type is NodePort or LoadBalancer) |
104+
| service.port | int | `8000` | Service port |
105+
| service.sessionAffinity | string | `""` | Session affinity |
106+
| service.sessionAffinityConfig | object | `{}` | Session affinity config |
107+
| service.type | string | `"ClusterIP"` | Service type |
108+
| serviceAccount | object | `{"annotations":{},"automountServiceAccountToken":false,"enabled":true,"labels":{},"name":""}` | Service account Configuration |
109+
| serviceAccount.annotations | object | `{}` | Annotations for the service account |
110+
| serviceAccount.automountServiceAccountToken | bool | `false` | Automount service account token |
111+
| serviceAccount.enabled | bool | `true` | Enable service account |
112+
| serviceAccount.labels | object | `{}` | Labels for the service account |
113+
| serviceAccount.name | string | `""` | Name of the service account |
114+
| startupProbe | object | `{}` | MCP server Startup probe configuration |
115+
| tolerations | list | `[]` | Tolerations |
116+
| topologySpreadConstraints | list | `[]` | Topology spread constraints |
117+
| volumeMounts | list | `[]` | Volume mounts |
118+
| volumes | list | `[]` | Volumes |
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{{ template "chart.header" . }}
2+
3+
{{ template "chart.description" . }}
4+
5+
{{ template "chart.sourcesSection" . }}
6+
7+
{{ template "chart.requirementsSection" . }}
8+
9+
## Chart Repo
10+
11+
Add the following repo to use the chart:
12+
13+
```console
14+
helm repo add grafana https://grafana.github.io/helm-charts
15+
```
16+
17+
## Installing the Chart
18+
19+
To install the chart with the release name `my-release`:
20+
21+
```console
22+
helm install --set grafana.apiKey=<Grafana_ApiKey> my-release grafana/grafana-mcp
23+
```
24+
25+
26+
## Uninstalling the Chart
27+
28+
To uninstall/delete the my-release deployment:
29+
30+
```console
31+
helm delete my-release
32+
```
33+
34+
The command removes all the Kubernetes components associated with the chart and deletes the release.
35+
36+
{{ template "chart.valuesSection" . }}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
grafana:
2+
apiKey: "test"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
grafana:
2+
apiKey: "test"
3+
4+
affinity:
5+
podAntiAffinity:
6+
preferredDuringSchedulingIgnoredDuringExecution:
7+
- podAffinityTerm:
8+
labelSelector:
9+
matchLabels:
10+
app.kubernetes.io/instance: grafana-test
11+
app.kubernetes.io/name: grafana
12+
topologyKey: failure-domain.beta.kubernetes.io/zone
13+
weight: 100
14+
requiredDuringSchedulingIgnoredDuringExecution:
15+
- labelSelector:
16+
matchLabels:
17+
app.kubernetes.io/instance: grafana-test
18+
app.kubernetes.io/name: grafana
19+
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)