From fbbd6bac222aa2c038b6efb1d068c78d55673f1b Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Fri, 27 Feb 2026 10:03:09 +0100 Subject: [PATCH] feat(infra): enable always-on pool autoscaling to 2 nodes Services moved off L40S GPU node to always-on DEV1-M pool. Single DEV1-M couldn't fit all services, so enable autoscaling with max_size=2 to allow a second node when needed. Co-Authored-By: Claude Opus 4.6 --- infra/live/production/kapsule/terragrunt.hcl | 3 ++- infra/modules/kapsule/main.tf | 8 ++++++-- infra/modules/kapsule/variables.tf | 6 ++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/infra/live/production/kapsule/terragrunt.hcl b/infra/live/production/kapsule/terragrunt.hcl index c6f2fb39d..afd7205b0 100644 --- a/infra/live/production/kapsule/terragrunt.hcl +++ b/infra/live/production/kapsule/terragrunt.hcl @@ -9,7 +9,8 @@ terraform { inputs = { cluster_name = "foxhunt" k8s_version = "1.34" - always_on_type = "DEV1-M" + always_on_type = "DEV1-M" + always_on_max_size = 2 # GitLab CE pool (dedicated for GitLab + Prometheus + Runner manager) enable_gitlab_pool = true diff --git a/infra/modules/kapsule/main.tf b/infra/modules/kapsule/main.tf index d4ec2a2cc..ea13ad4d3 100644 --- a/infra/modules/kapsule/main.tf +++ b/infra/modules/kapsule/main.tf @@ -32,11 +32,15 @@ resource "scaleway_k8s_pool" "always_on" { node_type = var.always_on_type size = 1 min_size = 1 - max_size = 1 - autoscaling = false + max_size = var.always_on_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) diff --git a/infra/modules/kapsule/variables.tf b/infra/modules/kapsule/variables.tf index 1b1f958a0..9262b2dce 100644 --- a/infra/modules/kapsule/variables.tf +++ b/infra/modules/kapsule/variables.tf @@ -21,6 +21,12 @@ variable "always_on_type" { default = "DEV1-M" } +variable "always_on_max_size" { + description = "Maximum number of nodes in the always-on pool (autoscaling)" + type = number + default = 2 +} + variable "enable_gitlab_pool" { description = "Create dedicated node pool for GitLab CE" type = bool