Skip to content

Commit b152a71

Browse files
Benjamin BauerDennis Ploeger
authored andcommitted
feat: integrate azure kubernetes node pool autoscaler feature
1 parent f9103ff commit b152a71

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ resource "azurerm_kubernetes_cluster" "k8s" {
5252
orchestrator_version = var.default_node_pool_k8s_version
5353
zones = var.availability_zones
5454
temporary_name_for_rotation = var.temporary_name_for_rotation
55+
enable_auto_scaling = var.auto_scaling_enable
56+
min_count = var.auto_scaling_min_node_count
57+
max_count = var.auto_scaling_max_node_count
5558
}
5659

5760
dynamic "api_server_access_profile" {

vars.tf

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,24 @@ variable "node_pools" {
9292
}))
9393
default = {}
9494
description = "Additional node pools to set up"
95+
}
96+
97+
variable "auto_scaling_enable" {
98+
type = bool
99+
description = "Enable auto scaling of node pool"
100+
default = false
101+
}
95102

103+
variable "auto_scaling_min_node_count" {
104+
type = string
105+
description = "Enable auto scaling of node pool"
106+
default = "1"
107+
}
108+
109+
variable "auto_scaling_max_node_count" {
110+
type = string
111+
description = "Enable auto scaling of node pool"
112+
default = "1"
96113
}
97114

98115
variable "load_balancer_sku" {

0 commit comments

Comments
 (0)