From cb8721853eaa5c7500cd52bb84db63cc150f4285 Mon Sep 17 00:00:00 2001 From: sHa Date: Sun, 18 Oct 2026 03:31:11 +0300 Subject: [PATCH] Add uptime-gizmo-mcp chart Co-Authored-By: Claude Sonnet 5.5 --- uptime-gizmo-mcp/Chart.yaml | 9 ++ uptime-gizmo-mcp/templates/deployment.yaml | 97 ++++++++++++++++++++++ uptime-gizmo-mcp/templates/ingress.yaml | 27 ++++++ uptime-gizmo-mcp/templates/service.yaml | 16 ++++ uptime-gizmo-mcp/values.yaml | 47 +++++++++++ 5 files changed, 196 insertions(+) create mode 100644 uptime-gizmo-mcp/Chart.yaml create mode 100644 uptime-gizmo-mcp/templates/deployment.yaml create mode 100644 uptime-gizmo-mcp/templates/ingress.yaml create mode 100644 uptime-gizmo-mcp/templates/service.yaml create mode 100644 uptime-gizmo-mcp/values.yaml diff --git a/uptime-gizmo-mcp/Chart.yaml b/uptime-gizmo-mcp/Chart.yaml new file mode 100644 index 0000000..81a3550 --- /dev/null +++ b/uptime-gizmo-mcp/Chart.yaml @@ -0,0 +1,9 @@ +apiVersion: v2 +name: uptime-gizmo-mcp +description: MCP server for Uptime Gizmo, served over streamable HTTP +type: application +version: 0.1.0 +# Version of the upstream mcp-server package. The code itself is pinned by +# source.ref in values.yaml; no version-source annotation on purpose, so a new +# upstream commit never reaches a pod that holds an API key without review. +appVersion: "0.1.0" diff --git a/uptime-gizmo-mcp/templates/deployment.yaml b/uptime-gizmo-mcp/templates/deployment.yaml new file mode 100644 index 0000000..e52590b --- /dev/null +++ b/uptime-gizmo-mcp/templates/deployment.yaml @@ -0,0 +1,97 @@ +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 +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 }} + securityContext: + runAsNonRoot: true + runAsUser: 1000 + runAsGroup: 1000 + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + workingDir: /app + command: + - sh + - -c + - | + set -e + base="https://raw.githubusercontent.com/{{ .Values.source.repo }}/{{ .Values.source.ref }}/mcp-server" + wget -q -O index.mjs "$base/index.mjs" + wget -q -O package.json "$base/package.json" + npm install --omit=dev --no-audit --no-fund --silent + npm install --no-save --no-audit --no-fund --silent supergateway@{{ .Values.supergatewayVersion }} + exec ./node_modules/.bin/supergateway \ + --stdio "node /app/index.mjs" \ + --outputTransport streamableHttp \ + --port {{ .Values.port }} \ + --streamableHttpPath {{ .Values.mcpPath }} \ + --healthEndpoint /health + ports: + - containerPort: {{ .Values.port }} + name: http + protocol: TCP + env: + - name: HOME + value: /tmp + - name: UPTIME_GIZMO_URL + value: {{ required "uptimeURL is required" .Values.uptimeURL | quote }} + - name: UPTIME_GIZMO_API_KEY + valueFrom: + secretKeyRef: + name: {{ required "existingSecret is required" .Values.existingSecret }} + key: {{ .Values.apiKeySecretKey }} + {{- range $key, $value := .Values.env }} + - name: {{ $key }} + value: {{ $value | quote }} + {{- end }} + startupProbe: + httpGet: + path: /health + port: http + periodSeconds: 5 + failureThreshold: 60 + livenessProbe: + httpGet: + path: /health + port: http + periodSeconds: 15 + failureThreshold: 3 + readinessProbe: + httpGet: + path: /health + port: http + periodSeconds: 10 + resources: + {{- toYaml .Values.resources | nindent 12 }} + volumeMounts: + - name: app + mountPath: /app + volumes: + - name: app + emptyDir: {} diff --git a/uptime-gizmo-mcp/templates/ingress.yaml b/uptime-gizmo-mcp/templates/ingress.yaml new file mode 100644 index 0000000..6a80701 --- /dev/null +++ b/uptime-gizmo-mcp/templates/ingress.yaml @@ -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 }} diff --git a/uptime-gizmo-mcp/templates/service.yaml b/uptime-gizmo-mcp/templates/service.yaml new file mode 100644 index 0000000..cff6060 --- /dev/null +++ b/uptime-gizmo-mcp/templates/service.yaml @@ -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 diff --git a/uptime-gizmo-mcp/values.yaml b/uptime-gizmo-mcp/values.yaml new file mode 100644 index 0000000..01fd519 --- /dev/null +++ b/uptime-gizmo-mcp/values.yaml @@ -0,0 +1,47 @@ +# Default values for the Uptime Gizmo MCP Helm Chart +image: + repository: node + tag: "22-alpine" + pullPolicy: IfNotPresent + +# The upstream mcp-server speaks stdio only. At startup the pod downloads it +# from source.repo at source.ref, installs it, and serves it with supergateway +# as streamable HTTP at /mcp. +source: + repo: starit/uptime-gizmo + # Full commit SHA of the upstream repository. Review the diff before changing. + ref: 4ce4fe6f694230af5673d66f614ef40d25b7e15c +supergatewayVersion: "4.2.0" + +port: 8000 +mcpPath: /mcp + +# Base URL of the Uptime Gizmo instance (use the in-cluster service) +uptimeURL: "" + +# Secret with the Uptime Gizmo API key (created in Settings -> API Keys). +# The key's own read-only/writable setting decides what the tools may do. +existingSecret: "" +apiKeySecretKey: UPTIME_GIZMO_API_KEY + +# Additional non-secret environment variables +env: {} + +resources: + requests: + cpu: "50m" + memory: "128Mi" + limits: + cpu: "500m" + memory: "512Mi" + +nodeSelector: {} +tolerations: [] + +ingresses: {} + # https: + # host: uptime.mcp.example.com + # annotations: {} + # tls: + # - hosts: + # - uptime.mcp.example.com