From 6f933866fc7ab2913c486715fd8f88d4c3b20827 Mon Sep 17 00:00:00 2001 From: wwya Date: Wed, 1 Apr 2026 19:20:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20openclaw-deploy/template/t?= =?UTF-8?q?emplate.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openclaw-deploy/template/template.yaml | 80 ++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 openclaw-deploy/template/template.yaml diff --git a/openclaw-deploy/template/template.yaml b/openclaw-deploy/template/template.yaml new file mode 100644 index 0000000..bc3448f --- /dev/null +++ b/openclaw-deploy/template/template.yaml @@ -0,0 +1,80 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: agents-user-{{user_id}} + namespace: {{namespace}} + labels: + app: agents + user: {{user_id}} +spec: + replicas: 1 + selector: + matchLabels: + app: agents + user: {{user_id}} + template: + metadata: + labels: + app: agents + user: {{user_id}} + spec: + containers: + - name: agent + image: {{image}} + env: + - name: NODE_ENV + value: production + - name: OPENCLAW_GATEWAY_TOKEN + value: {{gateway_token}} + - name: OPENCLAW_GATEWAY_SVC + value: agents-user-{{user_id}} + - name: TZ + value: Asia/Shanghai + - name: NODE_OPTIONS + value: "--max-old-space-size=4096" + - name: WANMEI_USER_ID + value: {{user_id}} + - name: QWEN_PORTAL_API_KEY + value: {{qwen_api_key}} + ports: + - containerPort: 18789 + resources: + limits: + cpu: {{cpu_limit}} + memory: {{mem_limit}} + requests: + cpu: {{cpu_request}} + memory: {{mem_request}} + volumeMounts: + - name: volume-config + mountPath: /data/config + - name: data + mountPath: /home/node/.openclaw + volumes: + - name: volume-config + configMap: + name: openclaw + - name: data + persistentVolumeClaim: + claimName: agents-user-{{user_id}} + imagePullSecrets: + - name: {{image_pull_secret}} + +--- +apiVersion: v1 +kind: Service +metadata: + name: agents-user-{{user_id}} + namespace: {{namespace}} +spec: + selector: + app: agents + user: {{user_id}} + ports: + - name: http + port: 80 + targetPort: 18789 + - name: gateway + port: 18789 + targetPort: 18789 + type: ClusterIP \ No newline at end of file