Add Helm chart and Kubernetes deployment configuration for Redmine MCP

This commit is contained in:
sha
2026-03-20 16:40:23 +02:00
parent 315992c37a
commit 2ad020761e
8 changed files with 254 additions and 4 deletions
+36
View File
@@ -0,0 +1,36 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "redmine-mcp.name" -}}
{{- .Chart.Name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "redmine-mcp.labels" -}}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
app.kubernetes.io/name: {{ include "redmine-mcp.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "redmine-mcp.selectorLabels" -}}
app.kubernetes.io/name: {{ include "redmine-mcp.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Name of the secret containing Redmine credentials
*/}}
{{- define "redmine-mcp.secretName" -}}
{{- if .Values.redmine.existingSecret -}}
{{ .Values.redmine.existingSecret }}
{{- else -}}
{{ include "redmine-mcp.name" . }}-credentials
{{- end }}
{{- end }}
+58
View File
@@ -0,0 +1,58 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "redmine-mcp.name" . }}
labels:
{{- include "redmine-mcp.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "redmine-mcp.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "redmine-mcp.labels" . | nindent 8 }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 8000
protocol: TCP
envFrom:
- secretRef:
name: {{ include "redmine-mcp.secretName" . }}
env:
- name: MCP_TRANSPORT
value: http
- name: MCP_HOST
value: "0.0.0.0"
- name: MCP_PORT
value: "8000"
livenessProbe:
tcpSocket:
port: http
initialDelaySeconds: 5
periodSeconds: 10
readinessProbe:
tcpSocket:
port: http
initialDelaySeconds: 3
periodSeconds: 5
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
+12
View File
@@ -0,0 +1,12 @@
{{- if not .Values.redmine.existingSecret }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "redmine-mcp.name" . }}-credentials
labels:
{{- include "redmine-mcp.labels" . | nindent 4 }}
type: Opaque
stringData:
REDMINE_URL: {{ .Values.redmine.url | required "redmine.url is required" | quote }}
REDMINE_API_KEY: {{ .Values.redmine.apiKey | required "redmine.apiKey is required" | quote }}
{{- end }}
+15
View File
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "redmine-mcp.name" . }}
labels:
{{- include "redmine-mcp.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
selector:
{{- include "redmine-mcp.selectorLabels" . | nindent 4 }}
ports:
- name: http
port: {{ .Values.service.port }}
targetPort: http
protocol: TCP