include "root" {
  path = find_in_parent_folders("root.hcl")
}

terraform {
  source = "../../../modules/kapsule"
}

inputs = {
  cluster_name = "foxhunt"
  k8s_version  = "1.34"

  # Platform pool — runs everything: app services, databases, GitLab, monitoring
  platform_type     = "DEV1-L"
  platform_max_size = 3

  # CI build pool — right-sized for the Python fxhnt cockpit/deploy builds (kaniko + pip, ~2-6 vCPU).
  # Was POP2-HC-32C-64G (32 vCPU/64GB) for the now-dormant Rust cargo compile + precompute_features;
  # downsized 2026-06-21 to POP2-4C-16G (in stock in fr-par-2; the 32C type hit a zone stock-out that
  # jammed the autoscaler — "Resource POP2-HC-32C-64G is out of stock"). Far cheaper, scale-to-zero.
  enable_ci_compile_cpu_pool = true
  ci_compile_cpu_type        = "POP2-4C-16G"
  ci_compile_cpu_max_size    = 4

  # High-memory CPU pool (POP2-HM-32C-256G — 32 vCPU, 256GB RAM).
  # Reserved for the rare full-rebuild fxcache path that can't fit on
  # the 64GB ci-compile-cpu pool (9-quarter precompute_features peaks
  # ~50-60GB during the post-OFI alpha_trades conversion).
  # min_size=0 + size=0 initial so this pool costs nothing when idle.
  enable_ci_compile_cpu_hm_pool = false # decommissioned 2026-06-21 — Rust precompute_features retired
  ci_compile_cpu_hm_type        = "POP2-HM-32C-256G"
  ci_compile_cpu_hm_max_size    = 1

  # L40S training pool (48GB VRAM, CUDA CC 89)
  enable_ci_training_l40s_pool = false # decommissioned 2026-06-21 — Rust ML training retired
  ci_training_l40s_type        = "L40S-1-48G"
  ci_training_l40s_max_size    = 1

  # H100 training pool (80GB VRAM, CUDA CC 90)
  enable_ci_training_h100_pool = false # decommissioned 2026-06-21 — Rust RL training retired
  ci_training_h100_type        = "H100-1-80G"
  ci_training_h100_max_size    = 1

  # H100x2 and H100-SXM pools removed 2026-05-16:
  # - SXM: Scaleway account quota is 0/0 (cp_servers_type_H100_SXM_2_80G).
  #        The pool was stuck trying to provision and jammed the autoscaler.
  # - H100x2: more expensive than current workloads justify; the single-GPU
  #          H100 pool covers all training paths.

  # NAT gateway handles egress — no public IPs on nodes
  public_ip_disabled = true
}
