Files
foxhunt/infra/modules/kapsule/main.tf
jgrusewski c97c02677e fix(infra): rename L4 pool ci-compile → ci-rl, remove stale moved blocks
Applied terragrunt to recreate the L4 GPU pool with the correct name
`ci-rl` (was `ci-compile` due to immutable Scaleway pool names).
Updated all K8s manifests and comments to match. Removed the 3 stale
`moved` blocks from main.tf since the state renames are now applied.

Pool naming is now consistent across Terraform, Scaleway, and K8s configs:
- ci-compile-cpu (POP2-32C-128G) — CPU compilation
- ci-rl (L4-1-24G) — RL training / CUDA compile
- ci-training (L40S-1-48G) — supervised training + hyperopt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 13:59:44 +01:00

141 lines
4.1 KiB
HCL

resource "scaleway_vpc_private_network" "foxhunt" {
name = "${var.cluster_name}-pn"
region = var.region
}
resource "scaleway_k8s_cluster" "foxhunt" {
name = var.cluster_name
version = var.k8s_version
cni = "cilium"
region = var.region
delete_additional_resources = true
private_network_id = scaleway_vpc_private_network.foxhunt.id
auto_upgrade {
enable = true
maintenance_window_start_hour = 4
maintenance_window_day = "sunday"
}
autoscaler_config {
disable_scale_down = false
scale_down_delay_after_add = "10m"
scale_down_unneeded_time = "10m"
estimator = "binpacking"
ignore_daemonsets_utilization = true
}
}
resource "scaleway_k8s_pool" "services" {
cluster_id = scaleway_k8s_cluster.foxhunt.id
name = "services"
node_type = var.services_type
size = 1
min_size = 1
max_size = var.services_max_size
autoscaling = true
autohealing = true
public_ip_disabled = var.public_ip_disabled
region = var.region
lifecycle {
ignore_changes = [size]
}
}
# GitLab CE node pool (dedicated DEV1-L for GitLab + Runner manager)
resource "scaleway_k8s_pool" "gitlab" {
count = var.enable_gitlab_pool ? 1 : 0
cluster_id = scaleway_k8s_cluster.foxhunt.id
name = "gitlab"
node_type = var.gitlab_type
size = 1
min_size = 1
max_size = 1
autoscaling = false
autohealing = true
public_ip_disabled = var.public_ip_disabled
region = var.region
}
# CI RL pool (L4 — 24GB VRAM, CUDA CC 89, for RL training + hyperopt)
# Nodes auto-labeled: k8s.scaleway.com/pool-name=ci-rl
resource "scaleway_k8s_pool" "ci_rl" {
count = var.enable_ci_rl_pool ? 1 : 0
cluster_id = scaleway_k8s_cluster.foxhunt.id
name = "ci-rl"
node_type = var.ci_rl_type
size = 1
min_size = 0
max_size = var.ci_rl_max_size
autoscaling = true
autohealing = true
public_ip_disabled = var.public_ip_disabled
region = var.region
lifecycle {
ignore_changes = [size]
}
}
# CI training pool (L40S — 48GB VRAM, for supervised hyperopt + training)
# Nodes auto-labeled: k8s.scaleway.com/pool-name=ci-training
resource "scaleway_k8s_pool" "ci_training" {
count = var.enable_ci_training_pool ? 1 : 0
cluster_id = scaleway_k8s_cluster.foxhunt.id
name = "ci-training"
node_type = var.ci_training_type
size = 1
min_size = 0
max_size = var.ci_training_max_size
autoscaling = true
autohealing = true
public_ip_disabled = var.public_ip_disabled
region = var.region
lifecycle {
ignore_changes = [size]
}
}
# CPU compile pool (POP2 — high CPU, no GPU, for cargo check/build)
# Nodes auto-labeled: k8s.scaleway.com/pool-name=ci-compile-cpu
resource "scaleway_k8s_pool" "ci_compile_cpu" {
count = var.enable_ci_compile_cpu_pool ? 1 : 0
cluster_id = scaleway_k8s_cluster.foxhunt.id
name = "ci-compile-cpu"
node_type = var.ci_compile_cpu_type
size = 1
min_size = 0
max_size = var.ci_compile_cpu_max_size
autoscaling = true
autohealing = true
public_ip_disabled = var.public_ip_disabled
region = var.region
lifecycle {
ignore_changes = [size]
}
}
# CPU pool for remote development (DevPod — autoscales to zero)
# Nodes auto-labeled: k8s.scaleway.com/pool-name=gpu-dev
resource "scaleway_k8s_pool" "dev" {
count = var.enable_dev_pool ? 1 : 0
cluster_id = scaleway_k8s_cluster.foxhunt.id
name = "gpu-dev"
node_type = var.dev_pool_type
size = 1
min_size = 0
max_size = var.dev_pool_max_size
autoscaling = true
autohealing = true
public_ip_disabled = var.public_ip_disabled
wait_for_pool_ready = false
region = var.region
lifecycle {
ignore_changes = [size]
}
}