diff --git a/apps/base/customer1/openclaw/keda-a100.yaml b/apps/base/customer1/openclaw/keda-a100.yaml new file mode 100644 index 0000000..0a60ea8 --- /dev/null +++ b/apps/base/customer1/openclaw/keda-a100.yaml @@ -0,0 +1,18 @@ +apiVersion: http.keda.sh/v1alpha1 +kind: HTTPScaledObject +metadata: + name: openclaw-brain-a100-scaling + namespace: customer1 +spec: + hosts: + - a100-vllm.internal.cluster # Replace with actual internal routing host if needed + scaleTargetRef: + name: openclaw-brain-vllm + kind: Deployment + apiVersion: apps/v1 + service: openclaw-brain-service + port: 8000 + replicas: + min: 0 + max: 1 + scaledownPeriod: 900 # 15 minutes of idle time before scaling to zero diff --git a/apps/base/customer1/openclaw/kustomization.yaml b/apps/base/customer1/openclaw/kustomization.yaml index 32de28c..57f193c 100644 --- a/apps/base/customer1/openclaw/kustomization.yaml +++ b/apps/base/customer1/openclaw/kustomization.yaml @@ -1,6 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: + - vllm-l4.yaml + - keda-a100.yaml - pvc.yaml - configmap.yaml - deployment.yaml diff --git a/apps/base/customer1/openclaw/vllm-l4.yaml b/apps/base/customer1/openclaw/vllm-l4.yaml new file mode 100644 index 0000000..f757857 --- /dev/null +++ b/apps/base/customer1/openclaw/vllm-l4.yaml @@ -0,0 +1,86 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: openclaw-brain-vllm-l4 + namespace: customer1 + labels: + app: openclaw-brain-l4 +spec: + replicas: 1 + selector: + matchLabels: + app: openclaw-brain-l4 + template: + metadata: + labels: + app: openclaw-brain-l4 + spec: + nodeSelector: + cloud.google.com/gke-accelerator: "nvidia-l4" + tolerations: + - key: "nvidia.com/gpu" + operator: "Exists" + effect: "NoSchedule" + containers: + - name: vllm-brain-l4 + image: vllm/vllm-openai:latest + command: ["python3", "-m", "vllm.entrypoints.openai.api_server"] + env: + - name: HF_TOKEN + value: "" + args: + - --model=trohrbaugh/Qwen2.5-Coder-7B-Instruct-heretic + - --host=0.0.0.0 + - --port=8000 + - --tensor-parallel-size=1 + - --gpu-memory-utilization=0.90 + - --max-model-len=16384 + - --enable-auto-tool-choice + - --trust-remote-code + - --dtype=auto + - --tool-call-parser=qwen3_coder + - --enable-prefix-caching + ports: + - containerPort: 8000 + resources: + limits: + nvidia.com/gpu: 1 + memory: "24Gi" + cpu: "8" + requests: + nvidia.com/gpu: 1 + memory: "16Gi" + cpu: "4" + volumeMounts: + - name: model-cache + mountPath: /root/.cache/huggingface + volumes: + - name: model-cache + persistentVolumeClaim: + claimName: vllm-model-cache-pvc-l4 +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: vllm-model-cache-pvc-l4 + namespace: customer1 +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 50Gi +--- +apiVersion: v1 +kind: Service +metadata: + name: openclaw-brain-service-l4 + namespace: customer1 +spec: + selector: + app: openclaw-brain-l4 + ports: + - protocol: TCP + port: 8000 + targetPort: 8000 + type: ClusterIP