# Service Registry Defaults
#
# Default values for service configurations
# Migrated from provisioning/kcl/services.k

let contracts = import "contracts.ncl" in

{
  default_startup = {
    auto_start = false,
    start_timeout = 60,
    start_order = 100,
    restart_on_failure = true,
    max_restarts = 3,
  } | contracts.StartupConfig,

  default_health_check = {
    type = 'none,
    interval = 10,
    retries = 3,
    timeout = 5,
  } | contracts.HealthCheck,

  default_http_health = {
    endpoint = "/health",
    expected_status = 200,
    method = 'GET,
    headers = {},
  } | contracts.HttpHealthCheck,

  default_tcp_health = {
    host = "localhost",
    port = 8080,
  } | contracts.TcpHealthCheck,

  default_docker_deployment = {
    image = "nginx:latest",
    container_name = "default-service",
    ports = [],
    volumes = [],
    environment = {},
    networks = [],
    restart_policy = 'unless_stopped,
  } | contracts.DockerDeployment,

  default_binary_deployment = {
    binary_path = "/usr/local/bin/service",
    args = [],
    env = {},
  } | contracts.BinaryDeployment,
}
