160 lines
3.7 KiB
JSON
160 lines
3.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", "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:6667"
|
|
},
|
|
"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": {
|
|
"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": {
|
|
"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"
|
|
]
|
|
},
|
|
"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
|
|
},
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
"publishEnabled": {
|
|
"type": "boolean"
|
|
},
|
|
"artifactRequired": {
|
|
"type": "boolean"
|
|
},
|
|
"artifactScope": {
|
|
"type": "string",
|
|
"enum": ["required", "disabled"]
|
|
},
|
|
"notPublishedReason": {
|
|
"type": ["string", "null"]
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
}
|