Files
pikasTech-HWLAB/deploy/gitops/g14/runtime-v02/deepseek-proxy.yaml
T
2026-05-29 03:40:42 +00:00

261 lines
11 KiB
YAML

{
"apiVersion": "v1",
"kind": "List",
"items": [
{
"apiVersion": "v1",
"kind": "ConfigMap",
"metadata": {
"name": "hwlab-deepseek-proxy-config",
"namespace": "hwlab-v02",
"labels": {
"app.kubernetes.io/name": "hwlab-deepseek-proxy",
"app.kubernetes.io/part-of": "hwlab",
"hwlab.pikastech.local/environment": "v02",
"hwlab.pikastech.local/gitops-target": "v02",
"hwlab.pikastech.local/service-id": "hwlab-deepseek-proxy",
"hwlab.pikastech.local/source-commit": "9a6a12c08057307b5967714693629a42326d74b5"
}
},
"data": {
"render-config.sh": "#!/bin/sh\nif [ -z \"${DEEPSEEK_API_KEY:-}\" ]; then\n echo \"DEEPSEEK_API_KEY is required\" >&2\n exit 1\nfi\ncat > /config/config.yml <<EOF\nmode: \"Transform\"\nlog:\n level: \"info\"\n format: \"text\"\nserver:\n addr: \"0.0.0.0:4001\"\npersistence:\n active_provider: db_sqlite\nextensions:\n db_sqlite:\n enabled: true\n config:\n path: /data/moonbridge.db\n wal: true\n busy_timeout_ms: 5000\n max_open_conns: 1\n metrics:\n enabled: true\n config:\n default_limit: 100\n max_limit: 1000\n deepseek_v4:\n config:\n reinforce_instructions: true\n reinforce_prompt: \"[System Reminder]: Please pay close attention to the system instructions, AGENTS.md files, and any other context provided. Follow them carefully and completely in your response.\\n[User]:\"\ncache:\n mode: \"explicit\"\n ttl: \"5m\"\n prompt_caching: true\n automatic_prompt_cache: false\n explicit_cache_breakpoints: true\n allow_retention_downgrade: false\n max_breakpoints: 4\n min_cache_tokens: 1024\n expected_reuse: 2\n minimum_value_score: 2048\n min_breakpoint_tokens: 1024\ndefaults:\n model: \"deepseek-chat\"\n max_tokens: 8192\ntrace:\n enabled: false\nmodels:\n deepseek-chat:\n context_window: 128000\n max_output_tokens: 8192\n display_name: \"deepseek-chat\"\n description: \"DeepSeek via Moon Bridge\"\n default_reasoning_level: null\n supported_reasoning_levels: []\n extensions:\n deepseek_v4:\n enabled: true\nproviders:\n deepseek:\n base_url: \"https://api.deepseek.com/anthropic\"\n api_key: \"${DEEPSEEK_API_KEY}\"\n version: \"2023-06-01\"\n user_agent: \"moonbridge/1.0\"\n offers:\n - model: deepseek-chat\nroutes:\n deepseek-chat:\n model: deepseek-chat\n provider: deepseek\nEOF\n"
}
},
{
"apiVersion": "apps/v1",
"kind": "Deployment",
"metadata": {
"name": "hwlab-deepseek-proxy",
"namespace": "hwlab-v02",
"labels": {
"app.kubernetes.io/name": "hwlab-deepseek-proxy",
"app.kubernetes.io/part-of": "hwlab",
"hwlab.pikastech.local/environment": "v02",
"hwlab.pikastech.local/gitops-target": "v02",
"hwlab.pikastech.local/service-id": "hwlab-deepseek-proxy",
"hwlab.pikastech.local/source-commit": "9a6a12c08057307b5967714693629a42326d74b5"
},
"annotations": {
"hwlab.pikastech.local/moonbridge-source-ref": "1b99888d3dae889b79ee602cb875c7907f7e76f2",
"hwlab.pikastech.local/bridge-service-id": "hwlab-cloud-api",
"hwlab.pikastech.local/source-commit": "9a6a12c08057307b5967714693629a42326d74b5",
"hwlab.pikastech.local/bridge-source-commit": "bc816cea4bb6743943492bf75e0846fdf1c93317",
"hwlab.pikastech.local/bridge-image-tag": "9a6a12c08057307b5967714693629a42326d74b5",
"hwlab.pikastech.local/bridge-image": "127.0.0.1:5000/hwlab/hwlab-cloud-api@sha256:f8a67f1750103cc4d86a419607042259225f6d03a0856efcbe681e3406d09386"
}
},
"spec": {
"replicas": 1,
"selector": {
"matchLabels": {
"app.kubernetes.io/name": "hwlab-deepseek-proxy"
}
},
"template": {
"metadata": {
"labels": {
"app.kubernetes.io/name": "hwlab-deepseek-proxy",
"app.kubernetes.io/part-of": "hwlab",
"hwlab.pikastech.local/environment": "v02",
"hwlab.pikastech.local/gitops-target": "v02",
"hwlab.pikastech.local/service-id": "hwlab-deepseek-proxy",
"hwlab.pikastech.local/source-commit": "9a6a12c08057307b5967714693629a42326d74b5"
},
"annotations": {
"hwlab.pikastech.local/bridge-service-id": "hwlab-cloud-api",
"hwlab.pikastech.local/source-commit": "9a6a12c08057307b5967714693629a42326d74b5",
"hwlab.pikastech.local/bridge-source-commit": "bc816cea4bb6743943492bf75e0846fdf1c93317",
"hwlab.pikastech.local/bridge-image-tag": "9a6a12c08057307b5967714693629a42326d74b5",
"hwlab.pikastech.local/bridge-image": "127.0.0.1:5000/hwlab/hwlab-cloud-api@sha256:f8a67f1750103cc4d86a419607042259225f6d03a0856efcbe681e3406d09386"
}
},
"spec": {
"initContainers": [
{
"name": "moonbridge-config",
"image": "127.0.0.1:5000/hwlab/hwlab-cloud-api@sha256:f8a67f1750103cc4d86a419607042259225f6d03a0856efcbe681e3406d09386",
"imagePullPolicy": "IfNotPresent",
"command": [
"/bin/sh",
"-eu",
"/scripts/render-config.sh"
],
"env": [
{
"name": "DEEPSEEK_API_KEY",
"valueFrom": {
"secretKeyRef": {
"name": "hwlab-v02-code-agent-provider",
"key": "openai-api-key",
"optional": true
}
}
}
],
"volumeMounts": [
{
"name": "moonbridge-scripts",
"mountPath": "/scripts",
"readOnly": true
},
{
"name": "moonbridge-config",
"mountPath": "/config"
}
]
}
],
"containers": [
{
"name": "responses-bridge",
"image": "127.0.0.1:5000/hwlab/hwlab-cloud-api@sha256:f8a67f1750103cc4d86a419607042259225f6d03a0856efcbe681e3406d09386",
"imagePullPolicy": "IfNotPresent",
"command": [
"/usr/local/bin/bun",
"run",
"/app/cmd/hwlab-deepseek-responses-bridge/main.ts"
],
"env": [
{
"name": "PORT",
"value": "4000"
},
{
"name": "HWLAB_COMMIT_ID",
"value": "bc816cea4bb6743943492bf75e0846fdf1c93317"
},
{
"name": "HWLAB_IMAGE",
"value": "127.0.0.1:5000/hwlab/hwlab-cloud-api@sha256:f8a67f1750103cc4d86a419607042259225f6d03a0856efcbe681e3406d09386"
},
{
"name": "HWLAB_IMAGE_TAG",
"value": "9a6a12c08057307b5967714693629a42326d74b5"
},
{
"name": "HWLAB_DEEPSEEK_BRIDGE_UPSTREAM",
"value": "http://127.0.0.1:4001"
},
{
"name": "HWLAB_DEEPSEEK_BRIDGE_MODEL",
"value": "deepseek-chat"
}
],
"ports": [
{
"name": "http",
"containerPort": 4000
}
],
"readinessProbe": {
"httpGet": {
"path": "/health/readiness",
"port": "http"
},
"initialDelaySeconds": 10,
"periodSeconds": 10
},
"livenessProbe": {
"httpGet": {
"path": "/health/liveliness",
"port": "http"
},
"initialDelaySeconds": 20,
"periodSeconds": 20
}
},
{
"name": "moonbridge",
"image": "127.0.0.1:5000/hwlab/moonbridge:1b99888d3dae",
"imagePullPolicy": "IfNotPresent",
"args": [
"-config",
"/config/config.yml"
],
"ports": [
{
"name": "moonbridge-http",
"containerPort": 4001
}
],
"readinessProbe": {
"httpGet": {
"path": "/v1/models",
"port": "moonbridge-http"
},
"initialDelaySeconds": 10,
"periodSeconds": 10
},
"livenessProbe": {
"httpGet": {
"path": "/v1/models",
"port": "moonbridge-http"
},
"initialDelaySeconds": 20,
"periodSeconds": 20
},
"volumeMounts": [
{
"name": "moonbridge-config",
"mountPath": "/config",
"readOnly": true
},
{
"name": "moonbridge-data",
"mountPath": "/data"
}
]
}
],
"volumes": [
{
"name": "moonbridge-scripts",
"configMap": {
"name": "hwlab-deepseek-proxy-config"
}
},
{
"name": "moonbridge-config",
"emptyDir": {}
},
{
"name": "moonbridge-data",
"emptyDir": {}
}
]
}
}
}
},
{
"apiVersion": "v1",
"kind": "Service",
"metadata": {
"name": "hwlab-deepseek-proxy",
"namespace": "hwlab-v02",
"labels": {
"app.kubernetes.io/name": "hwlab-deepseek-proxy",
"app.kubernetes.io/part-of": "hwlab",
"hwlab.pikastech.local/environment": "v02",
"hwlab.pikastech.local/gitops-target": "v02",
"hwlab.pikastech.local/service-id": "hwlab-deepseek-proxy",
"hwlab.pikastech.local/source-commit": "9a6a12c08057307b5967714693629a42326d74b5"
}
},
"spec": {
"type": "ClusterIP",
"selector": {
"app.kubernetes.io/name": "hwlab-deepseek-proxy"
},
"ports": [
{
"name": "http",
"port": 4000,
"targetPort": "http"
}
]
}
}
]
}