From 8b1857174568aaf6c3bfa230212a9b18980dc51a Mon Sep 17 00:00:00 2001 From: eedo_y Date: Wed, 8 Apr 2026 14:01:20 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=ED=85=9C=ED=94=8C=EB=A6=BF=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=ED=95=B4=EB=8F=84=20=EA=B8=B0=EC=A1=B4=20?= =?UTF-8?q?=EC=9D=B8=EC=8A=A4=ED=84=B4=EC=8A=A4=20=EB=B3=80=EA=B2=BD?= =?UTF-8?q?=EC=95=88=EB=90=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95=20(#1?= =?UTF-8?q?2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- terraform/environments/prod/compute.tf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/terraform/environments/prod/compute.tf b/terraform/environments/prod/compute.tf index b257c7a..d287a02 100644 --- a/terraform/environments/prod/compute.tf +++ b/terraform/environments/prod/compute.tf @@ -17,6 +17,7 @@ module "k8s_master_nodes" { # 마스터 노드는 단일 인스턴스로 고정 운영합니다. enable_autoscaling = false + update_policy_type = "OPPORTUNISTIC" # 공통 인스턴스 설정 machine_type = var.k8s_master_machine_type @@ -62,11 +63,12 @@ module "k8s_worker_nodes" { instance_group_zone = "${var.region}-a" instance_group_target_size = var.k8s_worker_instance_group_size - # 워커 노드는 비용 절감을 우선하되 필요 시에만 오토스케일링합니다. - enable_autoscaling = var.enable_autoscaling + # target_size가 0이면 워커 MIG를 완전히 비워둘 수 있도록 오토스케일러를 비활성화합니다. + enable_autoscaling = var.k8s_worker_instance_group_size > 0 ? var.enable_autoscaling : false autoscaling_min_replicas = var.autoscaling_min_replicas autoscaling_max_replicas = var.autoscaling_max_replicas autoscaling_cpu_target = 0.7 + update_policy_type = "OPPORTUNISTIC" # 공통 인스턴스 설정 machine_type = var.k8s_worker_machine_type