mirror of
https://github.com/shadoll/helm-charts.git
synced 2026-10-13 06:09:16 +00:00
Add nodered-mcp chart (fgjcarlos/nodered-mcp)
MCP server exposing a Node-RED instance's admin API as agent tools. Single Deployment + Service + Ingress, image tracked off the upstream releases -- the tags are v-prefixed but the ghcr image tags are not, hence the version-pattern. MCP_HTTP_TOKEN is required rather than optional: upstream's listener binds all container interfaces, so there is no loopback-trust mode. The chart therefore requires existingSecret instead of defaulting it away. readOnly defaults on, so an agent cannot deploy flows by accident. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: nodered-mcp
|
||||||
|
description: MCP server exposing a Node-RED instance's admin API as agent tools (fgjcarlos/nodered-mcp)
|
||||||
|
type: application
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: "0.7.2"
|
||||||
|
annotations:
|
||||||
|
version-source: github-release:fgjcarlos/nodered-mcp
|
||||||
|
version-pattern: "s|^v||"
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: {{ .Chart.Name }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
app.kubernetes.io/component: mcp
|
||||||
|
annotations:
|
||||||
|
version-source: {{ index .Chart.Annotations "version-source" }}
|
||||||
|
version-pattern: {{ index .Chart.Annotations "version-pattern" | quote }}
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: {{ .Release.Name }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
{{- with .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: {{ .Chart.Name }}
|
||||||
|
image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
ports:
|
||||||
|
- containerPort: {{ .Values.port }}
|
||||||
|
name: http
|
||||||
|
protocol: TCP
|
||||||
|
env:
|
||||||
|
- name: NODERED_URL
|
||||||
|
value: {{ required "noderedURL is required" .Values.noderedURL | quote }}
|
||||||
|
- name: MCP_READ_ONLY
|
||||||
|
value: {{ .Values.readOnly | quote }}
|
||||||
|
- name: MCP_HTTP_TOKEN
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ required "existingSecret is required" .Values.existingSecret }}
|
||||||
|
key: {{ .Values.tokenKey }}
|
||||||
|
{{- range $key, $value := .Values.env }}
|
||||||
|
- name: {{ $key }}
|
||||||
|
value: {{ $value | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- range .Values.secretEnvKeys }}
|
||||||
|
- name: {{ .envName }}
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ $.Values.existingSecret }}
|
||||||
|
key: {{ .secretKey }}
|
||||||
|
{{- end }}
|
||||||
|
# /mcp answers only to authenticated POSTs, so an HTTP probe there
|
||||||
|
# would read as failure. Check the listener itself instead.
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 20
|
||||||
|
periodSeconds: 15
|
||||||
|
failureThreshold: 3
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 10
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.resources | nindent 12 }}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
{{- range $name, $config := .Values.ingresses }}
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: {{ $.Release.Name }}-{{ $name }}
|
||||||
|
{{- with $config.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: {{ $config.host }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: {{ $.Release.Name }}
|
||||||
|
port:
|
||||||
|
number: {{ $.Values.service.port }}
|
||||||
|
{{- with $config.tls }}
|
||||||
|
tls:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: {{ .Chart.Name }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
selector:
|
||||||
|
app: {{ .Release.Name }}
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
targetPort: http
|
||||||
|
protocol: TCP
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
image:
|
||||||
|
repository: ghcr.io/fgjcarlos/nodered-mcp
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
# The container's HTTP listener. Upstream's streamable-HTTP transport serves
|
||||||
|
# MCP at /mcp on this port.
|
||||||
|
port: 8090
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 8090
|
||||||
|
|
||||||
|
# The Node-RED admin API this server drives, e.g. http://node-red:1880
|
||||||
|
noderedURL: ""
|
||||||
|
|
||||||
|
# Refuse every write tool (flow deploy, node install). Leave on unless the
|
||||||
|
# agent is meant to change flows.
|
||||||
|
readOnly: true
|
||||||
|
|
||||||
|
# Secret holding the server's own bearer token. Upstream requires
|
||||||
|
# MCP_HTTP_TOKEN — the listener binds all interfaces, so there is no
|
||||||
|
# "trusted loopback" mode to fall back on.
|
||||||
|
existingSecret: ""
|
||||||
|
tokenKey: MCP_HTTP_TOKEN
|
||||||
|
|
||||||
|
# Additional non-secret environment variables
|
||||||
|
env: {}
|
||||||
|
|
||||||
|
# Additional secret-backed environment variables
|
||||||
|
secretEnvKeys: []
|
||||||
|
# - envName: NODERED_TOKEN
|
||||||
|
# secretKey: NODERED_TOKEN
|
||||||
|
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "50m"
|
||||||
|
memory: "64Mi"
|
||||||
|
limits:
|
||||||
|
cpu: "500m"
|
||||||
|
memory: "256Mi"
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
tolerations: []
|
||||||
|
affinity: {}
|
||||||
|
|
||||||
|
ingresses: {}
|
||||||
|
# https:
|
||||||
|
# host: red-mcp.mcp.example.com
|
||||||
|
# annotations: {}
|
||||||
|
# tls:
|
||||||
|
# - hosts:
|
||||||
|
# - red-mcp.mcp.example.com
|
||||||
Reference in New Issue
Block a user