Files
foxhunt/infra/modules/kapsule/main.tf
jgrusewski 6e03c01e2c chore(infra): remove dead TF code — ci-rl pool and binaries S3 bucket
ci-rl pool was permanently disabled (enable_ci_rl_pool=false), all
training consolidated on ci-training (L40S). foxhunt-binaries S3
bucket was never created — binaries now deploy via shared PVC.

Also: deleted orphaned infra/live/production/ci-runner/ directory,
cleaned up stale Grafana ReplicaSets, recreated missing grafana PVC,
deleted orphaned Released PV, synced runner Helm configmap.

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

139 lines
4.2 KiB
HCL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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
}
}
# Foxhunt app services pool (api-gateway, trading-service, etc.)
# Renamed from "services" — was 2× DEV1-L shared with databases,
# now 1× DEV1-L dedicated to foxhunt microservices only.
resource "scaleway_k8s_pool" "foxhunt" {
cluster_id = scaleway_k8s_cluster.foxhunt.id
name = "foxhunt"
node_type = var.foxhunt_type
size = 1
min_size = 1
max_size = var.foxhunt_max_size
autoscaling = true
autohealing = true
public_ip_disabled = var.public_ip_disabled
region = var.region
lifecycle {
ignore_changes = [size]
}
}
# Platform infrastructure pool (postgres, redis, minio, questdb, monitoring)
resource "scaleway_k8s_pool" "platform" {
count = var.enable_platform_pool ? 1 : 0
cluster_id = scaleway_k8s_cluster.foxhunt.id
name = "platform"
node_type = var.platform_type
size = 1
min_size = 1
max_size = 1
autoscaling = false
autohealing = true
public_ip_disabled = var.public_ip_disabled
region = var.region
}
# GitLab CE node pool (dedicated GP1-XS 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 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]
}
}