Files
pikasTech-HWLAB/deploy/deploy.schema.json
T
Lyon 7a0648088c fix: wire distinct M3 simulator identities
Merge PR #159 after Code Queue rebase and validation. Runner verified M3 cardinality, hardware-loop smoke, patch-panel runtime smoke, m3 readonly contract, and git diff check. This is source/config blocker removal only; it does not claim DEV-LIVE M3 pass.
2026-05-23 00:09:29 +08:00

410 lines
9.7 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://hwlab.pikastech.local/deploy/deploy.schema.json",
"title": "HWLAB Deploy Manifest",
"type": "object",
"required": ["manifestVersion", "environment", "commitId", "health", "publicEndpoints", "frp", "k3s", "profiles", "services"],
"properties": {
"manifestVersion": {
"type": "string",
"pattern": "^v[0-9]+$"
},
"environment": {
"type": "string",
"enum": ["dev"]
},
"commitId": {
"type": "string",
"pattern": "^[a-f0-9]{7,40}$"
},
"namespace": {
"type": "string",
"minLength": 1,
"maxLength": 63,
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
},
"endpoint": {
"type": "string",
"const": "http://74.48.78.17:16667"
},
"health": {
"$ref": "#/$defs/health"
},
"publicEndpoints": {
"$ref": "#/$defs/publicEndpoints"
},
"frp": {
"$ref": "#/$defs/frp"
},
"k3s": {
"$ref": "#/$defs/k3s"
},
"profiles": {
"type": "object",
"required": ["dev"],
"properties": {
"dev": {
"$ref": "#/$defs/profile"
},
"prod": {
"$ref": "#/$defs/profile"
}
},
"additionalProperties": false
},
"services": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/service"
}
},
"createdAt": {
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"$defs": {
"serviceId": {
"type": "string",
"enum": [
"hwlab-cloud-api",
"hwlab-cloud-web",
"hwlab-agent-mgr",
"hwlab-agent-worker",
"hwlab-gateway",
"hwlab-gateway-simu",
"hwlab-box-simu",
"hwlab-patch-panel",
"hwlab-router",
"hwlab-tunnel-client",
"hwlab-edge-proxy",
"hwlab-cli",
"hwlab-agent-skills"
]
},
"health": {
"type": "object",
"required": ["method", "path", "responseFormat"],
"properties": {
"method": {
"type": "string",
"const": "GET"
},
"path": {
"type": "string",
"const": "/health/live"
},
"responseFormat": {
"type": "string",
"const": "json"
}
},
"additionalProperties": false
},
"publicEndpoints": {
"type": "object",
"required": ["frontend", "api"],
"properties": {
"frontend": {
"allOf": [
{
"$ref": "#/$defs/publicEndpoint"
},
{
"properties": {
"url": {
"const": "http://74.48.78.17:16666"
},
"port": {
"const": 16666
},
"serviceId": {
"const": "hwlab-cloud-web"
},
"frpProxy": {
"const": "hwlab-dev-cloud-web"
}
}
}
]
},
"api": {
"allOf": [
{
"$ref": "#/$defs/publicEndpoint"
},
{
"properties": {
"url": {
"const": "http://74.48.78.17:16667"
},
"port": {
"const": 16667
},
"serviceId": {
"const": "hwlab-edge-proxy"
},
"frpProxy": {
"const": "hwlab-dev-edge-proxy"
}
}
}
]
}
},
"additionalProperties": false
},
"publicEndpoint": {
"type": "object",
"required": ["url", "protocol", "host", "port", "serviceId", "frpProxy"],
"properties": {
"url": {
"type": "string",
"pattern": "^http://74\\.48\\.78\\.17:1666[67]$"
},
"protocol": {
"type": "string",
"const": "http"
},
"host": {
"type": "string",
"const": "74.48.78.17"
},
"port": {
"type": "integer",
"enum": [16666, 16667]
},
"serviceId": {
"$ref": "#/$defs/serviceId"
},
"frpProxy": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
},
"frp": {
"type": "object",
"required": ["server", "proxies"],
"properties": {
"server": {
"type": "object",
"required": ["address", "bindPort"],
"properties": {
"address": {
"type": "string",
"const": "74.48.78.17"
},
"bindPort": {
"type": "integer",
"const": 7000
}
},
"additionalProperties": false
},
"proxies": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/frpProxy"
}
}
},
"additionalProperties": false
},
"frpProxy": {
"type": "object",
"required": ["name", "type", "localServiceId", "localHost", "localPort", "remotePort"],
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"endpointId": {
"type": "string",
"enum": ["frontend", "api"]
},
"type": {
"type": "string",
"const": "tcp"
},
"localServiceId": {
"$ref": "#/$defs/serviceId"
},
"localHost": {
"type": "string",
"pattern": "^[-a-z0-9]+\\.hwlab-dev\\.svc\\.cluster\\.local$"
},
"localPort": {
"type": "integer",
"minimum": 1,
"maximum": 65535
},
"remotePort": {
"type": "integer",
"minimum": 1,
"maximum": 65535
}
},
"additionalProperties": false
},
"k3s": {
"type": "object",
"required": ["serviceMappings"],
"properties": {
"serviceMappings": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/k3sServiceMapping"
}
}
},
"additionalProperties": false
},
"k3sServiceMapping": {
"type": "object",
"required": ["serviceId", "name", "namespace", "port", "targetPort"],
"properties": {
"serviceId": {
"$ref": "#/$defs/serviceId"
},
"name": {
"type": "string",
"minLength": 1
},
"namespace": {
"type": "string",
"const": "hwlab-dev"
},
"port": {
"type": "integer",
"minimum": 1,
"maximum": 65535
},
"targetPort": {
"type": "string",
"const": "http"
}
},
"additionalProperties": false
},
"profile": {
"type": "object",
"required": ["name", "enabled"],
"properties": {
"name": {
"type": "string",
"enum": ["dev", "prod"]
},
"enabled": {
"type": "boolean"
},
"namespace": {
"type": "string"
},
"endpoint": {
"type": "string"
},
"notes": {
"type": "string"
}
},
"additionalProperties": false
},
"service": {
"type": "object",
"required": ["serviceId", "image", "namespace", "healthPath", "profile"],
"properties": {
"serviceId": {
"$ref": "#/$defs/serviceId"
},
"image": {
"type": "string",
"minLength": 1
},
"namespace": {
"type": "string",
"minLength": 1
},
"healthPath": {
"type": "string",
"pattern": "^/"
},
"profile": {
"type": "string",
"enum": ["dev", "prod"]
},
"replicas": {
"type": "integer",
"minimum": 0
},
"instanceNames": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"identityStrategy": {
"type": "string",
"enum": ["indexed-workloads"]
},
"env": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"properties": {
"HWLAB_CLOUD_DB_URL": {
"type": "string",
"const": "secretRef:hwlab-cloud-api-dev-db/database-url"
},
"HWLAB_CLOUD_DB_SSL_MODE": {
"type": "string",
"const": "require"
},
"HWLAB_CLOUD_DB_CONTRACT": {
"type": "string",
"const": "dev-redacted-presence-only"
},
"HWLAB_CLOUD_DB_SERVICE_NAME": {
"type": "string",
"const": "cloud-api-db"
},
"HWLAB_CLOUD_DB_SERVICE_NAMESPACE": {
"type": "string",
"const": "hwlab-dev"
},
"HWLAB_CLOUD_DB_HOST": {
"type": "string",
"const": "cloud-api-db.hwlab-dev.svc.cluster.local"
},
"HWLAB_CLOUD_DB_PORT": {
"type": "string",
"const": "5432"
}
}
},
"publishEnabled": {
"type": "boolean"
},
"artifactRequired": {
"type": "boolean"
},
"artifactScope": {
"type": "string",
"enum": ["required", "disabled"]
},
"notPublishedReason": {
"type": ["string", "null"]
}
},
"additionalProperties": false
}
}
}