From b9a5e809c1589ccbbef86c548f68c11576eb7a8f Mon Sep 17 00:00:00 2001 From: Sense T Date: Fri, 29 May 2026 13:09:23 +0000 Subject: [PATCH] =?UTF-8?q?mcp-proxy=20=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mcp-proxy/deploy.yaml | 19 ++++++++++++++++++- mcp-proxy/kustomization.yaml | 1 + mcp-proxy/pvc.yaml | 11 +++++++++++ mcp-proxy/start.sh | 3 ++- 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 mcp-proxy/pvc.yaml diff --git a/mcp-proxy/deploy.yaml b/mcp-proxy/deploy.yaml index 44b1dfe..3a512dc 100644 --- a/mcp-proxy/deploy.yaml +++ b/mcp-proxy/deploy.yaml @@ -18,6 +18,9 @@ spec: - name: tmp emptyDir: medium: Memory + - name: data + persistentVolumeClaim: + claimName: mcp-proxy containers: - name: mcp-proxy image: image @@ -36,6 +39,8 @@ spec: env: - name: NPM_CONFIG_REGISTRY value: https://registry.npmmirror.com/ + - name: UV_INDEX_URL + value: https://pypi.tuna.tsinghua.edu.cn/simple volumeMounts: - mountPath: /config.json name: config @@ -43,11 +48,23 @@ spec: - mountPath: /start.sh name: config subPath: start.sh + - mountPath: /root/.npm + name: data + subPath: .npm + - mountPath: /root/.cache + name: data + subPath: .cache + - mountPath: /root/.local + name: data + subPath: .local + - mountPath: /root/.config + name: data + subPath: .config livenessProbe: httpGet: port: 8080 path: /status - initialDelaySeconds: 60 + initialDelaySeconds: 300 periodSeconds: 10 successThreshold: 1 failureThreshold: 3 diff --git a/mcp-proxy/kustomization.yaml b/mcp-proxy/kustomization.yaml index 7e65683..0ec0004 100644 --- a/mcp-proxy/kustomization.yaml +++ b/mcp-proxy/kustomization.yaml @@ -6,6 +6,7 @@ replicas: resources: - deploy.yaml - service.yaml +- pvc.yaml configMapGenerator: - name: mcp-proxy files: diff --git a/mcp-proxy/pvc.yaml b/mcp-proxy/pvc.yaml new file mode 100644 index 0000000..22c21c2 --- /dev/null +++ b/mcp-proxy/pvc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: mcp-proxy +spec: + resources: + requests: + storage: 10Gi + volumeMode: Filesystem + accessModes: + - ReadWriteOnce diff --git a/mcp-proxy/start.sh b/mcp-proxy/start.sh index 9a99a18..603c754 100644 --- a/mcp-proxy/start.sh +++ b/mcp-proxy/start.sh @@ -1,11 +1,12 @@ #!/bin/sh sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories -apk add --no-cache npm +apk add --no-cache npm uv which node which npm which npx +which uvx catatonit -- mcp-proxy \ --named-server-config /config.json \