# Kubernetes Deployment Defaults
#
# Default values for K8s deployments
# Migrated from provisioning/kcl/k8s_deploy.k

let contracts = import "contracts.ncl" in

{
  default_port = {
    name = "http",
    typ = "TCP",
  } | contracts.K8sPort,

  default_container = {
    name = "main",
    image = "nginx:latest",
    imagePull = "IfNotPresent",
  } | contracts.K8sContainers,

  default_service = {
    name = "default",
    typ = "ClusterIP",
    proto = "TCP",
    ports = [],
  } | contracts.K8sService,

  default_volume = {
    name = "data",
    typ = "volumeClaim",
  } | contracts.K8sVolume,

  default_deploy_spec = {
    replicas = 1,
    hostUsers = true,
    containers = [],
  } | contracts.K8sDeploySpec,

  default_service_mesh_config = {
    mtls_enabled = true,
    tracing_enabled = true,
  } | contracts.K8sServiceMeshConfig,

  default_ingress_config = {
    tls_enabled = true,
  } | contracts.K8sIngressConfig,
}
