Skip to content

Commit

Permalink
Merge pull request #1425 from kranich/fix-autoscaler_max_count-for-di…
Browse files Browse the repository at this point in the history
…sabled-cluster-autoscaler-feature

Fix autoscaler_max_count computation for disabled cluster autoscaler feature
  • Loading branch information
mysticaltech authored Jul 25, 2024
2 parents cf08b7b + e0b659d commit e171efc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ locals {
# if we are in a single cluster config, we use the default klipper lb instead of Hetzner LB
control_plane_count = sum([for v in var.control_plane_nodepools : v.count])
agent_count = sum([for v in var.agent_nodepools : length(coalesce(v.nodes, {})) + coalesce(v.count, 0)])
autoscaler_max_count = sum([for v in var.autoscaler_nodepools : v.max_nodes])
autoscaler_max_count = length(var.autoscaler_nodepools) > 0 ? sum([for v in var.autoscaler_nodepools : v.max_nodes]) : 0
is_single_node_cluster = (local.control_plane_count + local.agent_count + local.autoscaler_max_count) == 1

using_klipper_lb = var.enable_klipper_metal_lb || local.is_single_node_cluster
Expand Down

0 comments on commit e171efc

Please sign in to comment.