Files
pikasTech-HWLAB/deploy/k8s/base/workloads.yaml
T
2026-06-21 19:42:26 +08:00

816 lines
26 KiB
YAML

{
"apiVersion": "v1",
"kind": "List",
"items": [
{
"apiVersion": "v1",
"kind": "PersistentVolumeClaim",
"metadata": {
"labels": {
"app.kubernetes.io/name": "hwlab-code-agent-workspace",
"hwlab.pikastech.local/service-id": "hwlab-code-agent-workspace"
},
"name": "hwlab-code-agent-workspace",
"namespace": "hwlab-dev"
},
"spec": {
"accessModes": [
"ReadWriteOnce"
],
"resources": {
"requests": {
"storage": "8Gi"
}
}
}
},
{
"apiVersion": "v1",
"kind": "PersistentVolumeClaim",
"metadata": {
"labels": {
"app.kubernetes.io/name": "hwlab-user-skills",
"hwlab.pikastech.local/service-id": "hwlab-user-skills"
},
"name": "hwlab-user-skills",
"namespace": "hwlab-dev"
},
"spec": {
"accessModes": [
"ReadWriteOnce"
],
"resources": {
"requests": {
"storage": "2Gi"
}
}
}
},
{
"apiVersion": "apps/v1",
"kind": "Deployment",
"metadata": {
"name": "hwlab-workbench-runtime",
"namespace": "hwlab-dev",
"labels": {
"app.kubernetes.io/name": "hwlab-workbench-runtime",
"hwlab.pikastech.local/service-id": "hwlab-workbench-runtime"
}
},
"spec": {
"replicas": 1,
"selector": {
"matchLabels": {
"app.kubernetes.io/name": "hwlab-workbench-runtime"
}
},
"template": {
"metadata": {
"labels": {
"app.kubernetes.io/name": "hwlab-workbench-runtime",
"hwlab.pikastech.local/service-id": "hwlab-workbench-runtime"
}
},
"spec": {
"containers": [
{
"name": "hwlab-workbench-runtime",
"image": "127.0.0.1:5000/hwlab/hwlab-workbench-runtime:af46386",
"ports": [
{
"name": "http",
"containerPort": 6671
}
],
"env": [
{
"name": "HWLAB_WORKBENCH_RUNTIME_PORT",
"value": "6671"
}
],
"readinessProbe": {
"httpGet": {
"path": "/health/ready",
"port": "http"
}
},
"livenessProbe": {
"httpGet": {
"path": "/health/live",
"port": "http"
}
}
}
]
}
}
}
},
{
"apiVersion": "apps/v1",
"kind": "Deployment",
"metadata": {
"name": "hwlab-cloud-api",
"namespace": "hwlab-dev",
"labels": {
"app.kubernetes.io/name": "hwlab-cloud-api",
"hwlab.pikastech.local/service-id": "hwlab-cloud-api"
}
},
"spec": {
"replicas": 1,
"strategy": {
"type": "Recreate"
},
"selector": {
"matchLabels": {
"app.kubernetes.io/name": "hwlab-cloud-api"
}
},
"template": {
"metadata": {
"labels": {
"app.kubernetes.io/name": "hwlab-cloud-api",
"hwlab.pikastech.local/service-id": "hwlab-cloud-api"
}
},
"spec": {
"initContainers": [
{
"command": [
"sh",
"-ceu",
"target=/workspace/hwlab\nmarker=\"$target/.hwlab-workspace-initialized\"\nmkdir -p \"$target\"\nif [ ! -e \"$marker\" ]; then\n if [ -z \"$(find \"$target\" -mindepth 1 -maxdepth 1 ! -name lost+found -print -quit)\" ]; then\n cp -a /app/. \"$target\"/\n mode=copied-from-image\n else\n mode=adopted-existing-workspace\n fi\n printf '%s\\n' \"$mode\" > \"$marker\"\n printf '%s\\n' \"${HWLAB_WORKSPACE_SOURCE_COMMIT:-unknown}\" > \"$target/.hwlab-workspace-base-revision\"\nfi\nprintf '%s\\n' \"${HWLAB_WORKSPACE_SOURCE_COMMIT:-unknown}\" > \"$target/.hwlab-workspace-current-image-revision\"\n"
],
"env": [
{
"name": "HWLAB_WORKSPACE_SOURCE_COMMIT",
"value": "af46386"
}
],
"image": "127.0.0.1:5000/hwlab/hwlab-cloud-api:af46386",
"imagePullPolicy": "IfNotPresent",
"name": "hwlab-code-agent-workspace-init",
"volumeMounts": [
{
"mountPath": "/workspace",
"name": "hwlab-code-agent-workspace"
}
]
}
],
"containers": [
{
"name": "hwlab-cloud-api",
"image": "127.0.0.1:5000/hwlab/hwlab-cloud-api:af46386",
"ports": [
{
"name": "http",
"containerPort": 6667
}
],
"env": [
{
"name": "HWLAB_ENVIRONMENT",
"value": "dev"
},
{
"name": "HWLAB_PUBLIC_ENDPOINT",
"value": "http://74.48.78.17:16667"
},
{
"name": "HWLAB_CLOUD_API_PORT",
"value": "6667"
},
{
"name": "HWLAB_COMMIT_ID",
"value": "af46386"
},
{
"name": "HWLAB_IMAGE",
"value": "127.0.0.1:5000/hwlab/hwlab-cloud-api:af46386"
},
{
"name": "HWLAB_IMAGE_TAG",
"value": "af46386"
},
{
"name": "HWLAB_RUNTIME_SUBSTITUTE_FORBIDDEN",
"value": "unidesk-backend,provider-gateway,microservice-proxy"
},
{
"name": "HWLAB_CLOUD_DB_URL",
"valueFrom": {
"secretKeyRef": {
"name": "hwlab-cloud-api-dev-db",
"key": "database-url",
"optional": true
}
}
},
{
"name": "HWLAB_CLOUD_DB_SSL_MODE",
"value": "disable"
},
{
"name": "HWLAB_CLOUD_DB_CONTRACT",
"value": "dev-redacted-presence-only"
},
{
"name": "HWLAB_CLOUD_RUNTIME_ADAPTER",
"value": "postgres"
},
{
"name": "HWLAB_CLOUD_RUNTIME_DURABLE",
"value": "true"
},
{
"name": "HWLAB_M3_IO_CONTROL_ENABLED",
"value": "false"
},
{
"name": "HWLAB_CODE_AGENT_PROVIDER",
"value": "codex-stdio"
},
{
"name": "HWLAB_CODE_AGENT_MODEL",
"value": "gpt-5.5"
},
{
"name": "HWLAB_CODE_AGENT_TIMEOUT_MS",
"value": "1200000"
},
{
"name": "HWLAB_CODE_AGENT_OPENAI_BASE_URL",
"value": "http://127.0.0.1:49280/responses"
},
{
"name": "HWLAB_CODE_AGENT_CODEX_STDIO_ENABLED",
"value": "1"
},
{
"name": "HWLAB_CODE_AGENT_CODEX_STDIO_SUPERVISOR",
"value": "repo-owned"
},
{
"name": "HWLAB_CODE_AGENT_WORKSPACE",
"value": "/workspace/hwlab"
},
{
"name": "HWLAB_CODE_AGENT_CODEX_WORKSPACE",
"value": "/workspace/hwlab"
},
{
"name": "HWLAB_CODE_AGENT_CODEX_SANDBOX",
"value": "danger-full-access"
},
{
"name": "HWLAB_CODE_AGENT_CODEX_COMMAND",
"value": "/app/node_modules/.bin/codex"
},
{
"name": "CODEX_HOME",
"value": "/codex-home"
},
{
"name": "NO_PROXY",
"value": "hyueapi.com,.hyueapi.com,hyui.com,.hyui.com,127.0.0.1,localhost,::1,api.minimaxi.com,.minimaxi.com"
},
{
"name": "no_proxy",
"value": "hyueapi.com,.hyueapi.com,hyui.com,.hyui.com,127.0.0.1,localhost,::1,api.minimaxi.com,.minimaxi.com"
},
{
"name": "HWLAB_CODE_AGENT_SKILLS_DIRS",
"value": "/app/skills:/data/user-skills"
},
{
"name": "HWLAB_PREINSTALLED_SKILLS_DIR",
"value": "/app/skills"
},
{
"name": "HWLAB_USER_SKILLS_DIR",
"value": "/data/user-skills"
},
{
"name": "OPENAI_API_KEY",
"valueFrom": {
"secretKeyRef": {
"name": "hwlab-code-agent-provider",
"key": "openai-api-key",
"optional": true
}
}
},
{
"name": "HWLAB_CODE_AGENT_DEFAULT_PROVIDER_PROFILE",
"value": "deepseek"
},
{
"name": "HWLAB_CODE_AGENT_DEEPSEEK_MODEL",
"value": "deepseek-chat"
},
{
"name": "HWLAB_CODE_AGENT_DEEPSEEK_BASE_URL",
"value": "http://hwlab-deepseek-proxy.hwlab-dev.svc.cluster.local:4000/v1/responses"
},
{
"name": "HWLAB_CODE_AGENT_CODEX_API_MODEL",
"value": "gpt-5.5"
},
{
"name": "HWLAB_CODE_AGENT_CODEX_API_BASE_URL",
"value": "http://127.0.0.1:49280/responses"
},
{
"name": "HWLAB_CODE_AGENT_CODEX_API_UPSTREAM_BASE_URL",
"value": "https://hyueapi.com"
},
{
"name": "HWLAB_CODE_AGENT_CODEX_API_FORWARDER_PORT",
"value": "49280"
}
],
"readinessProbe": {
"httpGet": {
"path": "/health/live",
"port": "http"
}
},
"livenessProbe": {
"httpGet": {
"path": "/health/live",
"port": "http"
}
},
"volumeMounts": [
{
"name": "hwlab-code-agent-workspace",
"mountPath": "/workspace"
},
{
"name": "hwlab-user-skills",
"mountPath": "/data/user-skills"
},
{
"name": "hwlab-code-agent-codex-home",
"mountPath": "/codex-home"
},
{
"name": "hwlab-code-agent-codex-config",
"mountPath": "/codex-home/config.toml",
"subPath": "config.toml",
"readOnly": true
},
{
"name": "hwlab-code-agent-codex-auth",
"mountPath": "/codex-home/auth.json",
"subPath": "auth.json",
"readOnly": true
}
]
},
{
"name": "hwlab-codex-api-forwarder",
"image": "127.0.0.1:5000/hwlab/hwlab-cloud-api:af46386",
"command": [
"/usr/local/bin/bun",
"run",
"/app/cmd/hwlab-codex-api-responses-forwarder/main.ts"
],
"ports": [
{
"name": "codex-api",
"containerPort": 49280
}
],
"env": [
{
"name": "HWLAB_CODE_AGENT_CODEX_API_FORWARDER_HOST",
"value": "127.0.0.1"
},
{
"name": "HWLAB_CODE_AGENT_CODEX_API_FORWARDER_PORT",
"value": "49280"
},
{
"name": "HWLAB_CODE_AGENT_CODEX_API_UPSTREAM_BASE_URL",
"value": "https://hyueapi.com"
},
{
"name": "NO_PROXY",
"value": "hyueapi.com,.hyueapi.com,hyui.com,.hyui.com,127.0.0.1,localhost,::1,api.minimaxi.com,.minimaxi.com"
},
{
"name": "no_proxy",
"value": "hyueapi.com,.hyueapi.com,hyui.com,.hyui.com,127.0.0.1,localhost,::1,api.minimaxi.com,.minimaxi.com"
},
{
"name": "HWLAB_M3_IO_CONTROL_ENABLED",
"value": "false"
}
],
"readinessProbe": {
"exec": {
"command": [
"node",
"-e",
"fetch('http://127.0.0.1:49280/health/readiness').then((response) => process.exit(response.ok ? 0 : 1)).catch(() => process.exit(1))"
]
},
"timeoutSeconds": 2
},
"livenessProbe": {
"exec": {
"command": [
"node",
"-e",
"fetch('http://127.0.0.1:49280/health/live').then((response) => process.exit(response.ok ? 0 : 1)).catch(() => process.exit(1))"
]
},
"timeoutSeconds": 2
}
}
],
"volumes": [
{
"name": "hwlab-code-agent-workspace",
"persistentVolumeClaim": {
"claimName": "hwlab-code-agent-workspace"
}
},
{
"name": "hwlab-user-skills",
"persistentVolumeClaim": {
"claimName": "hwlab-user-skills"
}
},
{
"name": "hwlab-code-agent-codex-home",
"emptyDir": {}
},
{
"name": "hwlab-code-agent-codex-config",
"configMap": {
"name": "hwlab-code-agent-codex-config",
"items": [
{
"key": "config.toml",
"path": "config.toml"
}
]
}
},
{
"name": "hwlab-code-agent-codex-auth",
"secret": {
"secretName": "hwlab-code-agent-codex-auth",
"items": [
{
"key": "auth.json",
"path": "auth.json"
}
]
}
}
]
}
}
}
},
{
"apiVersion": "apps/v1",
"kind": "Deployment",
"metadata": {
"name": "hwlab-user-billing",
"namespace": "hwlab-dev",
"labels": {
"app.kubernetes.io/name": "hwlab-user-billing",
"hwlab.pikastech.local/service-id": "hwlab-user-billing"
}
},
"spec": {
"replicas": 1,
"selector": {
"matchLabels": {
"app.kubernetes.io/name": "hwlab-user-billing"
}
},
"template": {
"metadata": {
"labels": {
"app.kubernetes.io/name": "hwlab-user-billing",
"hwlab.pikastech.local/service-id": "hwlab-user-billing"
}
},
"spec": {
"containers": [
{
"name": "hwlab-user-billing",
"image": "127.0.0.1:5000/hwlab/hwlab-user-billing:af46386",
"ports": [
{
"name": "http",
"containerPort": 6670
}
],
"env": [
{
"name": "HWLAB_USER_BILLING_PORT",
"value": "6670"
},
{
"name": "HWLAB_USER_BILLING_STATE_AUTHORITY",
"value": "pk01-postgres"
},
{
"name": "HWLAB_USER_BILLING_STATELESS",
"value": "true"
}
],
"readinessProbe": {
"httpGet": {
"path": "/health/ready",
"port": "http"
}
},
"livenessProbe": {
"httpGet": {
"path": "/health/live",
"port": "http"
}
}
}
]
}
}
}
},
{
"apiVersion": "apps/v1",
"kind": "Deployment",
"metadata": {
"name": "hwlab-cloud-web",
"namespace": "hwlab-dev",
"labels": {
"app.kubernetes.io/name": "hwlab-cloud-web",
"hwlab.pikastech.local/service-id": "hwlab-cloud-web"
}
},
"spec": {
"replicas": 1,
"selector": {
"matchLabels": {
"app.kubernetes.io/name": "hwlab-cloud-web"
}
},
"template": {
"metadata": {
"labels": {
"app.kubernetes.io/name": "hwlab-cloud-web",
"hwlab.pikastech.local/service-id": "hwlab-cloud-web"
}
},
"spec": {
"containers": [
{
"name": "hwlab-cloud-web",
"image": "127.0.0.1:5000/hwlab/hwlab-cloud-web:af46386",
"ports": [
{
"name": "http",
"containerPort": 8080
}
],
"env": [
{
"name": "HWLAB_API_BASE_URL",
"value": "http://hwlab-cloud-api.hwlab-dev.svc.cluster.local:6667"
},
{
"name": "HWLAB_CLOUD_WEB_PROXY_TIMEOUT_MS",
"value": "1260000"
},
{
"name": "HWLAB_COMMIT_ID",
"value": "af46386"
},
{
"name": "HWLAB_IMAGE",
"value": "127.0.0.1:5000/hwlab/hwlab-cloud-web:af46386"
},
{
"name": "HWLAB_IMAGE_TAG",
"value": "af46386"
}
],
"readinessProbe": {
"httpGet": {
"path": "/health/live",
"port": "http"
}
},
"livenessProbe": {
"httpGet": {
"path": "/health/live",
"port": "http"
}
}
}
]
}
}
}
},
{
"apiVersion": "apps/v1",
"kind": "Deployment",
"metadata": {
"name": "hwlab-gateway",
"namespace": "hwlab-dev",
"labels": {
"app.kubernetes.io/name": "hwlab-gateway",
"hwlab.pikastech.local/service-id": "hwlab-gateway",
"hwlab.pikastech.local/activation": "manual"
}
},
"spec": {
"replicas": 0,
"selector": {
"matchLabels": {
"app.kubernetes.io/name": "hwlab-gateway"
}
},
"template": {
"metadata": {
"labels": {
"app.kubernetes.io/name": "hwlab-gateway",
"hwlab.pikastech.local/service-id": "hwlab-gateway"
}
},
"spec": {
"containers": [
{
"name": "hwlab-gateway",
"image": "127.0.0.1:5000/hwlab/hwlab-gateway:af46386",
"ports": [
{
"name": "http",
"containerPort": 7001
}
],
"env": [
{
"name": "HWLAB_GATEWAY_MODE",
"value": "hardware-boundary"
}
],
"readinessProbe": {
"httpGet": {
"path": "/health/live",
"port": "http"
}
},
"livenessProbe": {
"httpGet": {
"path": "/health/live",
"port": "http"
}
}
}
]
}
}
}
},
{
"apiVersion": "apps/v1",
"kind": "Deployment",
"metadata": {
"name": "hwlab-edge-proxy",
"namespace": "hwlab-dev",
"labels": {
"app.kubernetes.io/name": "hwlab-edge-proxy",
"hwlab.pikastech.local/service-id": "hwlab-edge-proxy"
}
},
"spec": {
"replicas": 1,
"selector": {
"matchLabels": {
"app.kubernetes.io/name": "hwlab-edge-proxy"
}
},
"template": {
"metadata": {
"labels": {
"app.kubernetes.io/name": "hwlab-edge-proxy",
"hwlab.pikastech.local/service-id": "hwlab-edge-proxy"
}
},
"spec": {
"containers": [
{
"name": "hwlab-edge-proxy",
"image": "127.0.0.1:5000/hwlab/hwlab-edge-proxy:af46386",
"ports": [
{
"name": "http",
"containerPort": 6667
}
],
"env": [
{
"name": "HWLAB_EDGE_LISTEN",
"value": "0.0.0.0:6667"
},
{
"name": "HWLAB_EDGE_UPSTREAM",
"value": "http://hwlab-cloud-api.hwlab-dev.svc.cluster.local:6667"
},
{
"name": "HWLAB_EDGE_PROXY_TIMEOUT_MS",
"value": "1260000"
}
],
"readinessProbe": {
"httpGet": {
"path": "/health/live",
"port": "http"
}
},
"livenessProbe": {
"httpGet": {
"path": "/health/live",
"port": "http"
}
}
}
]
}
}
}
},
{
"apiVersion": "apps/v1",
"kind": "Deployment",
"metadata": {
"name": "hwlab-agent-skills",
"namespace": "hwlab-dev",
"labels": {
"app.kubernetes.io/name": "hwlab-agent-skills",
"hwlab.pikastech.local/service-id": "hwlab-agent-skills"
}
},
"spec": {
"replicas": 1,
"selector": {
"matchLabels": {
"app.kubernetes.io/name": "hwlab-agent-skills"
}
},
"template": {
"metadata": {
"labels": {
"app.kubernetes.io/name": "hwlab-agent-skills",
"hwlab.pikastech.local/service-id": "hwlab-agent-skills"
}
},
"spec": {
"containers": [
{
"name": "hwlab-agent-skills",
"image": "127.0.0.1:5000/hwlab/hwlab-agent-skills:af46386",
"ports": [
{
"name": "http",
"containerPort": 7430
}
],
"env": [
{
"name": "HWLAB_SKILLS_COMMIT_ID",
"value": "af46386"
}
],
"readinessProbe": {
"httpGet": {
"path": "/health/live",
"port": "http"
}
},
"livenessProbe": {
"httpGet": {
"path": "/health/live",
"port": "http"
}
}
}
]
}
}
}
}
]
}