feat: Add MikroTik MCP Helm chart with deployment, service, ingress, and values configuration

This commit is contained in:
sha
2026-04-19 20:34:02 +03:00
parent 9d057b2f3e
commit 16d9b8d33e
5 changed files with 172 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
apiVersion: v2
name: mikrotik-mcp
description: MikroTik MCP server Helm chart
type: application
version: 0.1.0
appVersion: "0.5.0.0"
annotations:
version-source: github-release:jeff-nasseri/mikrotik-mcp
version-pattern: "s|^v||"
+74
View File
@@ -0,0 +1,74 @@
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
app.kubernetes.io/part-of: network-tools
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 }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- sh
- -c
- |
pip install --quiet --no-cache-dir "mcp-server-mikrotik=={{ .Chart.AppVersion }}"
exec mcp-server-mikrotik
ports:
- containerPort: {{ .Values.port }}
name: http
protocol: TCP
env:
{{- range $key, $value := .Values.env }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- range .Values.secretEnvKeys }}
- name: {{ .envName }}
valueFrom:
secretKeyRef:
name: {{ $.Values.existingSecret }}
key: {{ .secretKey }}
{{- end }}
livenessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 60
periodSeconds: 15
failureThreshold: 3
readinessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 30
periodSeconds: 10
resources:
{{- toYaml .Values.resources | nindent 12 }}
+27
View File
@@ -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.port }}
{{- with $config.tls }}
tls:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
+16
View File
@@ -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: ClusterIP
selector:
app: {{ .Release.Name }}
ports:
- name: http
port: {{ .Values.port }}
targetPort: http
protocol: TCP
+46
View File
@@ -0,0 +1,46 @@
image:
# Uses python:3.11-alpine as base; mcp-server-mikrotik is installed
# from PyPI at container startup using the version from Chart.appVersion.
repository: python
tag: "3.11-alpine"
pullPolicy: IfNotPresent
port: 8000
existingSecret: ""
secretEnvKeys: []
# - envName: MIKROTIK_HOST
# secretKey: MIKROTIK_HOST
# - envName: MIKROTIK_USERNAME
# secretKey: MIKROTIK_USERNAME
# - envName: MIKROTIK_PASSWORD
# secretKey: MIKROTIK_PASSWORD
# Additional environment variables (non-secret)
env:
MIKROTIK_MCP__TRANSPORT: "sse"
MIKROTIK_MCP__HOST: "0.0.0.0"
MIKROTIK_MCP__PORT: "8000"
resources:
requests:
cpu: "50m"
memory: "128Mi"
limits:
cpu: "500m"
memory: "512Mi"
nodeSelector: {}
tolerations: []
ingresses: {}
# https:
# host: hw5.mcp.example.com
# annotations: {}
# tls:
# - hosts:
# - hw5.mcp.example.com
# lan:
# host: hw5.mcp.hc.lan
# annotations: {}