Services

Define containerized services deployed with interceptor sidecars for traffic capture.

Required fields

FieldTypeDescription
type"SERVICE"Item type
namestringUnique name (1-63 chars, lowercase alphanumeric + hyphens, must start/end with alphanumeric). Used as DNS hostname.
portintegerPort the service listens on (1-65535)
healthCheckstringHTTP path for health checks (e.g., /health)

Optional fields

FieldTypeDefaultDescription
descriptionstringHuman-readable description (max 500 chars)
imagestringDocker image URI (e.g., my-service:latest)
uiPathstringURL path to service's UI (e.g., /) — enables "Open UI" button
debugPortintegerRemote debugging port (e.g., 9229 for Node.js --inspect)
envarrayEnvironment variables (see below)
minCpunumberMinimum CPU cores (e.g., 0.25)
minMemorynumberMinimum memory in MB
maxCpunumberMaximum CPU cores
maxMemorynumberMaximum memory in MB

Environment variables

Environment variables use an array of objects with name and value fields — not a flat key-value object:

"env": [
  { "name": "DATABASE_URL", "value": "postgresql://dokkimi:dokkimi@postgres-db:5432/dokkimi" },
  { "name": "REDIS_URL", "value": "redis://:dokkimi@redis-cache:6379" },
  { "name": "NODE_ENV", "value": "test" }
]

Full example

{
  "type": "SERVICE",
  "name": "api-gateway",
  "image": "api-gateway:latest",
  "port": 3000,
  "healthCheck": "/health",
  "uiPath": "/",
  "debugPort": 9229,
  "env": [
    { "name": "DATABASE_URL", "value": "postgresql://dokkimi:dokkimi@postgres-db:5432/dokkimi" },
    { "name": "REDIS_URL", "value": "redis://:dokkimi@redis-cache:6379" },
    { "name": "USER_SERVICE_URL", "value": "http://user-service:3000" },
    { "name": "NODE_ENV", "value": "test" }
  ],
  "minCpu": 0.25,
  "minMemory": 256,
  "maxCpu": 1,
  "maxMemory": 1024
}

DNS and inter-service communication

Service names are DNS hostnames within the namespace. Use the name of another item as the hostname when one service connects to another. For example, if you have a database item named postgres-db, your service connects to it at postgres-db:5432.

Naming rules

Item names must be lowercase, alphanumeric with hyphens, start and end with an alphanumeric character, and be 1-63 characters long. They're used as Kubernetes DNS names.

Pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$