fix(infra): add kubelet node-labels to all Kapsule pools
Nodes from autoscaler now get pool=<name> labels automatically via kubelet_args, eliminating the need to manually label nodes after scale-up events. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -51,6 +51,10 @@ resource "scaleway_k8s_pool" "services" {
|
||||
public_ip_disabled = var.public_ip_disabled
|
||||
region = var.region
|
||||
|
||||
kubelet_args = {
|
||||
"node-labels" = "pool=services"
|
||||
}
|
||||
|
||||
lifecycle {
|
||||
ignore_changes = [size]
|
||||
}
|
||||
@@ -69,6 +73,10 @@ resource "scaleway_k8s_pool" "gitlab" {
|
||||
autohealing = true
|
||||
public_ip_disabled = var.public_ip_disabled
|
||||
region = var.region
|
||||
|
||||
kubelet_args = {
|
||||
"node-labels" = "pool=gitlab"
|
||||
}
|
||||
}
|
||||
|
||||
# CI compile pool (L4 — 24GB VRAM, CUDA CC 89, for cargo check/test/build)
|
||||
@@ -85,6 +93,10 @@ resource "scaleway_k8s_pool" "ci_compile" {
|
||||
public_ip_disabled = var.public_ip_disabled
|
||||
region = var.region
|
||||
|
||||
kubelet_args = {
|
||||
"node-labels" = "pool=ci-compile"
|
||||
}
|
||||
|
||||
lifecycle {
|
||||
ignore_changes = [size]
|
||||
}
|
||||
@@ -104,6 +116,10 @@ resource "scaleway_k8s_pool" "ci_training" {
|
||||
public_ip_disabled = var.public_ip_disabled
|
||||
region = var.region
|
||||
|
||||
kubelet_args = {
|
||||
"node-labels" = "pool=ci-training"
|
||||
}
|
||||
|
||||
lifecycle {
|
||||
ignore_changes = [size]
|
||||
}
|
||||
@@ -123,6 +139,10 @@ resource "scaleway_k8s_pool" "ci_compile_cpu" {
|
||||
public_ip_disabled = var.public_ip_disabled
|
||||
region = var.region
|
||||
|
||||
kubelet_args = {
|
||||
"node-labels" = "pool=ci-compile-cpu"
|
||||
}
|
||||
|
||||
lifecycle {
|
||||
ignore_changes = [size]
|
||||
}
|
||||
@@ -143,6 +163,10 @@ resource "scaleway_k8s_pool" "dev" {
|
||||
wait_for_pool_ready = false
|
||||
region = var.region
|
||||
|
||||
kubelet_args = {
|
||||
"node-labels" = "pool=gpu-dev"
|
||||
}
|
||||
|
||||
lifecycle {
|
||||
ignore_changes = [size]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user